This question is impossible to answer because:
- You have not specified how many jobs you're using to build GCC, e.g. just one or -j 8 (a very bad idea considering you're low on RAM, -j 8 requires well over 8GiB of RAM)
- You have an ultra low power CPU which is unable to actually run at its designated speed when all the cores/threads are busy
- There's a world of different between building GCC with e.g.
-O1
vs -O3 -flto=auto
- It's not known whether you're building the entire GCC source tree or just C, C++ and LTO backends
- It's not known whether you're using
--disable-stage1-checking
or not which could cut the build time by two
- It's not known whether you're building tests or not
Even for a known CPU which doesn't throttle all the options above could result in compilation times which differ by an order of magnitude or even more.
The i5-10210U CPU has four, not two cores, and eight threads.
I would highly not recommend building GCC on your laptop if you have an SSD disk because its compilation involves writing literally tens of gigabytes of data in terms of temporary files. Nowadays most automated build systems build in tmpfs
to speed up compilation and reduce the storage wear and tear.