summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure b/configure
index 7860bbc312..30aad233d1 100755
--- a/configure
+++ b/configure
@@ -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
##########################################