glibc 2.20 outputs warnings for _BSD_SOURCE (Stg.h) on unknown archs
|Reported by:||juhpetersen||Owned by:||juhpetersen|
|Type of failure:||Incorrect warning at compile-time||Test Case:|
|Related Tickets:||Differential Revisions:|
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.
Change History (5)
Changed 9 months ago by juhpetersen
comment:2 Changed 9 months ago by juhpetersen
- Summary changed from glibc 2.20 outputs warnings for _BSD_SOURCE (Stg.h) on unknowns archs to glibc 2.20 outputs warnings for _BSD_SOURCE (Stg.h) on unknown archs