From: H.J. Lu Date: Thu, 2 Apr 2020 14:39:55 +0000 (-0700) Subject: NOCF_PROTECTION_CFLAGS: Replace nopie with available X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa350065a4236d822c7b4a1116d1d92f7820d83e;p=binutils-gdb.git NOCF_PROTECTION_CFLAGS: Replace nopie with available * testsuite/config/default.exp (NOCF_PROTECTION_CFLAGS): Replace nopie with available. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 2720a54c57d..c8ade29991e 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-04-02 H.J. Lu + + * testsuite/config/default.exp (NOCF_PROTECTION_CFLAGS): Replace + nopie with available. + 2020-04-02 H.J. Lu * testsuite/config/default.exp (NOCF_PROTECTION_CFLAGS): New. diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp index 7998f4efb85..64b78cd18a4 100644 --- a/ld/testsuite/config/default.exp +++ b/ld/testsuite/config/default.exp @@ -358,7 +358,7 @@ if { ![info exists NOCF_PROTECTION_CFLAGS] } then { append flags " [board_info [target_info name] ldflags]" } - set basename "tmpdir/nopie[pid]" + set basename "tmpdir/available[pid]" set src ${basename}.c set output ${basename} set f [open $src "w"] @@ -367,12 +367,12 @@ if { ![info exists NOCF_PROTECTION_CFLAGS] } then { if [is_remote host] { set src [remote_download host $src] } - set nopie_available [run_host_cmd_yesno "$CC" "$flags -fcf-protection=none $src -o $output"] + set available [run_host_cmd_yesno "$CC" "$flags -fcf-protection=none $src -o $output"] remote_file host delete $src remote_file host delete $output file delete $src - if { $nopie_available == 1 } then { + if { $available == 1 } then { set NOCF_PROTECTION_CFLAGS "-fcf-protection=none" } else { set NOCF_PROTECTION_CFLAGS ""