ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 4 Sep 2020 00:17:19 +0000 (17:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 4 Sep 2020 00:17:19 +0000 (17:17 -0700)
* testsuite/config/default.exp: Change NOSANTIZE_CFLAGS to
NOSANITIZE_CFLAGS.
* testsuite/ld-elf/dwarf.exp: Likewise.
* testsuite/ld-elf/indirect.exp: Likewise.
* testsuite/ld-elf/linux-x86.exp: Likewise.
* testsuite/ld-elf/shared.exp: Likewise.
* testsuite/ld-elf/tls.exp: Likewise.
* testsuite/ld-elfcomm/elfcomm.exp: Likewise.
* testsuite/ld-elfvers/vers.exp: Likewise.
* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
* testsuite/ld-elfweak/elfweak.exp: Likewise.
* testsuite/ld-gc/gc.exp: Likewise.
* testsuite/ld-plugin/lto.exp: Likewise.
* testsuite/ld-plugin/plugin.exp: Likewise.
* testsuite/ld-scripts/crossref.exp: Likewise.
* testsuite/ld-selective/selective.exp: Likewise.
* testsuite/ld-shared/shared.exp: Likewise.
* testsuite/ld-size/size.exp: Likewise.
* testsuite/ld-srec/srec.exp: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Likewise.

20 files changed:
ld/ChangeLog
ld/testsuite/config/default.exp
ld/testsuite/ld-elf/dwarf.exp
ld/testsuite/ld-elf/indirect.exp
ld/testsuite/ld-elf/linux-x86.exp
ld/testsuite/ld-elf/shared.exp
ld/testsuite/ld-elf/tls.exp
ld/testsuite/ld-elfcomm/elfcomm.exp
ld/testsuite/ld-elfvers/vers.exp
ld/testsuite/ld-elfvsb/elfvsb.exp
ld/testsuite/ld-elfweak/elfweak.exp
ld/testsuite/ld-gc/gc.exp
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/plugin.exp
ld/testsuite/ld-scripts/crossref.exp
ld/testsuite/ld-selective/selective.exp
ld/testsuite/ld-shared/shared.exp
ld/testsuite/ld-size/size.exp
ld/testsuite/ld-srec/srec.exp
ld/testsuite/ld-x86-64/x86-64.exp

index 261390a94f8a3239b272cf284cefaba51de84532..0fcbf0d6c21226394280aaee92facd529b49dbf6 100644 (file)
@@ -1,3 +1,26 @@
+2020-09-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/config/default.exp: Change NOSANTIZE_CFLAGS to
+       NOSANITIZE_CFLAGS.
+       * testsuite/ld-elf/dwarf.exp: Likewise.
+       * testsuite/ld-elf/indirect.exp: Likewise.
+       * testsuite/ld-elf/linux-x86.exp: Likewise.
+       * testsuite/ld-elf/shared.exp: Likewise.
+       * testsuite/ld-elf/tls.exp: Likewise.
+       * testsuite/ld-elfcomm/elfcomm.exp: Likewise.
+       * testsuite/ld-elfvers/vers.exp: Likewise.
+       * testsuite/ld-elfvsb/elfvsb.exp: Likewise.
+       * testsuite/ld-elfweak/elfweak.exp: Likewise.
+       * testsuite/ld-gc/gc.exp: Likewise.
+       * testsuite/ld-plugin/lto.exp: Likewise.
+       * testsuite/ld-plugin/plugin.exp: Likewise.
+       * testsuite/ld-scripts/crossref.exp: Likewise.
+       * testsuite/ld-selective/selective.exp: Likewise.
+       * testsuite/ld-shared/shared.exp: Likewise.
+       * testsuite/ld-size/size.exp: Likewise.
+       * testsuite/ld-srec/srec.exp: Likewise.
+       * testsuite/ld-x86-64/x86-64.exp: Likewise.
+
 2020-09-03  Nelson Chu  <nelson.chu@sifive.com>
 
        * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Remove
index 9e89ca1283472c2ab071fb65104007e3246f7a1a..58ca4a278cbc0e876dd29a66a96a39bdf38f1076 100644 (file)
@@ -576,10 +576,10 @@ if { ![info exists STATIC_PIE_LDFLAGS] } then {
     }
 }
 
-# Set NOSANTIZE_CFLAGS to "-fno-sanitize=all" if target compiler
+# Set NOSANITIZE_CFLAGS to "-fno-sanitize=all" if target compiler
 # supports it.
 
-if { ![info exists NOSANTIZE_CFLAGS] } then {
+if { ![info exists NOSANITIZE_CFLAGS] } then {
     if { [check_compiler_available] } {
        # Check if gcc supports -fno-sanitize=all.
        set flags ""
@@ -605,11 +605,11 @@ if { ![info exists NOSANTIZE_CFLAGS] } then {
        file delete $src
 
        if { $available == 1 } then {
-           set NOSANTIZE_CFLAGS "-fno-sanitize=all"
+           set NOSANITIZE_CFLAGS "-fno-sanitize=all"
        } else {
-           set NOSANTIZE_CFLAGS ""
+           set NOSANITIZE_CFLAGS ""
        }
     } else {
-       set NOSANTIZE_CFLAGS ""
+       set NOSANITIZE_CFLAGS ""
     }
 }
index 93fd21d8f3523d4e5443a4a9ca1f9b267ff52bbf..65b61ce04b7d4137ca983cc76a3d178a24265e5c 100644 (file)
@@ -70,7 +70,7 @@ set run_tests {
 
 # Disable all sanitizers.
 set old_CFLAGS "$CFLAGS"
-append CFLAGS " $NOSANTIZE_CFLAGS"
+append CFLAGS " $NOSANITIZE_CFLAGS"
 run_cc_link_tests $build_tests
 run_ld_link_exec_tests $run_tests
 set CFLAGS "$old_CFLAGS"
index 9451b21383cd7884578fdcf09dc2915f9f6ea110..bed1dfdb7b050d589650a6f79a7290b46ba78002 100644 (file)
@@ -65,7 +65,7 @@ if {[check_lto_available]} {
 }
 
 # Disable all sanitizers.
-append cc_cmd " $NOSANTIZE_CFLAGS"
+append cc_cmd " $NOSANITIZE_CFLAGS"
 
 if { ![ld_compile $cc_cmd $srcdir/$subdir/indirect1a.c tmpdir/indirect1a.o]
      || ![ld_compile $cc_cmd $srcdir/$subdir/indirect1b.c tmpdir/indirect1b.o]
index 8d7546a88815a3a3fefb31ac8d9973a433493768..3c038164f40e7a7d145abef4e522deaba95f4ed6 100644 (file)
@@ -56,7 +56,7 @@ run_ld_link_exec_tests [list \
        { linux-x86.S pr23428.c dummy.s } \
        "pr23428" \
        "pass.out" \
-       "$NOPIE_CFLAGS $NOSANTIZE_CFLAGS -fno-asynchronous-unwind-tables" \
+       "$NOPIE_CFLAGS $NOSANITIZE_CFLAGS -fno-asynchronous-unwind-tables" \
        "asm" \
     ] \
 ]
index fb04cc3ac89f289be37ed0358a196fc5380a7d1a..87a40a362ed59955079fbf27e6032d910a3ae45c 100644 (file)
@@ -787,16 +787,16 @@ set build_tests {
 run_cc_link_tests [list \
     [list \
        "Build libpr2404a.so" \
-       "-shared $NOSANTIZE_CFLAGS" \
-       "-fPIC $NOSANTIZE_CFLAGS" \
+       "-shared $NOSANITIZE_CFLAGS" \
+       "-fPIC $NOSANITIZE_CFLAGS" \
        {pr2404a.c} \
        {} \
        "libpr2404a.so" \
     ] \
     [list \
        "Build libpr2404n.so" \
-       "-shared -Wl,-z,now $NOSANTIZE_CFLAGS" \
-       "-fPIC $NOSANTIZE_CFLAGS" \
+       "-shared -Wl,-z,now $NOSANITIZE_CFLAGS" \
+       "-fPIC $NOSANITIZE_CFLAGS" \
        {pr2404a.c} \
        {} \
        "libpr2404n.so" \
@@ -804,7 +804,7 @@ run_cc_link_tests [list \
     [list \
        "Build libpr2404b.a" \
        "" \
-       "$NOSANTIZE_CFLAGS" \
+       "$NOSANITIZE_CFLAGS" \
        {pr2404b.c} \
        {} \
        "libpr2404b.a" \
@@ -892,7 +892,7 @@ run_ld_link_tests [list \
        { pr22269-1.c } \
        {{readelf -rW pr22269-1.rd}} \
        "pr22269-1" \
-       "-fPIE -O2 $NOSANTIZE_CFLAGS" \
+       "-fPIE -O2 $NOSANITIZE_CFLAGS" \
     ] \
 ]
 
@@ -1025,16 +1025,16 @@ set run_tests [list \
      "-Wl,--no-as-needed,-rpath=tmpdir -Ltmpdir -lrel" "" \
      {relmain.c} "relmain" "relmain.out" ] \
     [list "Run pr2404" \
-     "$NOSANTIZE_CFLAGS -Wl,--no-as-needed \
+     "$NOSANITIZE_CFLAGS -Wl,--no-as-needed \
       tmpdir/pr2404b.o tmpdir/libpr2404a.so" \
      "" \
      {dummy.c} "pr2404" "pr2404.out" \
-     "$NOSANTIZE_CFLAGS" ] \
+     "$NOSANITIZE_CFLAGS" ] \
     [list "Run pr2404n" \
-     "$NOSANTIZE_CFLAGS -Wl,-z,now \
+     "$NOSANITIZE_CFLAGS -Wl,-z,now \
       -Wl,--no-as-needed tmpdir/pr2404b.o tmpdir/libpr2404n.so" "" \
      {dummy.c} "pr2404n" "pr2404.out" \
-     "$NOSANTIZE_CFLAGS" ] \
+     "$NOSANITIZE_CFLAGS" ] \
     [list "Run pr18458" \
      "-Wl,--no-as-needed,-z,now tmpdir/libpr18458a.so tmpdir/libpr18458b.so" "" \
      {pr18458c.c} "pr18458" "pass.out" ] \
@@ -1104,7 +1104,7 @@ if [check_libdl_available] {
   # sections.
   # Disable all sanitizers.
   set old_CFLAGS "$CFLAGS"
-  append CFLAGS " $NOSANTIZE_CFLAGS"
+  append CFLAGS " $NOSANITIZE_CFLAGS"
   run_ld_link_exec_tests $dlopen_run_tests "*-*-netbsdelf*"
   set CFLAGS "$old_CFLAGS"
 }
@@ -1159,8 +1159,8 @@ set build_cxx_tests {
 run_cc_link_tests [list \
     [list \
        "Build libdnew1a.so with --Bsymbolic-functions --dynamic-list-cpp-new" \
-       "-shared $NOSANTIZE_CFLAGS -Wl,-Bsymbolic-functions,--dynamic-list-cpp-new" \
-       "-fPIC -ansi $NOSANTIZE_CFLAGS" \
+       "-shared $NOSANITIZE_CFLAGS -Wl,-Bsymbolic-functions,--dynamic-list-cpp-new" \
+       "-fPIC -ansi $NOSANITIZE_CFLAGS" \
        {del.cc new.cc} \
        {} \
        "libnew1a.so" \
@@ -1168,8 +1168,8 @@ run_cc_link_tests [list \
     ] \
     [list \
        "Build libdnew1b.so with --dynamic-list-data --dynamic-list-cpp-new" \
-       "-shared $NOSANTIZE_CFLAGS -Wl,--dynamic-list-data,--dynamic-list-cpp-new" \
-       "-fPIC -ansi $NOSANTIZE_CFLAGS" \
+       "-shared $NOSANITIZE_CFLAGS -Wl,--dynamic-list-data,--dynamic-list-cpp-new" \
+       "-fPIC -ansi $NOSANITIZE_CFLAGS" \
        {del.cc new.cc} \
        {} \
        "libnew1b.so" \
@@ -1193,22 +1193,22 @@ set run_cxx_tests {
 run_ld_link_exec_tests [list \
     [list \
        "Run with libnew1a.so" \
-       "-Wl,--no-as-needed tmpdir/libnew1a.so $NOSANTIZE_CFLAGS" \
+       "-Wl,--no-as-needed tmpdir/libnew1a.so $NOSANITIZE_CFLAGS" \
        "" \
        {dl5.cc} \
        "dl5a" \
        "dl5.out" \
-       "-ansi $NOSANTIZE_CFLAGS" \
+       "-ansi $NOSANITIZE_CFLAGS" \
        "c++" \
     ] \
     [list \
        "Run with libnew1b.so" \
-       "-Wl,--no-as-needed tmpdir/libnew1b.so $NOSANTIZE_CFLAGS" \
+       "-Wl,--no-as-needed tmpdir/libnew1b.so $NOSANITIZE_CFLAGS" \
        "" \
        {dl5.cc} \
        "dl5b" \
        "dl5.out" \
-       "-ansi $NOSANTIZE_CFLAGS" \
+       "-ansi $NOSANITIZE_CFLAGS" \
        "c++" \
     ] \
 ]
@@ -1223,7 +1223,7 @@ if { [istarget *-*-linux*]
        [list \
            "Build libpr2404b.a with PIE" \
            "" \
-           "-fPIE $NOSANTIZE_CFLAGS" \
+           "-fPIE $NOSANITIZE_CFLAGS" \
            { pr2404b.c } \
            {} \
            "libpr2404b.a" \
@@ -1309,21 +1309,21 @@ if { [istarget *-*-linux*]
        ] \
        [list \
            "Run pr2404 with PIE" \
-           "-pie $NOSANTIZE_CFLAGS -Wl,--no-as-needed tmpdir/pr2404b.o tmpdir/libpr2404a.so" \
+           "-pie $NOSANITIZE_CFLAGS -Wl,--no-as-needed tmpdir/pr2404b.o tmpdir/libpr2404a.so" \
            "" \
            { dummy.c } \
            "pr2404pie" \
            "pr2404.out" \
-           "-fPIE $NOSANTIZE_CFLAGS" \
+           "-fPIE $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Run pr2404 with PIE (-z now)" \
-           "-pie $NOSANTIZE_CFLAGS -Wl,-z,now -Wl,--no-as-needed tmpdir/pr2404b.o tmpdir/libpr2404n.so" \
+           "-pie $NOSANITIZE_CFLAGS -Wl,-z,now -Wl,--no-as-needed tmpdir/pr2404b.o tmpdir/libpr2404n.so" \
            "" \
            { dummy.c } \
            "pr2404pien" \
            "pr2404.out" \
-           "-fPIE $NOSANTIZE_CFLAGS" \
+           "-fPIE $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Run pr18718" \
@@ -1559,7 +1559,7 @@ if { ([istarget "*-*-linux*"]
            { pr23162a.c } \
            "" \
            "libpr23162a.so" \
-           "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O2 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build pr23162a" \
@@ -1569,7 +1569,7 @@ if { ([istarget "*-*-linux*"]
            { pr23162b.c } \
            {{readelf {-rW} pr23162.rd}} \
            "pr23162a" \
-           "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O0 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build libpr23162b.so" \
@@ -1579,7 +1579,7 @@ if { ([istarget "*-*-linux*"]
            { pr23162a.c } \
            "" \
            "libpr23162b.so" \
-           "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O2 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build pr23162b" \
@@ -1589,7 +1589,7 @@ if { ([istarget "*-*-linux*"]
            { pr23162b.c } \
            {{readelf {-rW} pr23162.rd}} \
            "pr23162b" \
-           "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O0 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build libpr23161a.so" \
@@ -1599,7 +1599,7 @@ if { ([istarget "*-*-linux*"]
            { pr23161a.c } \
            {{readelf {--dyn-syms -rW} pr23161a.rd}} \
            "libpr23161a.so" \
-           "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O2 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build pr23161a" \
@@ -1609,7 +1609,7 @@ if { ([istarget "*-*-linux*"]
            { pr23161b.c } \
            {{readelf {--dyn-syms -rW} pr23161b.rd}} \
            "pr23161a" \
-           "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O0 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build libpr23161b.so" \
@@ -1619,7 +1619,7 @@ if { ([istarget "*-*-linux*"]
            { pr23161a.c } \
            {{readelf {--dyn-syms -rW} pr23161a.rd}} \
            "libpr23161b.so" \
-           "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O2 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build pr23161b" \
@@ -1629,7 +1629,7 @@ if { ([istarget "*-*-linux*"]
            { pr23161b.c } \
            {{readelf {--dyn-syms -rW} pr23161b.rd}} \
            "pr23161b" \
-           "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O0 $NOSANITIZE_CFLAGS" \
        ] \
     ]
 }
@@ -1645,7 +1645,7 @@ if { [istarget "i?86-*-*"]
            { pr23161c.c } \
            {{readelf {--dyn-syms -rW} pr23161c.rd}} \
            "libpr23161c.so" \
-           "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O2 $NOSANITIZE_CFLAGS" \
        ] \
        [list \
            "Build pr23161c" \
@@ -1655,7 +1655,7 @@ if { [istarget "i?86-*-*"]
            { pr23161b.c } \
            {{readelf {--dyn-syms -rW} pr23161d.rd}} \
            "pr23161c" \
-           "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+           "-fPIC -O0 $NOSANITIZE_CFLAGS" \
        ] \
     ]
 }
index 8afbb9f1297ce414596c5d16b563c82e60db1e8c..45d2a84b8b714518a3ff682958ae2c146f5c27c0 100644 (file)
@@ -48,6 +48,6 @@ run_ld_link_tests [list \
        { pr22263-1a.c pr22263-1b.c } \
        {{readelf -r pr22263-1.rd}} \
        "pr22263-1" \
-       "-fPIE -O2 $NOSANTIZE_CFLAGS" \
+       "-fPIE -O2 $NOSANITIZE_CFLAGS" \
     ] \
 ]
index 88dbe46f3bff74f8b98709bfc1b551cbdeb27276..c4836d9c46d1a31fdc67be7cac412f3cea0db654 100644 (file)
@@ -169,9 +169,9 @@ if [istarget nios2*-*-*] {
 
 # Explicitly use "-fcommon" so that even if $CFLAGS includes
 # "-fno-common", these tests are compiled as expected.
-if {   ![ld_compile "$CC $CFLAGS -fcommon $NOSANTIZE_CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
-    || ![ld_compile "$CC $CFLAGS -fcommon $NOSANTIZE_CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o]
-    || ![ld_compile "$CC $CFLAGS $NOSANTIZE_CFLAGS -Wa,--elf-stt-common=yes -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1c.o] } {
+if {   ![ld_compile "$CC $CFLAGS -fcommon $NOSANITIZE_CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
+    || ![ld_compile "$CC $CFLAGS -fcommon $NOSANITIZE_CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o]
+    || ![ld_compile "$CC $CFLAGS $NOSANITIZE_CFLAGS -Wa,--elf-stt-common=yes -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1c.o] } {
     unresolved $test1
     unresolved $test1
     return
index 7fd6270fae02b7cba54d5a26ebe003fa9555e27c..91ff8f1448e5b7bd7e971f87fe3ddf67300823f0 100644 (file)
@@ -489,9 +489,9 @@ proc build_binary { shared pic test source libname other mapfile verexp versymex
     global CC
     global CFLAGS
     global script
-    global NOSANTIZE_CFLAGS
+    global NOSANITIZE_CFLAGS
 
-    if ![ld_compile "$CC -S $pic $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s]     {
+    if ![ld_compile "$CC -S $pic $CFLAGS $NOSANITIZE_CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s]     {
        unresolved "$test"
        return
     }
@@ -688,7 +688,7 @@ proc build_exec { test source execname flags solibname verexp versymexp symexp }
     global objdump
     global CC
     global CFLAGS
-    global NOSANTIZE_CFLAGS
+    global NOSANITIZE_CFLAGS
 
     set shared "--shared --no-undefined-version"
     set script --version-script
@@ -700,7 +700,7 @@ proc build_exec { test source execname flags solibname verexp versymexp symexp }
     }
 
     # Disable all sanitizers.
-    append cc_cmd " $NOSANTIZE_CFLAGS"
+    append cc_cmd " $NOSANITIZE_CFLAGS"
 
     if ![ld_compile $cc_cmd $srcdir/$subdir/$source $tmpdir/$execname.s]     {
        unresolved "$test"
index 673e0a01557106a9961f5e5210976238529000eb..05052cc3ba4fddc353c98c1c7fe64b3c7e8cc654 100644 (file)
@@ -197,7 +197,7 @@ proc visibility_run {visibility} {
     global PLT_CFLAGS
     global NOPIE_CFLAGS
     global COMPRESS_LDFLAG
-    global NOSANTIZE_CFLAGS
+    global NOSANITIZE_CFLAGS
 
     if [ string match $visibility "hidden" ] {
        set VSBCFLAG "-DHIDDEN_TEST"
@@ -236,7 +236,7 @@ proc visibility_run {visibility} {
     } else {
     # Compile the main program.  Make sure that PLT is used since PLT
     # is expected.
-    if ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
+    if ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
        unresolved "visibility ($visibility) (non PIC)"
        unresolved "visibility ($visibility)"
     } else {
@@ -246,8 +246,8 @@ proc visibility_run {visibility} {
        # will need to do more relocation work.  However, note that not
        # using -fpic will cause some of the tests to return different
        # results.  Make sure that PLT is used since PLT is expected.
-       if { ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
-            || ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
+       if { ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
+            || ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
            unresolved "visibility ($visibility) (non PIC)"
        } else {
            # SunOS non PIC shared libraries don't permit some cases of
@@ -335,8 +335,8 @@ proc visibility_run {visibility} {
 
        # Now compile the code using -fpic.
 
-       if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
-           || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
+       if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
+           || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
            unresolved "visibility ($visibility)"
        } else {
            if { [ string match $visibility "protected" ]
@@ -353,7 +353,7 @@ proc visibility_run {visibility} {
        # Don't bother.
     } else {
     # Now do the same tests again, but this time compile main.c PIC.
-    if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
+    if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
        unresolved "visibility ($visibility) (PIC main, non PIC so)"
        unresolved "visibility ($visibility) (PIC main)"
     } else {
@@ -445,7 +445,7 @@ visibility_run protected_undef_def
 visibility_run protected_weak
 visibility_run normal
 
-if { ![ld_compile "$CC -g $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {
+if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {
     unresolved "common hidden symbol"
 } else {
     if ![ld_link $ld tmpdir/common "tmpdir/common.o"] {
@@ -455,10 +455,10 @@ if { ![ld_compile "$CC -g $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/common.c tm
     }
 }
 
-if { ![ld_compile "$CC -g $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
+if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
     unresolved "weak hidden symbol"
 } else {
-   if { ![ld_compile "$CC -g $CFLAGS $NOSANTIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {
+   if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {
        unresolved "weak hidden symbol"
     } else {
        if ![ld_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] {
index 355bfe7e0c21b1ef190d57b4dff3c711411d849d..62478b9e607aad4886ca94bbb530228a03deb91e 100644 (file)
@@ -267,14 +267,14 @@ proc build_lib {test libname objs dynsymexp} {
     global shared
     global srcdir
     global subdir
-    global NOSANTIZE_CFLAGS
+    global NOSANITIZE_CFLAGS
 
     set files ""
     foreach obj $objs {
       set files "$files $tmpdir/$obj"
     }
 
-    if {![ld_link "$CC $NOSANTIZE_CFLAGS" $tmpdir/$libname.so "$shared $files"]} {
+    if {![ld_link "$CC $NOSANITIZE_CFLAGS" $tmpdir/$libname.so "$shared $files"]} {
        fail $test
        return
     }
@@ -294,14 +294,14 @@ proc build_exec { test execname objs flags dat dynsymexp symexp} {
     global srcdir
     global subdir
     global exec_output
-    global NOSANTIZE_CFLAGS
+    global NOSANITIZE_CFLAGS
 
     set files ""
     foreach obj $objs {
       set files "$files $tmpdir/$obj"
     }
 
-    if {![ld_link $CC $tmpdir/$execname "$flags $NOSANTIZE_CFLAGS $files"]} {
+    if {![ld_link $CC $tmpdir/$execname "$flags $NOSANITIZE_CFLAGS $files"]} {
        fail "$test"
        return
     }
@@ -357,7 +357,7 @@ if {[check_lto_available]} {
 }
 
 # Disable all sanitizers.
-append cc_cmd " $NOSANTIZE_CFLAGS"
+append cc_cmd " $NOSANITIZE_CFLAGS"
 
 # Old version of GCC for MIPS default to enabling -fpic
 # and get confused if it is used on the command line.
@@ -438,7 +438,7 @@ run_dump_test $srcdir/$subdir/size2
 
 if {![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/alias.c $tmpdir/alias.o]
     || ![ld_link $cc_cmd $tmpdir/alias.so "$shared $tmpdir/alias.o"]
-    || ![ld_compile "$cc_cmd $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/aliasmain.c $tmpdir/aliasmain.o]
+    || ![ld_compile "$cc_cmd $CFLAGS $NOSANITIZE_CFLAGS" $srcdir/$subdir/aliasmain.c $tmpdir/aliasmain.o]
     || ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref1.c $tmpdir/weakref1.o]
     || ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref2.c $tmpdir/weakref2.o]} then {
     unresolved "ELF weak (alias)"
index 285e7d1cb576370a2b0756c8cacbe6df796906e2..02da44f27a0ccb6e39fe660c8a63c40b78e7d41c 100644 (file)
@@ -23,7 +23,7 @@ if ![check_gc_sections_available] {
     return
 }
 
-set cflags "-ffunction-sections -fdata-sections $NOSANTIZE_CFLAGS"
+set cflags "-ffunction-sections -fdata-sections $NOSANITIZE_CFLAGS"
 set objfile "tmpdir/gc.o"
 
 if { [istarget powerpc*-*-*] && ![istarget powerpc64*-*-*] } {
index 6bd2a6aa440e4715256f33dc9ba7c0a3b5ca7747..adad1e4895ca82de49645932786b71c50ac12af9 100644 (file)
@@ -71,11 +71,11 @@ set lto_link_tests [list \
    "-O2 -flto -fuse-linker-plugin" "-flto -fuse-linker-plugin" \
    {lto-1a.c lto-1b.c} {} "lto-1.exe"] \
   [list "Compile 2" \
-   "" "-O2 -flto -fuse-linker-plugin $NOSANTIZE_CFLAGS" \
+   "" "-O2 -flto -fuse-linker-plugin $NOSANITIZE_CFLAGS" \
    {lto-2.c} {} ""] \
   [list "LTO 2" \
    "-static -O2 -flto -fuse-linker-plugin tmpdir/lto-2.o -lm" \
-   "$NOSANTIZE_CFLAGS" \
+   "$NOSANITIZE_CFLAGS" \
    {dummy.c} {} "lto-2.exe"] \
   [list "Compile 3a" \
    "" "-flto" \
@@ -138,11 +138,11 @@ set lto_link_tests [list \
    "" "" \
    {pr12758a.s} {} ""] \
   [list "Build libpr12758.a" \
-   "" "-flto -O2 $lto_fat $NOSANTIZE_CFLAGS" \
+   "" "-flto -O2 $lto_fat $NOSANITIZE_CFLAGS" \
    {pr12758b.c} {} "libpr12758.a"] \
   [list "PR ld/12758" \
-   "$NOPIE_LDFLAGS $NOSANTIZE_CFLAGS -O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12758a.o -Wl,--start-group tmpdir/libpr12758.a -Wl,--end-group" \
-   "$NOSANTIZE_CFLAGS" \
+   "$NOPIE_LDFLAGS $NOSANITIZE_CFLAGS -O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12758a.o -Wl,--start-group tmpdir/libpr12758.a -Wl,--end-group" \
+   "$NOSANITIZE_CFLAGS" \
    {dummy.c} {} "pr12758.exe"] \
   [list "Build libpr13183.a" \
    "-T" "-flto -O2 $lto_fat" \
@@ -458,12 +458,12 @@ set lto_link_symbol_tests [list \
    "-O2 -flto -fuse-linker-plugin tmpdir/lto-9.o" "" \
    {dummy.c} {{"nm" {-C} "lto-9.d"}} "lto-9.exe" "c++"] \
   [list "LTO 16a symbol" \
-   "-O2 $NOSANTIZE_CFLAGS -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin" \
-   "-flto $NOSANTIZE_CFLAGS" \
+   "-O2 $NOSANITIZE_CFLAGS -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin" \
+   "-flto $NOSANITIZE_CFLAGS" \
    {lto-16a.c} {{"nm" {} "lto-16a.d"}} "lto-16.exe" "c"] \
   [list "LTO 16b symbol" \
-   "-O2 $NOSANTIZE_CFLAGS -Wl,-e,foo -u bar -nostdlib -flto -fuse-linker-plugin" \
-   "-flto $NOSANTIZE_CFLAGS" \
+   "-O2 $NOSANITIZE_CFLAGS -Wl,-e,foo -u bar -nostdlib -flto -fuse-linker-plugin" \
+   "-flto $NOSANITIZE_CFLAGS" \
    {lto-16a.c lto-16b.c} {{"nm" {} "lto-16b.d"}} "lto-16b.exe" "c"] \
   [list "PR ld/13183" \
    "-O2 -flto -fuse-linker-plugin tmpdir/pr13183b.o tmpdir/libpr13183.a" "" \
@@ -669,7 +669,7 @@ if { [at_least_gcc_version 4 7] } {
        run_cc_link_tests [list \
            [list \
                "Build pr22721a.so" \
-               "-shared $NOSANTIZE_CFLAGS -nostdlib -nostartfiles \
+               "-shared $NOSANITIZE_CFLAGS -nostdlib -nostartfiles \
                 -Wl,-version-script,pr22721.t" \
                "" \
                {pr22721a.s} \
@@ -678,16 +678,16 @@ if { [at_least_gcc_version 4 7] } {
            ] \
            [list \
                "Build pr22721b.o" \
-               "$plug_opt $NOSANTIZE_CFLAGS" \
+               "$plug_opt $NOSANITIZE_CFLAGS" \
                "-O2 -fPIC -flto $lto_no_fat" \
                {pr22721b.c} \
            ] \
            [list \
                "Build PR ld/pr22721" \
                "-O2 -flto -fuse-linker-plugin -nostdlib -nostartfiles \
-                $NOSANTIZE_CFLAGS \
+                $NOSANITIZE_CFLAGS \
                 -Wl,-e,_start tmpdir/pr22721b.o tmpdir/pr22721a.so" \
-               "$NOSANTIZE_CFLAGS" \
+               "$NOSANITIZE_CFLAGS" \
                {dummy.c} \
                {} \
                "pr22721.exe"
index 88817ed7531cb4aab13f5c58e9566ab343320045..b30b05f1449eea0e7f3158f609aef22fb329c2b7 100644 (file)
@@ -94,7 +94,7 @@ set failed_compile 0
 set _ ""
 set plugin_nm_output ""
 set old_CFLAGS "$CFLAGS"
-append CFLAGS " $NOSANTIZE_CFLAGS"
+append CFLAGS " $NOSANITIZE_CFLAGS"
 
 if { $can_compile && \
        (![ld_compile "$CC $CFLAGS" $srcdir/$subdir/main.c tmpdir/main.o] \
index 652a0df84c790a962964bd9a06da9aabfe349925..94452f747948ed0a519775034db023f9d418e2d4 100644 (file)
@@ -63,8 +63,8 @@ if [istarget tic6x*-*-*] {
     set CFLAGS "-mno-dsbt -msdata=none"
 }
 
-if { ![ld_compile "$CC $NOSANTIZE_CFLAGS" "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
-     || ![ld_compile "$CC $NOSANTIZE_CFLAGS" "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
+if { ![ld_compile "$CC $NOSANITIZE_CFLAGS" "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
+     || ![ld_compile "$CC $NOSANITIZE_CFLAGS" "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
     unresolved $test1
     unresolved $test2
     set CFLAGS "$old_CFLAGS"
@@ -101,7 +101,7 @@ if [string match "" $exec_output] then {
 
 # Check cross references within a single object.
 
-if { ![ld_compile "$CC $NOSANTIZE_CFLAGS" "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } {
+if { ![ld_compile "$CC $NOSANITIZE_CFLAGS" "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } {
     unresolved $test2
     set CFLAGS "$old_CFLAGS"
     set CC "$old_CC"
@@ -126,7 +126,7 @@ if [string match "" $exec_output] then {
 
 # Check cross references for ld -r
 
-if { ![ld_compile "$CC $NOSANTIZE_CFLAGS" "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } {
+if { ![ld_compile "$CC $NOSANITIZE_CFLAGS" "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } {
     unresolved $test3
     set CFLAGS "$old_CFLAGS"
     set CC "$old_CC"
index ce66dc88e2f6f994257ce89b5ac46b5b7b46731c..f8c143fa15b4949afc8a12146a0e300c2794aabc 100644 (file)
@@ -46,8 +46,8 @@ set seltests {
     {A::foo() B::foo() dropme1() dropme2()} {*-*-*}}
 }
 
-set cflags "-w -O -ffunction-sections -fdata-sections $NOSANTIZE_CFLAGS"
-set cxxflags "-fno-exceptions -fno-rtti $NOSANTIZE_CFLAGS"
+set cflags "-w -O -ffunction-sections -fdata-sections $NOSANITIZE_CFLAGS"
+set cxxflags "-fno-exceptions -fno-rtti $NOSANITIZE_CFLAGS"
 set ldflags "--gc-sections -Bstatic"
 
 if [istarget mips*-*] {
index eb346e9c6ada8101279b026f345623a7ea3db748..a130fffecc70cf006aed5f2d7eecc3901050c172 100644 (file)
@@ -67,7 +67,7 @@ set shared_needs_pic "no"
 
 # Disable all sanitizers.
 set old_CFLAGS "$CFLAGS"
-append CFLAGS " $NOSANTIZE_CFLAGS"
+append CFLAGS " $NOSANITIZE_CFLAGS"
 
 if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
 
index 40d8cda90c786dbe2f0edea8bae1780dc594c701..d859a6a46d5959d8c4ae8e15eb3bdf7dc1205f4c 100644 (file)
@@ -134,8 +134,8 @@ run_cc_link_tests [list \
     ] \
     [list \
        "Build libsize-9.so" \
-       "-shared $NOSANTIZE_CFLAGS" \
-       "-fPIC $NOSANTIZE_CFLAGS" \
+       "-shared $NOSANITIZE_CFLAGS" \
+       "-fPIC $NOSANITIZE_CFLAGS" \
        {size-9b.c} \
        {{readelf -rW size-9.rd}} \
        "libsize-9.so" \
@@ -284,12 +284,12 @@ run_ld_link_exec_tests [list \
     ] \
     [list \
        "Run size-9" \
-       "-Wl,--no-as-needed tmpdir/libsize-9.so $NOSANTIZE_CFLAGS" \
+       "-Wl,--no-as-needed tmpdir/libsize-9.so $NOSANITIZE_CFLAGS" \
        "" \
        {size-9a.c} \
        "size-9" \
        "size-9.out" \
-       "$NOSANTIZE_CFLAGS" \
+       "$NOSANITIZE_CFLAGS" \
     ] \
     [list \
        "Run size-10" \
index 13fc4e1fd7c7363222d97c9e478891709317f457..3b279fe805ca353d6d07a345f54b1c079739aa3e 100644 (file)
@@ -351,11 +351,11 @@ if { ![check_compiler_available] } {
 # Pass -fplt to CC and CXX since -fno-plt doesn't work with S-records
 # tests. Also add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if PIE doesn't work
 # with S-records.  Also add $NOCF_PROTECTION_CFLAGS for S-records.
-# Also add $NOSANTIZE_CFLAGS for S-records.
+# Also add $NOSANITIZE_CFLAGS for S-records.
 set old_CC "$CC"
-set CC "$CC $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS $NOCF_PROTECTION_CFLAGS $NOSANTIZE_CFLAGS"
+set CC "$CC $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS $NOCF_PROTECTION_CFLAGS $NOSANITIZE_CFLAGS"
 set old_CXX "$CXX"
-set CXX "$CXX $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS $NOCF_PROTECTION_CFLAGS $NOSANTIZE_CFLAGS"
+set CXX "$CXX $PLT_CFLAGS $NOPIE_CFLAGS $NOPIE_LDFLAGS $NOCF_PROTECTION_CFLAGS $NOSANITIZE_CFLAGS"
 
 # S-records can't handle .note.gnu.property sections.
 if { [is_elf_format] \
index d836f334963bf55c82ea63ac90edce824ec8cae5..3c0b4347d023e2572a81d0e2a598453e289c041a 100644 (file)
@@ -703,7 +703,7 @@ if { [isnative] && [check_compiler_available] } {
     run_cc_link_tests [list \
        [list \
            "Helper X32 DSO from x86-64 object" "" \
-           "-m64 $NOSANTIZE_CFLAGS -fPIC -g" \
+           "-m64 $NOSANITIZE_CFLAGS -fPIC -g" \
            {simple.c} {} "libsimple.a" \
        ] \
     ]
@@ -721,7 +721,7 @@ if { [isnative] && [check_compiler_available] } {
        [list \
            "X32 DSO from x86-64 object" \
            "-shared -melf32_x86_64 tmpdir/simple-x32.o" \
-           "$NOSANTIZE_CFLAGS" \
+           "$NOSANITIZE_CFLAGS" \
            "--x32 -mx86-used-note=yes" \
            {dummy.s} {{readelf {-s --wide} x86-64-x32.rd}} \
            "x86-64-x32" \