aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-04-02 07:39:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-04-02 07:42:40 -0700
commitaa350065a4236d822c7b4a1116d1d92f7820d83e (patch)
treebe0558880768ed71e7b8efb7105375da0d7d1f8b /ld
parent8be5def63b0f2036312483dac8dd5a4fa2e91009 (diff)
downloadgdb-aa350065a4236d822c7b4a1116d1d92f7820d83e.zip
gdb-aa350065a4236d822c7b4a1116d1d92f7820d83e.tar.gz
gdb-aa350065a4236d822c7b4a1116d1d92f7820d83e.tar.bz2
NOCF_PROTECTION_CFLAGS: Replace nopie with available
* testsuite/config/default.exp (NOCF_PROTECTION_CFLAGS): Replace nopie with available.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/testsuite/config/default.exp6
2 files changed, 8 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 2720a54..c8ade29 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,10 @@
2020-04-02 H.J. Lu <hongjiu.lu@intel.com>
+ * testsuite/config/default.exp (NOCF_PROTECTION_CFLAGS): Replace
+ nopie with available.
+
+2020-04-02 H.J. Lu <hongjiu.lu@intel.com>
+
* testsuite/config/default.exp (NOCF_PROTECTION_CFLAGS): New.
Set to "-fcf-protection=none" if target compiler supports it.
* testsuite/ld-srec/srec.exp: Add $NOCF_PROTECTION_CFLAGS to
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 7998f4e..64b78cd 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 ""