Marek Polacek <polacek(a)redhat.com> writes:
To get some sense on how is GCC 5 standing, we (myself and Jakub
Jelinek) have performed a test mass rebuild of rawhide (January 15th
package list) using gcc-5.0.0-0.5.fc22 on x86_64 [...]
I'd like to bring to folks' attention one other scenario that can bite
with a gcc major version update. It's a more subtle failure, and it
might be widespread. In the case of pcp [1], it lets a build succeed,
but an opaque runtime error results.
In this case, the root cause was an autoconf fragment is used to
detect whether gcc supports -rdynamic:
cat <<End-of-File >conftest.c
main() {;}
End-of-File
rdynamic_flag=
$CC -o conftest -rdynamic conftest.c 2>conftest.out
test -s conftest.out || rdynamic_flag=-rdynamic
This used to succeed under gcc 4.9, but gcc 5 emits a warning
conftest.c:1:1: warning: return type defaults to `int' [-Wimplicit-int]
[...]
which the test takes as a failure due to its scanning of stderr. That
in turn nukes use of -rdynamic, which breaks -run-time- dlopen()
attempts between shared libraries.
Admittedly, it's not a great test (and we're fixing it upstream). But
it's possible that other programs' configury is similarly sensitive to
gcc warn-by-default changes, and result in a differently configured
build or even a broken runtime.
[1]
https://kojipkgs.fedoraproject.org//packages/pcp/3.10.3/0.508.g8090873.fc...
, search for -rdynamic
- FChE