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 | 1b25be202870c1fd2db663f4f3764237ed92a765 (patch) | |
tree | 71257474af88888c9c2f514cfc62358af8fb112b | |
parent | ae4fbbab2a2a619fe08fc551abbb83bf5cd53323 (diff) | |
download | txr-1b25be202870c1fd2db663f4f3764237ed92a765.tar.gz txr-1b25be202870c1fd2db663f4f3764237ed92a765.tar.bz2 txr-1b25be202870c1fd2db663f4f3764237ed92a765.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 |