Skip to content

`-no-pie` detection false-negative causing linker errors

Summary

When using a relatively recent Android NDK cross-compilation toolchain, builds will fail because of the -r and -pie flag incompatibility.

This happens -no-pie support is not correctly detected.

The culprit is this line in the configure script aclocal.m4:

$CC -no-pie -Werror -x c /dev/null -dM -E > conftest.txt 2>&1 && ! grep -i unrecognized conftest.txt

This evaluates to false because the $CC invocation fails with

clang80: error: argument unused during compilation: '-nopie' [-Werror,-Wunused-command-line-argument]

Environment

  • GHC version used: 8.11.0.20200515 (latest master on that date)
Edited by Michiel Derhaeg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information