Ticket #3705 (closed bug: wontfix)
-fPIC without -dynamic silently ignored
Description
$ ghc -fPIC -c -o TestF.o TestF.hs $ ghc -shared -dynamic TestF.so TestF.o /usr/bin/ld: TestF.o: relocation R_X86_64_PC32 against undefined symbol `stg_CAF_BLACKHOLE_info' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status $ ghc -fPIC -dynamic -c -o TestF.o TestF.hs $ ghc -shared -dynamic TestF.so TestF.o $
If you attempt to use -fPIC without -dynamic, then you get non-PIC code in the .o file. This behaviour is surprising and quite useless.
Change History
Note: See
TracTickets for help on using
tickets.
