* [PATCH] ld: Add $NOSANTIZE_CFLAGS to more linker tests
@ 2020-08-30 14:28 H.J. Lu
2020-09-03 23:01 ` Hans-Peter Nilsson
0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 2020-08-30 14:28 UTC (permalink / raw)
To: binutils
* testsuite/ld-elf/dwarf.exp: Append $NOSANTIZE_CFLAGS to CFLAGS.
* testsuite/ld-elf/shared.exp: Likewise.
* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
* testsuite/ld-shared/shared.exp: Likewise.
* testsuite/ld-size/size.exp: Likewise.
---
ld/ChangeLog | 8 ++++++++
ld/testsuite/ld-elf/dwarf.exp | 4 ++++
ld/testsuite/ld-elf/shared.exp | 4 ++++
ld/testsuite/ld-elfvsb/elfvsb.exp | 13 +++++++------
ld/testsuite/ld-shared/shared.exp | 6 ++++++
ld/testsuite/ld-size/size.exp | 7 ++++---
6 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 77e39a5614..0138e88db0 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,11 @@
+2020-08-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/ld-elf/dwarf.exp: Append $NOSANTIZE_CFLAGS to CFLAGS.
+ * testsuite/ld-elf/shared.exp: Likewise.
+ * testsuite/ld-elfvsb/elfvsb.exp: Likewise.
+ * testsuite/ld-shared/shared.exp: Likewise.
+ * testsuite/ld-size/size.exp: Likewise.
+
2020-08-28 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* emultempl/msp430.em (input_section_exists): New.
diff --git a/ld/testsuite/ld-elf/dwarf.exp b/ld/testsuite/ld-elf/dwarf.exp
index 4d2c35d540..93fd21d8f3 100644
--- a/ld/testsuite/ld-elf/dwarf.exp
+++ b/ld/testsuite/ld-elf/dwarf.exp
@@ -68,8 +68,12 @@ set run_tests {
"-g -feliminate-dwarf2-dups"}
}
+# Disable all sanitizers.
+set old_CFLAGS "$CFLAGS"
+append CFLAGS " $NOSANTIZE_CFLAGS"
run_cc_link_tests $build_tests
run_ld_link_exec_tests $run_tests
+set CFLAGS "$old_CFLAGS"
proc strip_test {} {
global ld
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 66da7203df..fb04cc3ac8 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -1102,7 +1102,11 @@ set dlopen_run_tests [list \
if [check_libdl_available] {
# XFAIL on NetBSD ELF systems as they do not currently support the .*_array
# sections.
+ # Disable all sanitizers.
+ set old_CFLAGS "$CFLAGS"
+ append CFLAGS " $NOSANTIZE_CFLAGS"
run_ld_link_exec_tests $dlopen_run_tests "*-*-netbsdelf*"
+ set CFLAGS "$old_CFLAGS"
}
# Check --no-add-needed and --no-copy-dt-needed-entries
diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp
index 3a242d3527..673e0a0155 100644
--- a/ld/testsuite/ld-elfvsb/elfvsb.exp
+++ b/ld/testsuite/ld-elfvsb/elfvsb.exp
@@ -197,6 +197,7 @@ proc visibility_run {visibility} {
global PLT_CFLAGS
global NOPIE_CFLAGS
global COMPRESS_LDFLAG
+ global NOSANTIZE_CFLAGS
if [ string match $visibility "hidden" ] {
set VSBCFLAG "-DHIDDEN_TEST"
@@ -235,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" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
+ if ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
unresolved "visibility ($visibility) (non PIC)"
unresolved "visibility ($visibility)"
} else {
@@ -245,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" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
- || ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
+ 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] } {
unresolved "visibility ($visibility) (non PIC)"
} else {
# SunOS non PIC shared libraries don't permit some cases of
@@ -334,8 +335,8 @@ proc visibility_run {visibility} {
# Now compile the code using -fpic.
- if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
- || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
+ 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] } {
unresolved "visibility ($visibility)"
} else {
if { [ string match $visibility "protected" ]
@@ -352,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 -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
+ if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANTIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
unresolved "visibility ($visibility) (PIC main, non PIC so)"
unresolved "visibility ($visibility) (PIC main)"
} else {
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index fa64730775..eb346e9c6a 100644
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -65,6 +65,10 @@ set tmpdir tmpdir
set SHCFLAG ""
set shared_needs_pic "no"
+# Disable all sanitizers.
+set old_CFLAGS "$CFLAGS"
+append CFLAGS " $NOSANTIZE_CFLAGS"
+
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
# AIX shared libraries do not seem to support useful features,
@@ -343,6 +347,8 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
}
}
+set CFLAGS "$old_CFLAGS"
+
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
# Remove the temporary directory.
catch "exec rm -rf $tmpdir" exec_status
diff --git a/ld/testsuite/ld-size/size.exp b/ld/testsuite/ld-size/size.exp
index 8a9459993a..40d8cda90c 100644
--- a/ld/testsuite/ld-size/size.exp
+++ b/ld/testsuite/ld-size/size.exp
@@ -134,8 +134,8 @@ run_cc_link_tests [list \
] \
[list \
"Build libsize-9.so" \
- "-shared" \
- "-fPIC" \
+ "-shared $NOSANTIZE_CFLAGS" \
+ "-fPIC $NOSANTIZE_CFLAGS" \
{size-9b.c} \
{{readelf -rW size-9.rd}} \
"libsize-9.so" \
@@ -284,11 +284,12 @@ run_ld_link_exec_tests [list \
] \
[list \
"Run size-9" \
- "-Wl,--no-as-needed tmpdir/libsize-9.so" \
+ "-Wl,--no-as-needed tmpdir/libsize-9.so $NOSANTIZE_CFLAGS" \
"" \
{size-9a.c} \
"size-9" \
"size-9.out" \
+ "$NOSANTIZE_CFLAGS" \
] \
[list \
"Run size-10" \
--
2.26.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ld: Add $NOSANTIZE_CFLAGS to more linker tests
2020-08-30 14:28 [PATCH] ld: Add $NOSANTIZE_CFLAGS to more linker tests H.J. Lu
@ 2020-09-03 23:01 ` Hans-Peter Nilsson
2020-09-03 23:06 ` H.J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Hans-Peter Nilsson @ 2020-09-03 23:01 UTC (permalink / raw)
To: H.J. Lu; +Cc: binutils
On Sun, 30 Aug 2020, H.J. Lu via Binutils wrote:
> * testsuite/ld-elf/dwarf.exp: Append $NOSANTIZE_CFLAGS to CFLAGS.
Fix typo everywhere, in patch and previously committed?
s/SANTIZE/SANITIZE/.
brgds, H-P
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ld: Add $NOSANTIZE_CFLAGS to more linker tests
2020-09-03 23:01 ` Hans-Peter Nilsson
@ 2020-09-03 23:06 ` H.J. Lu
2020-09-03 23:22 ` Hans-Peter Nilsson
0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 2020-09-03 23:06 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Binutils
Yes, please. Thanks.
On Thu, Sep 3, 2020, 4:01 PM Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Sun, 30 Aug 2020, H.J. Lu via Binutils wrote:
> > * testsuite/ld-elf/dwarf.exp: Append $NOSANTIZE_CFLAGS to CFLAGS.
>
> Fix typo everywhere, in patch and previously committed?
>
> s/SANTIZE/SANITIZE/.
>
> brgds, H-P
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ld: Add $NOSANTIZE_CFLAGS to more linker tests
2020-09-03 23:06 ` H.J. Lu
@ 2020-09-03 23:22 ` Hans-Peter Nilsson
2020-09-04 0:45 ` [PATCH] ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS H.J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Hans-Peter Nilsson @ 2020-09-03 23:22 UTC (permalink / raw)
To: H.J. Lu; +Cc: Binutils
On Thu, 3 Sep 2020, H.J. Lu wrote:
> Yes, please. Thanks.
> On Thu, Sep 3, 2020, 4:01 PM Hans-Peter Nilsson <hp@bitrange.com> wrote:
> > s/SANTIZE/SANITIZE/.
FAOD: I'm suggesting a fix, not volunteering the legwork.
brgds, H-P
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS
2020-09-03 23:22 ` Hans-Peter Nilsson
@ 2020-09-04 0:45 ` H.J. Lu
0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 2020-09-04 0:45 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Binutils
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
On Thu, Sep 3, 2020 at 4:22 PM Hans-Peter Nilsson <hp@bitrange.com> wrote:
>
> On Thu, 3 Sep 2020, H.J. Lu wrote:
> > Yes, please. Thanks.
>
> > On Thu, Sep 3, 2020, 4:01 PM Hans-Peter Nilsson <hp@bitrange.com> wrote:
> > > s/SANTIZE/SANITIZE/.
>
> FAOD: I'm suggesting a fix, not volunteering the legwork.
>
> brgds, H-P
This is what I am checking in.
--
H.J.
[-- Attachment #2: 0001-ld-Change-NOSANTIZE_CFLAGS-to-NOSANITIZE_CFLAGS.patch --]
[-- Type: text/x-patch, Size: 31838 bytes --]
From e062fcc8c2bf4c36386dce68ba7f1d408f22dedc Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 3 Sep 2020 17:17:19 -0700
Subject: [PATCH] ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS
* 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.
---
ld/ChangeLog | 23 +++++++++
ld/testsuite/config/default.exp | 10 ++--
ld/testsuite/ld-elf/dwarf.exp | 2 +-
ld/testsuite/ld-elf/indirect.exp | 2 +-
ld/testsuite/ld-elf/linux-x86.exp | 2 +-
ld/testsuite/ld-elf/shared.exp | 68 ++++++++++++-------------
ld/testsuite/ld-elf/tls.exp | 2 +-
ld/testsuite/ld-elfcomm/elfcomm.exp | 6 +--
ld/testsuite/ld-elfvers/vers.exp | 8 +--
ld/testsuite/ld-elfvsb/elfvsb.exp | 20 ++++----
ld/testsuite/ld-elfweak/elfweak.exp | 12 ++---
ld/testsuite/ld-gc/gc.exp | 2 +-
ld/testsuite/ld-plugin/lto.exp | 26 +++++-----
ld/testsuite/ld-plugin/plugin.exp | 2 +-
ld/testsuite/ld-scripts/crossref.exp | 8 +--
ld/testsuite/ld-selective/selective.exp | 4 +-
ld/testsuite/ld-shared/shared.exp | 2 +-
ld/testsuite/ld-size/size.exp | 8 +--
ld/testsuite/ld-srec/srec.exp | 6 +--
ld/testsuite/ld-x86-64/x86-64.exp | 4 +-
20 files changed, 120 insertions(+), 97 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 261390a94f..0fcbf0d6c2 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 9e89ca1283..58ca4a278c 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -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 ""
}
}
diff --git a/ld/testsuite/ld-elf/dwarf.exp b/ld/testsuite/ld-elf/dwarf.exp
index 93fd21d8f3..65b61ce04b 100644
--- a/ld/testsuite/ld-elf/dwarf.exp
+++ b/ld/testsuite/ld-elf/dwarf.exp
@@ -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"
diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp
index 9451b21383..bed1dfdb7b 100644
--- a/ld/testsuite/ld-elf/indirect.exp
+++ b/ld/testsuite/ld-elf/indirect.exp
@@ -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]
diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp
index 8d7546a888..3c038164f4 100644
--- a/ld/testsuite/ld-elf/linux-x86.exp
+++ b/ld/testsuite/ld-elf/linux-x86.exp
@@ -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" \
] \
]
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index fb04cc3ac8..87a40a362e 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -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" \
] \
]
}
diff --git a/ld/testsuite/ld-elf/tls.exp b/ld/testsuite/ld-elf/tls.exp
index 8afbb9f129..45d2a84b8b 100644
--- a/ld/testsuite/ld-elf/tls.exp
+++ b/ld/testsuite/ld-elf/tls.exp
@@ -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" \
] \
]
diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp
index 88dbe46f3b..c4836d9c46 100644
--- a/ld/testsuite/ld-elfcomm/elfcomm.exp
+++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
@@ -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
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index 7fd6270fae..91ff8f1448 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -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"
diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp
index 673e0a0155..05052cc3ba 100644
--- a/ld/testsuite/ld-elfvsb/elfvsb.exp
+++ b/ld/testsuite/ld-elfvsb/elfvsb.exp
@@ -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"] {
diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp
index 355bfe7e0c..62478b9e60 100644
--- a/ld/testsuite/ld-elfweak/elfweak.exp
+++ b/ld/testsuite/ld-elfweak/elfweak.exp
@@ -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)"
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 285e7d1cb5..02da44f27a 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -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*-*-*] } {
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 6bd2a6aa44..adad1e4895 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -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"
diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp
index 88817ed753..b30b05f144 100644
--- a/ld/testsuite/ld-plugin/plugin.exp
+++ b/ld/testsuite/ld-plugin/plugin.exp
@@ -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] \
diff --git a/ld/testsuite/ld-scripts/crossref.exp b/ld/testsuite/ld-scripts/crossref.exp
index 652a0df84c..94452f7479 100644
--- a/ld/testsuite/ld-scripts/crossref.exp
+++ b/ld/testsuite/ld-scripts/crossref.exp
@@ -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"
diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp
index ce66dc88e2..f8c143fa15 100644
--- a/ld/testsuite/ld-selective/selective.exp
+++ b/ld/testsuite/ld-selective/selective.exp
@@ -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*-*] {
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index eb346e9c6a..a130fffecc 100644
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -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*] } {
diff --git a/ld/testsuite/ld-size/size.exp b/ld/testsuite/ld-size/size.exp
index 40d8cda90c..d859a6a46d 100644
--- a/ld/testsuite/ld-size/size.exp
+++ b/ld/testsuite/ld-size/size.exp
@@ -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" \
diff --git a/ld/testsuite/ld-srec/srec.exp b/ld/testsuite/ld-srec/srec.exp
index 13fc4e1fd7..3b279fe805 100644
--- a/ld/testsuite/ld-srec/srec.exp
+++ b/ld/testsuite/ld-srec/srec.exp
@@ -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] \
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index d836f33496..3c0b4347d0 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -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" \
--
2.26.2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-04 0:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-30 14:28 [PATCH] ld: Add $NOSANTIZE_CFLAGS to more linker tests H.J. Lu
2020-09-03 23:01 ` Hans-Peter Nilsson
2020-09-03 23:06 ` H.J. Lu
2020-09-03 23:22 ` Hans-Peter Nilsson
2020-09-04 0:45 ` [PATCH] ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).