diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-12-19 21:30:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-12-19 21:30:16 -0800 |
commit | d4e248238a4d73731b324766cc22dd263aa80eeb (patch) | |
tree | 71257474af88888c9c2f514cfc62358af8fb112b | |
parent | 61925457d5baa891908acd0073d2c58c663124a5 (diff) | |
download | txr-d4e248238a4d73731b324766cc22dd263aa80eeb.tar.gz txr-d4e248238a4d73731b324766cc22dd263aa80eeb.tar.bz2 txr-d4e248238a4d73731b324766cc22dd263aa80eeb.zip |
config: improve check for PIE-disabling flags.
* configure: the logic must be cumulative; the test for the code
generation flag (e.g. -fno-pie) needs to incorporate the previously
detected linker flag (e.g. -no-pie). On x86_64, -fno-pie by itself
without -no-pie fails with errors.
-rwxr-xr-x | configure | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -888,14 +888,14 @@ printf "Checking how to disable PIE ..." nopie_flags= for flag in -nopie -no-pie ; do - if conftest EXTRA_FLAGS=$flag ; then + 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 ; then + if conftest EXTRA_FLAGS="$flag$nopie_flags" && ! grep -q option conftest.err ; then nopie_flags="$nopie_flags $flag" break fi |