The current PIC/PIE patches for ghc 8.0
Hi all,
As you may be aware, I am a Debian user that does a little upstream
GHC development. Like many of you I recently ran into the PIC/PIE
problem when using Debian's GCC versions 6.2.0-7 and later.
As a result of this I've been looking at preparing the patches that
are currently in the Debian package to work around this issue. I
linked those twp patches here:
https://ghc.haskell.org/trac/ghc/ticket/12759#comment:4
During my testing of these two patches against GHC git HEAD, I found
that with these patches, over 100 of the ~ 5400 tests in the GHC test
suite were failing, specifically tests related to template haskell.
I have however found another (better) solution to this problem (provided
by one of the other GHC devs). The solution is to configure GHC with:
./configure \
CONF_CC_OPTS_STAGE2=-fno-PIE \
CONF_GCC_LINKER_OPTS_STAGE2=-no-pie \
CONF_LD_LINKER_OPTS_STAGE2=-no-pie \
${other_config_options}
Configured like this (and without the patches currently in the Debian
tree), GHC passes all tests.
I recommend that the debian-haskell maintainers drop the two PIC/PIE
patches and instead update their build system as suggested here.
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
Reply to: