+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
}
}
-# 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 ""
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 ""
}
}
# 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"
}
# 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]
{ 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" \
] \
]
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" \
[list \
"Build libpr2404b.a" \
"" \
- "$NOSANTIZE_CFLAGS" \
+ "$NOSANITIZE_CFLAGS" \
{pr2404b.c} \
{} \
"libpr2404b.a" \
{ pr22269-1.c } \
{{readelf -rW pr22269-1.rd}} \
"pr22269-1" \
- "-fPIE -O2 $NOSANTIZE_CFLAGS" \
+ "-fPIE -O2 $NOSANITIZE_CFLAGS" \
] \
]
"-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" ] \
# 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"
}
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" \
] \
[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" \
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++" \
] \
]
[list \
"Build libpr2404b.a with PIE" \
"" \
- "-fPIE $NOSANTIZE_CFLAGS" \
+ "-fPIE $NOSANITIZE_CFLAGS" \
{ pr2404b.c } \
{} \
"libpr2404b.a" \
] \
[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" \
{ pr23162a.c } \
"" \
"libpr23162a.so" \
- "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build pr23162a" \
{ pr23162b.c } \
{{readelf {-rW} pr23162.rd}} \
"pr23162a" \
- "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build libpr23162b.so" \
{ pr23162a.c } \
"" \
"libpr23162b.so" \
- "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build pr23162b" \
{ pr23162b.c } \
{{readelf {-rW} pr23162.rd}} \
"pr23162b" \
- "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build libpr23161a.so" \
{ pr23161a.c } \
{{readelf {--dyn-syms -rW} pr23161a.rd}} \
"libpr23161a.so" \
- "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build pr23161a" \
{ pr23161b.c } \
{{readelf {--dyn-syms -rW} pr23161b.rd}} \
"pr23161a" \
- "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build libpr23161b.so" \
{ pr23161a.c } \
{{readelf {--dyn-syms -rW} pr23161a.rd}} \
"libpr23161b.so" \
- "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build pr23161b" \
{ pr23161b.c } \
{{readelf {--dyn-syms -rW} pr23161b.rd}} \
"pr23161b" \
- "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \
]
}
{ pr23161c.c } \
{{readelf {--dyn-syms -rW} pr23161c.rd}} \
"libpr23161c.so" \
- "-fPIC -O2 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \
[list \
"Build pr23161c" \
{ pr23161b.c } \
{{readelf {--dyn-syms -rW} pr23161d.rd}} \
"pr23161c" \
- "-fPIC -O0 $NOSANTIZE_CFLAGS" \
+ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \
]
}
{ pr22263-1a.c pr22263-1b.c } \
{{readelf -r pr22263-1.rd}} \
"pr22263-1" \
- "-fPIE -O2 $NOSANTIZE_CFLAGS" \
+ "-fPIE -O2 $NOSANITIZE_CFLAGS" \
] \
]
# 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
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
}
global objdump
global CC
global CFLAGS
- global NOSANTIZE_CFLAGS
+ global NOSANITIZE_CFLAGS
set shared "--shared --no-undefined-version"
set script --version-script
}
# 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"
global PLT_CFLAGS
global NOPIE_CFLAGS
global COMPRESS_LDFLAG
- global NOSANTIZE_CFLAGS
+ global NOSANITIZE_CFLAGS
if [ string match $visibility "hidden" ] {
set VSBCFLAG "-DHIDDEN_TEST"
} 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 {
# 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
# 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" ]
# 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 {
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"] {
}
}
-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"] {
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
}
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
}
}
# 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.
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)"
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*-*-*] } {
"-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" \
"" "" \
{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" \
"-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" "" \
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} \
] \
[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"
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] \
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"
# 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"
# 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"
{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*-*] {
# Disable all sanitizers.
set old_CFLAGS "$CFLAGS"
-append CFLAGS " $NOSANTIZE_CFLAGS"
+append CFLAGS " $NOSANITIZE_CFLAGS"
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
] \
[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" \
] \
[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" \
# 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] \
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" \
] \
]
[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" \