summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-12-23 07:12:04 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-12-23 07:12:04 -0800
commita2ae08b22f7ffc41f3bef42f2437dc2a2d4f99ed (patch)
tree0e8cef8a7fd55ff30f755809ee479a1b0e55f02f /configure
parentae1e265eda80625c655ee46ab99a4af418e4cd96 (diff)
downloadtxr-a2ae08b22f7ffc41f3bef42f2437dc2a2d4f99ed.tar.gz
txr-a2ae08b22f7ffc41f3bef42f2437dc2a2d4f99ed.tar.bz2
txr-a2ae08b22f7ffc41f3bef42f2437dc2a2d4f99ed.zip
configure: don't disable PIE on Android.
* configure: Move how-to-disable-PIE check below plaform detections, where we know whether we have Android or not. On Android, we can't disable PIE; non-PIE executables are not supported. Let's cross our fingers things work.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure54
1 files changed, 29 insertions, 25 deletions
diff --git a/configure b/configure
index 5c3fd974..78909670 100755
--- a/configure
+++ b/configure
@@ -1009,31 +1009,6 @@ fi
rm -f conftest$exe
-printf "Checking how to disable PIE ..."
-
-nopie_flags=
-
-for flag in -nopie -no-pie ; do
- if conftest EXTRA_FLAGS=$flag && ! grep -q option conftest.err ; then
- nopie_flags=" $flag"
- break
- fi
-done
-
-for flag in -fnopie -fno-pie ; do
- if conftest EXTRA_FLAGS="$flag$nopie_flags" && ! grep -q option conftest.err ; then
- nopie_flags="$nopie_flags $flag"
- break
- fi
-done
-
-if [ -n "$nopie_flags" ]; then
- printf "%s\n" "$nopie_flags"
- opt_flags="$opt_flags$nopie_flags"
-else
- printf " n/a\n"
-fi
-
printf "Checking for disabling source code quoting in compiler errors ... "
cat > conftest.c <<!
@@ -1195,6 +1170,35 @@ else
done
fi
+printf "Checking how to disable PIE ..."
+
+if [ $android_target ] ; then
+ printf " n/a (Android)\n"
+else
+ nopie_flags=
+
+ for flag in -nopie -no-pie ; do
+ if conftest EXTRA_FLAGS=$flag && ! grep -q option conftest.err ; then
+ nopie_flags=" $flag"
+ break
+ fi
+ done
+
+ for flag in -fnopie -fno-pie ; do
+ if conftest EXTRA_FLAGS="$flag$nopie_flags" && ! grep -q option conftest.err ; then
+ nopie_flags="$nopie_flags $flag"
+ break
+ fi
+ done
+
+ if [ -n "$nopie_flags" ]; then
+ printf "%s\n" "$nopie_flags"
+ opt_flags="$opt_flags$nopie_flags"
+ else
+ printf " n/a\n"
+ fi
+fi
+
#
# Check for annoying warnings from ctype.h macros
#