Hello, On Sun, Feb 06 2022, Mohamed Atef via Gcc wrote: > Hello everyone, > I built gcc from the repo and it took around 2 hours but I am > wondering should I wait two hours after every modification? > Is there any way to recompile faster. > That's very important as we will add some files and tests for OMPD.
Of course it depends on the hardware that you use but generally no, it should not take hours, certainly not to recompile after simple modifications. Above all, at configure time: 1) Make sure that you disable bootstrap by passing --disable-bootstrap If you make any modifications to the compiler, please make sure you test them with bootstrap enabled before you submit them upstream, though. 2) If you use x86_64, you can speed up compilation by disabling building of 32-bit libraries by using --disable-multilib. 3) Only select languages that you need. For example, if you just need C, C++ and Fortran, use: --enable-languages=c,c++,fortran Again, the final test should cover every language you might have affected, but for OMPT the above could suffice. And of course, pass an appropriate -j option to make. This should help to significantly reduce build times for you. Martin