This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GCC g++ version 8 very slow to compile

With the latest gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 compiler tools release, g++ is very slow to compile relative to the older gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 release.

I am seeing it take over 3 times longer than the previous compiler. A previously 45 second build now takes 2.5 minutes.

Is this to be expected ?

Are there any compiler flags that will speed this up (less optimisations) as it is now taking a significant time to build things ?

Parents
  • I will try and attach a simple example (assuming this web system allows it) that I hope shows the issue. I have just put a bit of C++ code in one file to simplify the test. It is really a bit to small and thus quick to compile, if it doesn't show the issue I will get a lump of C++ code that will compile up. I think the issue is just with C++ code. It seems generally 3x slower with any C++ code.

    With the attached example compiling with gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 takes 0.085 seconds.

    With the attached example compiling with gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 takes 0.241 seconds.

    To test:

    make clean; sleep 2; time make

    I am testing on Fedora29 Linux with all updates to date on a 4 core Xeon system but all other Fedora29 systems I have tried show the same issue.

    Ok, is there a way to attach a tar file or an email address to send one to with the example ?

Reply
  • I will try and attach a simple example (assuming this web system allows it) that I hope shows the issue. I have just put a bit of C++ code in one file to simplify the test. It is really a bit to small and thus quick to compile, if it doesn't show the issue I will get a lump of C++ code that will compile up. I think the issue is just with C++ code. It seems generally 3x slower with any C++ code.

    With the attached example compiling with gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 takes 0.085 seconds.

    With the attached example compiling with gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 takes 0.241 seconds.

    To test:

    make clean; sleep 2; time make

    I am testing on Fedora29 Linux with all updates to date on a 4 core Xeon system but all other Fedora29 systems I have tried show the same issue.

    Ok, is there a way to attach a tar file or an email address to send one to with the example ?

Children