glibc 2.20 outputs warnings for _BSD_SOURCE (Stg.h) on unknown archs
Stg.h defines _BSD_SOURCE which glibc 2.20 deprecates with warnings in favour of _DEFAULT_SOURCE. Since the verbose warning is output for every ghc invocation when building it is rather annoying and induces testsuite failures.
The warning look like this:
In file included from /usr/include/math.h:26:0:
0,
from /usr/lib64/ghc-7.6.3/include/Stg.h:65,
from /tmp/ghc783_0/ghc783_0.hc:3:
/usr/include/features.h:148:3:
warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
^
Solution/workaround is to define "_DEFAULT_SOURCE" and that works.
I asked in https://bugzilla.redhat.com/show_bug.cgi?id=1067110#c13 about how best to fix Stg.h and got the answer to just add _DEFAULT_SOURCE.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |