[GHC] #9185: glibc 2.20 outputs warnings for _BSD_SOURCE (Stg.h) on unknowns archs

GHC ghc-devs at haskell.org
Mon Jun 9 06:46:32 UTC 2014


#9185: glibc 2.20 outputs warnings for _BSD_SOURCE (Stg.h) on unknowns archs
-------------------------+-------------------------------------------------
       Reporter:         |             Owner:
  juhpetersen            |            Status:  new
           Type:  bug    |         Milestone:
       Priority:         |           Version:  7.8.2
  normal                 |  Operating System:  Linux
      Component:         |   Type of failure:  Incorrect warning at
  Compiler               |  compile-time
       Keywords:         |         Test Case:
   Architecture:         |          Blocking:
  Unknown/Multiple       |
     Difficulty:         |
  Unknown                |
     Blocked By:         |
Related Tickets:         |
-------------------------+-------------------------------------------------
 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.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9185>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list