id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
3705,-fPIC without -dynamic silently ignored,asuffield,,"{{{
$ 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.",bug,closed,normal,,Compiler,,wontfix,,,Linux,x86_64 (amd64),None/Unknown,,,,,
