diff options
author | Alex Bennée | 2019-08-15 21:41:51 +0200 |
---|---|---|
committer | Alex Bennée | 2019-09-10 15:14:32 +0200 |
commit | 412aeacdc753e5830c56f284295cdda3c7b0a12b (patch) | |
tree | bc1e4e3d3fdb8f2d1748a4ff5e51d908aff22419 /configure | |
parent | tests/docker: --disable-libssh on ubuntu1804 builds (diff) | |
download | qemu-412aeacdc753e5830c56f284295cdda3c7b0a12b.tar.gz qemu-412aeacdc753e5830c56f284295cdda3c7b0a12b.tar.xz qemu-412aeacdc753e5830c56f284295cdda3c7b0a12b.zip |
configure: check if --no-pie is supported first
For whatever reason this doesn't trigger normally but because
compile_prog uses QEMU_CFLAGS we end up trying to build a -pie
--no-pie build which confuses compilers on some non-x86 hosts.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -2021,6 +2021,12 @@ static THREAD int tls_var; int main(void) { return tls_var; } EOF + # check we support --no-pie first... + if compile_prog "-Werror -fno-pie" "-no-pie"; then + CFLAGS_NOPIE="-fno-pie" + LDFLAGS_NOPIE="-nopie" + fi + if compile_prog "-fPIE -DPIE" "-pie"; then QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" LDFLAGS="-pie $LDFLAGS" @@ -2036,11 +2042,6 @@ EOF pie="no" fi fi - - if compile_prog "-Werror -fno-pie" "-nopie"; then - CFLAGS_NOPIE="-fno-pie" - LDFLAGS_NOPIE="-nopie" - fi fi ########################################## |