Skip to content

Force -fPIC for intree GMP (fix #17799)

Sylvain Henry requested to merge hsyl20/ghc:hsyl20-gmp-pic into master

For some reason, our patch for GMP build system was only setting PIC_ALWAYS (i.e. force PIC for asm files) on x86_64/darwin. The same thing should also be done for other architecture (e.g. x86-64, cf #17799 (closed)).

The change is small: we just move GMP_DEFINE_RAW(["define(<PIC_ALWAYS>,<yes>)"]) out of the case $host in in GMP's configure.ac.

We configure intree GMP with --with-pic=yes instead of incorrectly patching configure files (this was suggested 6 years ago here).

This patch fixes #17799 (closed), probably #4022 (closed), and probably #4366 (closed)/#8156 (closed) which have been closed without checking that the issue was actually fixed.

Edited by Sylvain Henry

Merge request reports