Skip to content

GHC master, not compiling on Archlinux

/usr/bin/ld: -r and -pie may not be used together

http://lpaste.net/159726

It appears on Archlinux, with GCC version 5.3.0, there's an implicit -pie flag passed to ld. I looked into compiler/main/DriverPipeline.hs at joinObjectFiles, it is unconditionally doing "-Wl,-r", thus the error above.

One suggested fix on IRC is to modify getCompilerInfo to know if the compiler supports -no-pie, then conditionally add that to flags that are used. I tried and got somewhere lost in compiler/main/DynFlags.hs. (Completely new to GHC)

This has bitten Go developers recently as well: https://go-review.googlesource.com/#/c/18359/

Hopefully someone can figure it out, it seems important for development and I really want to get involved :)

Edited by nitrix
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information