#5337: mkRtsOptionsLevelObj should respect -optc standard headers
-------------------------------+--------------------------------------------
    Reporter:  gnezdo          |       Owner:              
        Type:  bug             |      Status:  new         
    Priority:  normal          |   Component:  Compiler    
     Version:  7.0.4           |    Keywords:              
    Testcase:                  |   Blockedby:              
          Os:  Linux           |    Blocking:              
Architecture:  x86_64 (amd64)  |     Failure:  None/Unknown
-------------------------------+--------------------------------------------
 Our fancy compilation environment does not keep the standard C headers
 always in the same place. We always invoke gcc with --sysroot. Then we
 pass the same flag to ghc with -optc--sysroot=blah.

 This works most of the time until I also do ghc -rtsopts. In that case GHC
 will try to build a small generated object file with a limited command
 line that fails to include -optc flags. That leads to failure:

 *** C Compiler:
 gcc -c /tmp/ghc15472_0/ghc15472_0.c -o /tmp/ghc15472_0/ghc15472_0.o
 -Ilib/ghc-7.0.4/include -fno-stack-protector

 In file included from /tmp/ghc15472_0/ghc15472_0.c:1:0:

 In file included from lib/ghc-7.0.4/include/Rts.h:23:0:


 lib/ghc-7.0.4/include/Stg.h:62:10:
      fatal error: 'math.h' file not found
 #include <math.h>
          ^
 1 error generated.

 This seems trivially easy to fix with the attached patch.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to