#3668: PIE-enabled hardened gcc might broke GHC.
---------------------------+------------------------------------------------
  Reporter:  secludedsage  |          Owner:        
      Type:  bug           |         Status:  new   
  Priority:  normal        |      Milestone:        
 Component:  Compiler      |        Version:  6.10.4
Resolution:                |       Keywords:        
Difficulty:                |             Os:  Linux 
  Testcase:                |   Architecture:  x86   
   Failure:  None/Unknown  |  
---------------------------+------------------------------------------------
Comment (by secludedsage):

 I don't see any direct information about SRC_LD_OPTS. (Wiki pointed
 config.mk.in and it says SRC_P_OPTS, but no examples) I tried
 SRC_LD_OPTS+= -Wl,-nopie and get following:

 {{{
 ------------------------------------------------------------------------
 == make boot -r --jobserver-fds=3,4 -j;
  in /var/tmp/portage/dev-lang/ghc-6.10.4/work/ghc-6.10.4/includes
 ------------------------------------------------------------------------
 Creating ghcplatform.h...
 Creating ghcautoconf.h...
 Done.
 Done.
 gcc -O -O2 -march=native -pipe -nopie -Wa,--noexecstack
 -DTABLES_NEXT_TO_CODE -I. -I../rts    -c mkDerivedConstants.c -o
 mkDerivedConstants.o
 ../utils/mkdependC/mkdependC -f .depend     -- -O -O2 -march=native -pipe
 -nopie -Wa,--noexecstack -DTABLES_NEXT_TO_CODE -I. -I../rts    --
 mkDerivedConstants.c shell-tools.c
 gcc -o mkGHCConstants.o -O -O2 -march=native -pipe -nopie -Wa,--
 noexecstack -DTABLES_NEXT_TO_CODE -I. -I../rts    -c mkDerivedConstants.c
 -DGEN_HASKELL
 gcc -o mkGHCConstants -O -O2 -march=native -pipe -nopie -Wa,--noexecstack
 -DTABLES_NEXT_TO_CODE -I. -I../rts    -Wl,-nopie   mkGHCConstants.o
 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld:
 cannot find -lgcc_s
 collect2: ld returned 1 exit status
 make[1]: *** [mkGHCConstants] Error 1
 make[1]: *** Waiting for unfinished jobs....
 make: *** [stage1] Error 1
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3668#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to