NOCF_PROTECTION_CFLAGS: Replace nopie with available
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 2 Apr 2020 14:39:55 +0000 (07:39 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 2 Apr 2020 14:42:40 +0000 (07:42 -0700)
* testsuite/config/default.exp (NOCF_PROTECTION_CFLAGS): Replace
nopie with available.

ld/ChangeLog
ld/testsuite/config/default.exp

index 2720a54c57d750cee7735933b15a6ce2b9ea0970..c8ade29991ebda0cabe2295cf485b4f7d3f9554e 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 7998f4efb851e51d065cd6a52f8f395751fb6777..64b78cd18a474b10a1fd68f6503c78c42d05f1c4 100644 (file)
@@ -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 ""
This page took 0.026666 seconds and 4 git commands to generate.