diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-12-23 07:12:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-12-23 07:12:04 -0800 |
commit | a2ae08b22f7ffc41f3bef42f2437dc2a2d4f99ed (patch) | |
tree | 0e8cef8a7fd55ff30f755809ee479a1b0e55f02f /configure | |
parent | ae1e265eda80625c655ee46ab99a4af418e4cd96 (diff) | |
download | txr-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-x | configure | 54 |
1 files changed, 29 insertions, 25 deletions
@@ -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 # |