gcc 7.1.1 on Fedora 26 dumpversion now only includes major version by default

后端 未结 2 1074
情深已故
情深已故 2020-12-16 18:43

After upgrading from Fedora 25 to 26 the default gcc version is now version 7.1.1 and the output of gcc -dumpversion has changed from major.minor.patch to just

2条回答
  •  孤城傲影
    2020-12-16 18:58

    So after some research I found the configure the version is a compile time option (if you compile the compiler from source).

    I also found that there is a new gcc -dumpfullversion option that will provide the full version number, ie 7.1.1 which is what our build system expects. Small caveat is that -dumpfullversion is not supported on older versions of gcc.

    So we had to change the build system to get the version via gcc -dumpversion and check if its a single digit and if so then substitute -dumpfullversion to get the full major.minor.patch gcc version.

提交回复
热议问题