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.
This commit is contained in:
H.J. Lu
2020-09-03 17:17:19 -07:00
parent cdafde0beb
commit e062fcc8c2
20 changed files with 120 additions and 97 deletions

View 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> 2020-09-03 Nelson Chu <nelson.chu@sifive.com>
* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Remove * testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Remove

View 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. # supports it.
if { ![info exists NOSANTIZE_CFLAGS] } then { if { ![info exists NOSANITIZE_CFLAGS] } then {
if { [check_compiler_available] } { if { [check_compiler_available] } {
# Check if gcc supports -fno-sanitize=all. # Check if gcc supports -fno-sanitize=all.
set flags "" set flags ""
@ -605,11 +605,11 @@ if { ![info exists NOSANTIZE_CFLAGS] } then {
file delete $src file delete $src
if { $available == 1 } then { if { $available == 1 } then {
set NOSANTIZE_CFLAGS "-fno-sanitize=all" set NOSANITIZE_CFLAGS "-fno-sanitize=all"
} else { } else {
set NOSANTIZE_CFLAGS "" set NOSANITIZE_CFLAGS ""
} }
} else { } else {
set NOSANTIZE_CFLAGS "" set NOSANITIZE_CFLAGS ""
} }
} }

View File

@ -70,7 +70,7 @@ set run_tests {
# Disable all sanitizers. # Disable all sanitizers.
set old_CFLAGS "$CFLAGS" set old_CFLAGS "$CFLAGS"
append CFLAGS " $NOSANTIZE_CFLAGS" append CFLAGS " $NOSANITIZE_CFLAGS"
run_cc_link_tests $build_tests run_cc_link_tests $build_tests
run_ld_link_exec_tests $run_tests run_ld_link_exec_tests $run_tests
set CFLAGS "$old_CFLAGS" set CFLAGS "$old_CFLAGS"

View File

@ -65,7 +65,7 @@ if {[check_lto_available]} {
} }
# Disable all sanitizers. # 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] if { ![ld_compile $cc_cmd $srcdir/$subdir/indirect1a.c tmpdir/indirect1a.o]
|| ![ld_compile $cc_cmd $srcdir/$subdir/indirect1b.c tmpdir/indirect1b.o] || ![ld_compile $cc_cmd $srcdir/$subdir/indirect1b.c tmpdir/indirect1b.o]

View File

@ -56,7 +56,7 @@ run_ld_link_exec_tests [list \
{ linux-x86.S pr23428.c dummy.s } \ { linux-x86.S pr23428.c dummy.s } \
"pr23428" \ "pr23428" \
"pass.out" \ "pass.out" \
"$NOPIE_CFLAGS $NOSANTIZE_CFLAGS -fno-asynchronous-unwind-tables" \ "$NOPIE_CFLAGS $NOSANITIZE_CFLAGS -fno-asynchronous-unwind-tables" \
"asm" \ "asm" \
] \ ] \
] ]

View File

@ -787,16 +787,16 @@ set build_tests {
run_cc_link_tests [list \ run_cc_link_tests [list \
[list \ [list \
"Build libpr2404a.so" \ "Build libpr2404a.so" \
"-shared $NOSANTIZE_CFLAGS" \ "-shared $NOSANITIZE_CFLAGS" \
"-fPIC $NOSANTIZE_CFLAGS" \ "-fPIC $NOSANITIZE_CFLAGS" \
{pr2404a.c} \ {pr2404a.c} \
{} \ {} \
"libpr2404a.so" \ "libpr2404a.so" \
] \ ] \
[list \ [list \
"Build libpr2404n.so" \ "Build libpr2404n.so" \
"-shared -Wl,-z,now $NOSANTIZE_CFLAGS" \ "-shared -Wl,-z,now $NOSANITIZE_CFLAGS" \
"-fPIC $NOSANTIZE_CFLAGS" \ "-fPIC $NOSANITIZE_CFLAGS" \
{pr2404a.c} \ {pr2404a.c} \
{} \ {} \
"libpr2404n.so" \ "libpr2404n.so" \
@ -804,7 +804,7 @@ run_cc_link_tests [list \
[list \ [list \
"Build libpr2404b.a" \ "Build libpr2404b.a" \
"" \ "" \
"$NOSANTIZE_CFLAGS" \ "$NOSANITIZE_CFLAGS" \
{pr2404b.c} \ {pr2404b.c} \
{} \ {} \
"libpr2404b.a" \ "libpr2404b.a" \
@ -892,7 +892,7 @@ run_ld_link_tests [list \
{ pr22269-1.c } \ { pr22269-1.c } \
{{readelf -rW pr22269-1.rd}} \ {{readelf -rW pr22269-1.rd}} \
"pr22269-1" \ "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" "" \ "-Wl,--no-as-needed,-rpath=tmpdir -Ltmpdir -lrel" "" \
{relmain.c} "relmain" "relmain.out" ] \ {relmain.c} "relmain" "relmain.out" ] \
[list "Run pr2404" \ [list "Run pr2404" \
"$NOSANTIZE_CFLAGS -Wl,--no-as-needed \ "$NOSANITIZE_CFLAGS -Wl,--no-as-needed \
tmpdir/pr2404b.o tmpdir/libpr2404a.so" \ tmpdir/pr2404b.o tmpdir/libpr2404a.so" \
"" \ "" \
{dummy.c} "pr2404" "pr2404.out" \ {dummy.c} "pr2404" "pr2404.out" \
"$NOSANTIZE_CFLAGS" ] \ "$NOSANITIZE_CFLAGS" ] \
[list "Run pr2404n" \ [list "Run pr2404n" \
"$NOSANTIZE_CFLAGS -Wl,-z,now \ "$NOSANITIZE_CFLAGS -Wl,-z,now \
-Wl,--no-as-needed tmpdir/pr2404b.o tmpdir/libpr2404n.so" "" \ -Wl,--no-as-needed tmpdir/pr2404b.o tmpdir/libpr2404n.so" "" \
{dummy.c} "pr2404n" "pr2404.out" \ {dummy.c} "pr2404n" "pr2404.out" \
"$NOSANTIZE_CFLAGS" ] \ "$NOSANITIZE_CFLAGS" ] \
[list "Run pr18458" \ [list "Run pr18458" \
"-Wl,--no-as-needed,-z,now tmpdir/libpr18458a.so tmpdir/libpr18458b.so" "" \ "-Wl,--no-as-needed,-z,now tmpdir/libpr18458a.so tmpdir/libpr18458b.so" "" \
{pr18458c.c} "pr18458" "pass.out" ] \ {pr18458c.c} "pr18458" "pass.out" ] \
@ -1104,7 +1104,7 @@ if [check_libdl_available] {
# sections. # sections.
# Disable all sanitizers. # Disable all sanitizers.
set old_CFLAGS "$CFLAGS" set old_CFLAGS "$CFLAGS"
append CFLAGS " $NOSANTIZE_CFLAGS" append CFLAGS " $NOSANITIZE_CFLAGS"
run_ld_link_exec_tests $dlopen_run_tests "*-*-netbsdelf*" run_ld_link_exec_tests $dlopen_run_tests "*-*-netbsdelf*"
set CFLAGS "$old_CFLAGS" set CFLAGS "$old_CFLAGS"
} }
@ -1159,8 +1159,8 @@ set build_cxx_tests {
run_cc_link_tests [list \ run_cc_link_tests [list \
[list \ [list \
"Build libdnew1a.so with --Bsymbolic-functions --dynamic-list-cpp-new" \ "Build libdnew1a.so with --Bsymbolic-functions --dynamic-list-cpp-new" \
"-shared $NOSANTIZE_CFLAGS -Wl,-Bsymbolic-functions,--dynamic-list-cpp-new" \ "-shared $NOSANITIZE_CFLAGS -Wl,-Bsymbolic-functions,--dynamic-list-cpp-new" \
"-fPIC -ansi $NOSANTIZE_CFLAGS" \ "-fPIC -ansi $NOSANITIZE_CFLAGS" \
{del.cc new.cc} \ {del.cc new.cc} \
{} \ {} \
"libnew1a.so" \ "libnew1a.so" \
@ -1168,8 +1168,8 @@ run_cc_link_tests [list \
] \ ] \
[list \ [list \
"Build libdnew1b.so with --dynamic-list-data --dynamic-list-cpp-new" \ "Build libdnew1b.so with --dynamic-list-data --dynamic-list-cpp-new" \
"-shared $NOSANTIZE_CFLAGS -Wl,--dynamic-list-data,--dynamic-list-cpp-new" \ "-shared $NOSANITIZE_CFLAGS -Wl,--dynamic-list-data,--dynamic-list-cpp-new" \
"-fPIC -ansi $NOSANTIZE_CFLAGS" \ "-fPIC -ansi $NOSANITIZE_CFLAGS" \
{del.cc new.cc} \ {del.cc new.cc} \
{} \ {} \
"libnew1b.so" \ "libnew1b.so" \
@ -1193,22 +1193,22 @@ set run_cxx_tests {
run_ld_link_exec_tests [list \ run_ld_link_exec_tests [list \
[list \ [list \
"Run with libnew1a.so" \ "Run with libnew1a.so" \
"-Wl,--no-as-needed tmpdir/libnew1a.so $NOSANTIZE_CFLAGS" \ "-Wl,--no-as-needed tmpdir/libnew1a.so $NOSANITIZE_CFLAGS" \
"" \ "" \
{dl5.cc} \ {dl5.cc} \
"dl5a" \ "dl5a" \
"dl5.out" \ "dl5.out" \
"-ansi $NOSANTIZE_CFLAGS" \ "-ansi $NOSANITIZE_CFLAGS" \
"c++" \ "c++" \
] \ ] \
[list \ [list \
"Run with libnew1b.so" \ "Run with libnew1b.so" \
"-Wl,--no-as-needed tmpdir/libnew1b.so $NOSANTIZE_CFLAGS" \ "-Wl,--no-as-needed tmpdir/libnew1b.so $NOSANITIZE_CFLAGS" \
"" \ "" \
{dl5.cc} \ {dl5.cc} \
"dl5b" \ "dl5b" \
"dl5.out" \ "dl5.out" \
"-ansi $NOSANTIZE_CFLAGS" \ "-ansi $NOSANITIZE_CFLAGS" \
"c++" \ "c++" \
] \ ] \
] ]
@ -1223,7 +1223,7 @@ if { [istarget *-*-linux*]
[list \ [list \
"Build libpr2404b.a with PIE" \ "Build libpr2404b.a with PIE" \
"" \ "" \
"-fPIE $NOSANTIZE_CFLAGS" \ "-fPIE $NOSANITIZE_CFLAGS" \
{ pr2404b.c } \ { pr2404b.c } \
{} \ {} \
"libpr2404b.a" \ "libpr2404b.a" \
@ -1309,21 +1309,21 @@ if { [istarget *-*-linux*]
] \ ] \
[list \ [list \
"Run pr2404 with PIE" \ "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 } \ { dummy.c } \
"pr2404pie" \ "pr2404pie" \
"pr2404.out" \ "pr2404.out" \
"-fPIE $NOSANTIZE_CFLAGS" \ "-fPIE $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Run pr2404 with PIE (-z now)" \ "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 } \ { dummy.c } \
"pr2404pien" \ "pr2404pien" \
"pr2404.out" \ "pr2404.out" \
"-fPIE $NOSANTIZE_CFLAGS" \ "-fPIE $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Run pr18718" \ "Run pr18718" \
@ -1559,7 +1559,7 @@ if { ([istarget "*-*-linux*"]
{ pr23162a.c } \ { pr23162a.c } \
"" \ "" \
"libpr23162a.so" \ "libpr23162a.so" \
"-fPIC -O2 $NOSANTIZE_CFLAGS" \ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build pr23162a" \ "Build pr23162a" \
@ -1569,7 +1569,7 @@ if { ([istarget "*-*-linux*"]
{ pr23162b.c } \ { pr23162b.c } \
{{readelf {-rW} pr23162.rd}} \ {{readelf {-rW} pr23162.rd}} \
"pr23162a" \ "pr23162a" \
"-fPIC -O0 $NOSANTIZE_CFLAGS" \ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build libpr23162b.so" \ "Build libpr23162b.so" \
@ -1579,7 +1579,7 @@ if { ([istarget "*-*-linux*"]
{ pr23162a.c } \ { pr23162a.c } \
"" \ "" \
"libpr23162b.so" \ "libpr23162b.so" \
"-fPIC -O2 $NOSANTIZE_CFLAGS" \ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build pr23162b" \ "Build pr23162b" \
@ -1589,7 +1589,7 @@ if { ([istarget "*-*-linux*"]
{ pr23162b.c } \ { pr23162b.c } \
{{readelf {-rW} pr23162.rd}} \ {{readelf {-rW} pr23162.rd}} \
"pr23162b" \ "pr23162b" \
"-fPIC -O0 $NOSANTIZE_CFLAGS" \ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build libpr23161a.so" \ "Build libpr23161a.so" \
@ -1599,7 +1599,7 @@ if { ([istarget "*-*-linux*"]
{ pr23161a.c } \ { pr23161a.c } \
{{readelf {--dyn-syms -rW} pr23161a.rd}} \ {{readelf {--dyn-syms -rW} pr23161a.rd}} \
"libpr23161a.so" \ "libpr23161a.so" \
"-fPIC -O2 $NOSANTIZE_CFLAGS" \ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build pr23161a" \ "Build pr23161a" \
@ -1609,7 +1609,7 @@ if { ([istarget "*-*-linux*"]
{ pr23161b.c } \ { pr23161b.c } \
{{readelf {--dyn-syms -rW} pr23161b.rd}} \ {{readelf {--dyn-syms -rW} pr23161b.rd}} \
"pr23161a" \ "pr23161a" \
"-fPIC -O0 $NOSANTIZE_CFLAGS" \ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build libpr23161b.so" \ "Build libpr23161b.so" \
@ -1619,7 +1619,7 @@ if { ([istarget "*-*-linux*"]
{ pr23161a.c } \ { pr23161a.c } \
{{readelf {--dyn-syms -rW} pr23161a.rd}} \ {{readelf {--dyn-syms -rW} pr23161a.rd}} \
"libpr23161b.so" \ "libpr23161b.so" \
"-fPIC -O2 $NOSANTIZE_CFLAGS" \ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build pr23161b" \ "Build pr23161b" \
@ -1629,7 +1629,7 @@ if { ([istarget "*-*-linux*"]
{ pr23161b.c } \ { pr23161b.c } \
{{readelf {--dyn-syms -rW} pr23161b.rd}} \ {{readelf {--dyn-syms -rW} pr23161b.rd}} \
"pr23161b" \ "pr23161b" \
"-fPIC -O0 $NOSANTIZE_CFLAGS" \ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \ ] \
] ]
} }
@ -1645,7 +1645,7 @@ if { [istarget "i?86-*-*"]
{ pr23161c.c } \ { pr23161c.c } \
{{readelf {--dyn-syms -rW} pr23161c.rd}} \ {{readelf {--dyn-syms -rW} pr23161c.rd}} \
"libpr23161c.so" \ "libpr23161c.so" \
"-fPIC -O2 $NOSANTIZE_CFLAGS" \ "-fPIC -O2 $NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Build pr23161c" \ "Build pr23161c" \
@ -1655,7 +1655,7 @@ if { [istarget "i?86-*-*"]
{ pr23161b.c } \ { pr23161b.c } \
{{readelf {--dyn-syms -rW} pr23161d.rd}} \ {{readelf {--dyn-syms -rW} pr23161d.rd}} \
"pr23161c" \ "pr23161c" \
"-fPIC -O0 $NOSANTIZE_CFLAGS" \ "-fPIC -O0 $NOSANITIZE_CFLAGS" \
] \ ] \
] ]
} }

View File

@ -48,6 +48,6 @@ run_ld_link_tests [list \
{ pr22263-1a.c pr22263-1b.c } \ { pr22263-1a.c pr22263-1b.c } \
{{readelf -r pr22263-1.rd}} \ {{readelf -r pr22263-1.rd}} \
"pr22263-1" \ "pr22263-1" \
"-fPIE -O2 $NOSANTIZE_CFLAGS" \ "-fPIE -O2 $NOSANITIZE_CFLAGS" \
] \ ] \
] ]

View File

@ -169,9 +169,9 @@ if [istarget nios2*-*-*] {
# Explicitly use "-fcommon" so that even if $CFLAGS includes # Explicitly use "-fcommon" so that even if $CFLAGS includes
# "-fno-common", these tests are compiled as expected. # "-fno-common", these tests are compiled as expected.
if { ![ld_compile "$CC $CFLAGS -fcommon $NOSANTIZE_CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o] if { ![ld_compile "$CC $CFLAGS -fcommon $NOSANITIZE_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 -fcommon $NOSANITIZE_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] } { || ![ld_compile "$CC $CFLAGS $NOSANITIZE_CFLAGS -Wa,--elf-stt-common=yes -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1c.o] } {
unresolved $test1 unresolved $test1
unresolved $test1 unresolved $test1
return return

View File

@ -489,9 +489,9 @@ proc build_binary { shared pic test source libname other mapfile verexp versymex
global CC global CC
global CFLAGS global CFLAGS
global script 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" unresolved "$test"
return return
} }
@ -688,7 +688,7 @@ proc build_exec { test source execname flags solibname verexp versymexp symexp }
global objdump global objdump
global CC global CC
global CFLAGS global CFLAGS
global NOSANTIZE_CFLAGS global NOSANITIZE_CFLAGS
set shared "--shared --no-undefined-version" set shared "--shared --no-undefined-version"
set script --version-script set script --version-script
@ -700,7 +700,7 @@ proc build_exec { test source execname flags solibname verexp versymexp symexp }
} }
# Disable all sanitizers. # Disable all sanitizers.
append cc_cmd " $NOSANTIZE_CFLAGS" append cc_cmd " $NOSANITIZE_CFLAGS"
if ![ld_compile $cc_cmd $srcdir/$subdir/$source $tmpdir/$execname.s] { if ![ld_compile $cc_cmd $srcdir/$subdir/$source $tmpdir/$execname.s] {
unresolved "$test" unresolved "$test"

View File

@ -197,7 +197,7 @@ proc visibility_run {visibility} {
global PLT_CFLAGS global PLT_CFLAGS
global NOPIE_CFLAGS global NOPIE_CFLAGS
global COMPRESS_LDFLAG global COMPRESS_LDFLAG
global NOSANTIZE_CFLAGS global NOSANITIZE_CFLAGS
if [ string match $visibility "hidden" ] { if [ string match $visibility "hidden" ] {
set VSBCFLAG "-DHIDDEN_TEST" set VSBCFLAG "-DHIDDEN_TEST"
@ -236,7 +236,7 @@ proc visibility_run {visibility} {
} else { } else {
# Compile the main program. Make sure that PLT is used since PLT # Compile the main program. Make sure that PLT is used since PLT
# is expected. # 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) (non PIC)"
unresolved "visibility ($visibility)" unresolved "visibility ($visibility)"
} else { } else {
@ -246,8 +246,8 @@ proc visibility_run {visibility} {
# will need to do more relocation work. However, note that not # will need to do more relocation work. However, note that not
# using -fpic will cause some of the tests to return different # using -fpic will cause some of the tests to return different
# results. Make sure that PLT is used since PLT is expected. # 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] 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 $NOSANTIZE_CFLAGS" $srcdir/$subdir/sh2.c $tmpdir/sh2np.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)" unresolved "visibility ($visibility) (non PIC)"
} else { } else {
# SunOS non PIC shared libraries don't permit some cases of # 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. # 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] 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 $NOSANTIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } { || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
unresolved "visibility ($visibility)" unresolved "visibility ($visibility)"
} else { } else {
if { [ string match $visibility "protected" ] if { [ string match $visibility "protected" ]
@ -353,7 +353,7 @@ proc visibility_run {visibility} {
# Don't bother. # Don't bother.
} else { } else {
# Now do the same tests again, but this time compile main.c PIC. # 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, non PIC so)"
unresolved "visibility ($visibility) (PIC main)" unresolved "visibility ($visibility) (PIC main)"
} else { } else {
@ -445,7 +445,7 @@ visibility_run protected_undef_def
visibility_run protected_weak visibility_run protected_weak
visibility_run normal 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" unresolved "common hidden symbol"
} else { } else {
if ![ld_link $ld tmpdir/common "tmpdir/common.o"] { 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" unresolved "weak hidden symbol"
} else { } 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" unresolved "weak hidden symbol"
} else { } else {
if ![ld_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] { if ![ld_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] {

View File

@ -267,14 +267,14 @@ proc build_lib {test libname objs dynsymexp} {
global shared global shared
global srcdir global srcdir
global subdir global subdir
global NOSANTIZE_CFLAGS global NOSANITIZE_CFLAGS
set files "" set files ""
foreach obj $objs { foreach obj $objs {
set files "$files $tmpdir/$obj" 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 fail $test
return return
} }
@ -294,14 +294,14 @@ proc build_exec { test execname objs flags dat dynsymexp symexp} {
global srcdir global srcdir
global subdir global subdir
global exec_output global exec_output
global NOSANTIZE_CFLAGS global NOSANITIZE_CFLAGS
set files "" set files ""
foreach obj $objs { foreach obj $objs {
set files "$files $tmpdir/$obj" 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" fail "$test"
return return
} }
@ -357,7 +357,7 @@ if {[check_lto_available]} {
} }
# Disable all sanitizers. # Disable all sanitizers.
append cc_cmd " $NOSANTIZE_CFLAGS" append cc_cmd " $NOSANITIZE_CFLAGS"
# Old version of GCC for MIPS default to enabling -fpic # Old version of GCC for MIPS default to enabling -fpic
# and get confused if it is used on the command line. # 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] 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_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/weakref1.c $tmpdir/weakref1.o]
|| ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref2.c $tmpdir/weakref2.o]} then { || ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref2.c $tmpdir/weakref2.o]} then {
unresolved "ELF weak (alias)" unresolved "ELF weak (alias)"

View File

@ -23,7 +23,7 @@ if ![check_gc_sections_available] {
return return
} }
set cflags "-ffunction-sections -fdata-sections $NOSANTIZE_CFLAGS" set cflags "-ffunction-sections -fdata-sections $NOSANITIZE_CFLAGS"
set objfile "tmpdir/gc.o" set objfile "tmpdir/gc.o"
if { [istarget powerpc*-*-*] && ![istarget powerpc64*-*-*] } { if { [istarget powerpc*-*-*] && ![istarget powerpc64*-*-*] } {

View File

@ -71,11 +71,11 @@ set lto_link_tests [list \
"-O2 -flto -fuse-linker-plugin" "-flto -fuse-linker-plugin" \ "-O2 -flto -fuse-linker-plugin" "-flto -fuse-linker-plugin" \
{lto-1a.c lto-1b.c} {} "lto-1.exe"] \ {lto-1a.c lto-1b.c} {} "lto-1.exe"] \
[list "Compile 2" \ [list "Compile 2" \
"" "-O2 -flto -fuse-linker-plugin $NOSANTIZE_CFLAGS" \ "" "-O2 -flto -fuse-linker-plugin $NOSANITIZE_CFLAGS" \
{lto-2.c} {} ""] \ {lto-2.c} {} ""] \
[list "LTO 2" \ [list "LTO 2" \
"-static -O2 -flto -fuse-linker-plugin tmpdir/lto-2.o -lm" \ "-static -O2 -flto -fuse-linker-plugin tmpdir/lto-2.o -lm" \
"$NOSANTIZE_CFLAGS" \ "$NOSANITIZE_CFLAGS" \
{dummy.c} {} "lto-2.exe"] \ {dummy.c} {} "lto-2.exe"] \
[list "Compile 3a" \ [list "Compile 3a" \
"" "-flto" \ "" "-flto" \
@ -138,11 +138,11 @@ set lto_link_tests [list \
"" "" \ "" "" \
{pr12758a.s} {} ""] \ {pr12758a.s} {} ""] \
[list "Build libpr12758.a" \ [list "Build libpr12758.a" \
"" "-flto -O2 $lto_fat $NOSANTIZE_CFLAGS" \ "" "-flto -O2 $lto_fat $NOSANITIZE_CFLAGS" \
{pr12758b.c} {} "libpr12758.a"] \ {pr12758b.c} {} "libpr12758.a"] \
[list "PR ld/12758" \ [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" \ "$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" \
"$NOSANTIZE_CFLAGS" \ "$NOSANITIZE_CFLAGS" \
{dummy.c} {} "pr12758.exe"] \ {dummy.c} {} "pr12758.exe"] \
[list "Build libpr13183.a" \ [list "Build libpr13183.a" \
"-T" "-flto -O2 $lto_fat" \ "-T" "-flto -O2 $lto_fat" \
@ -458,12 +458,12 @@ set lto_link_symbol_tests [list \
"-O2 -flto -fuse-linker-plugin tmpdir/lto-9.o" "" \ "-O2 -flto -fuse-linker-plugin tmpdir/lto-9.o" "" \
{dummy.c} {{"nm" {-C} "lto-9.d"}} "lto-9.exe" "c++"] \ {dummy.c} {{"nm" {-C} "lto-9.d"}} "lto-9.exe" "c++"] \
[list "LTO 16a symbol" \ [list "LTO 16a symbol" \
"-O2 $NOSANTIZE_CFLAGS -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin" \ "-O2 $NOSANITIZE_CFLAGS -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin" \
"-flto $NOSANTIZE_CFLAGS" \ "-flto $NOSANITIZE_CFLAGS" \
{lto-16a.c} {{"nm" {} "lto-16a.d"}} "lto-16.exe" "c"] \ {lto-16a.c} {{"nm" {} "lto-16a.d"}} "lto-16.exe" "c"] \
[list "LTO 16b symbol" \ [list "LTO 16b symbol" \
"-O2 $NOSANTIZE_CFLAGS -Wl,-e,foo -u bar -nostdlib -flto -fuse-linker-plugin" \ "-O2 $NOSANITIZE_CFLAGS -Wl,-e,foo -u bar -nostdlib -flto -fuse-linker-plugin" \
"-flto $NOSANTIZE_CFLAGS" \ "-flto $NOSANITIZE_CFLAGS" \
{lto-16a.c lto-16b.c} {{"nm" {} "lto-16b.d"}} "lto-16b.exe" "c"] \ {lto-16a.c lto-16b.c} {{"nm" {} "lto-16b.d"}} "lto-16b.exe" "c"] \
[list "PR ld/13183" \ [list "PR ld/13183" \
"-O2 -flto -fuse-linker-plugin tmpdir/pr13183b.o tmpdir/libpr13183.a" "" \ "-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 \ run_cc_link_tests [list \
[list \ [list \
"Build pr22721a.so" \ "Build pr22721a.so" \
"-shared $NOSANTIZE_CFLAGS -nostdlib -nostartfiles \ "-shared $NOSANITIZE_CFLAGS -nostdlib -nostartfiles \
-Wl,-version-script,pr22721.t" \ -Wl,-version-script,pr22721.t" \
"" \ "" \
{pr22721a.s} \ {pr22721a.s} \
@ -678,16 +678,16 @@ if { [at_least_gcc_version 4 7] } {
] \ ] \
[list \ [list \
"Build pr22721b.o" \ "Build pr22721b.o" \
"$plug_opt $NOSANTIZE_CFLAGS" \ "$plug_opt $NOSANITIZE_CFLAGS" \
"-O2 -fPIC -flto $lto_no_fat" \ "-O2 -fPIC -flto $lto_no_fat" \
{pr22721b.c} \ {pr22721b.c} \
] \ ] \
[list \ [list \
"Build PR ld/pr22721" \ "Build PR ld/pr22721" \
"-O2 -flto -fuse-linker-plugin -nostdlib -nostartfiles \ "-O2 -flto -fuse-linker-plugin -nostdlib -nostartfiles \
$NOSANTIZE_CFLAGS \ $NOSANITIZE_CFLAGS \
-Wl,-e,_start tmpdir/pr22721b.o tmpdir/pr22721a.so" \ -Wl,-e,_start tmpdir/pr22721b.o tmpdir/pr22721a.so" \
"$NOSANTIZE_CFLAGS" \ "$NOSANITIZE_CFLAGS" \
{dummy.c} \ {dummy.c} \
{} \ {} \
"pr22721.exe" "pr22721.exe"

View File

@ -94,7 +94,7 @@ set failed_compile 0
set _ "" set _ ""
set plugin_nm_output "" set plugin_nm_output ""
set old_CFLAGS "$CFLAGS" set old_CFLAGS "$CFLAGS"
append CFLAGS " $NOSANTIZE_CFLAGS" append CFLAGS " $NOSANITIZE_CFLAGS"
if { $can_compile && \ if { $can_compile && \
(![ld_compile "$CC $CFLAGS" $srcdir/$subdir/main.c tmpdir/main.o] \ (![ld_compile "$CC $CFLAGS" $srcdir/$subdir/main.c tmpdir/main.o] \

View File

@ -63,8 +63,8 @@ if [istarget tic6x*-*-*] {
set CFLAGS "-mno-dsbt -msdata=none" set CFLAGS "-mno-dsbt -msdata=none"
} }
if { ![ld_compile "$CC $NOSANTIZE_CFLAGS" "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \ if { ![ld_compile "$CC $NOSANITIZE_CFLAGS" "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
|| ![ld_compile "$CC $NOSANTIZE_CFLAGS" "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } { || ![ld_compile "$CC $NOSANITIZE_CFLAGS" "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
unresolved $test1 unresolved $test1
unresolved $test2 unresolved $test2
set CFLAGS "$old_CFLAGS" set CFLAGS "$old_CFLAGS"
@ -101,7 +101,7 @@ if [string match "" $exec_output] then {
# Check cross references within a single object. # 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 unresolved $test2
set CFLAGS "$old_CFLAGS" set CFLAGS "$old_CFLAGS"
set CC "$old_CC" set CC "$old_CC"
@ -126,7 +126,7 @@ if [string match "" $exec_output] then {
# Check cross references for ld -r # 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 unresolved $test3
set CFLAGS "$old_CFLAGS" set CFLAGS "$old_CFLAGS"
set CC "$old_CC" set CC "$old_CC"

View File

@ -46,8 +46,8 @@ set seltests {
{A::foo() B::foo() dropme1() dropme2()} {*-*-*}} {A::foo() B::foo() dropme1() dropme2()} {*-*-*}}
} }
set cflags "-w -O -ffunction-sections -fdata-sections $NOSANTIZE_CFLAGS" set cflags "-w -O -ffunction-sections -fdata-sections $NOSANITIZE_CFLAGS"
set cxxflags "-fno-exceptions -fno-rtti $NOSANTIZE_CFLAGS" set cxxflags "-fno-exceptions -fno-rtti $NOSANITIZE_CFLAGS"
set ldflags "--gc-sections -Bstatic" set ldflags "--gc-sections -Bstatic"
if [istarget mips*-*] { if [istarget mips*-*] {

View File

@ -67,7 +67,7 @@ set shared_needs_pic "no"
# Disable all sanitizers. # Disable all sanitizers.
set old_CFLAGS "$CFLAGS" set old_CFLAGS "$CFLAGS"
append CFLAGS " $NOSANTIZE_CFLAGS" append CFLAGS " $NOSANITIZE_CFLAGS"
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {

View File

@ -134,8 +134,8 @@ run_cc_link_tests [list \
] \ ] \
[list \ [list \
"Build libsize-9.so" \ "Build libsize-9.so" \
"-shared $NOSANTIZE_CFLAGS" \ "-shared $NOSANITIZE_CFLAGS" \
"-fPIC $NOSANTIZE_CFLAGS" \ "-fPIC $NOSANITIZE_CFLAGS" \
{size-9b.c} \ {size-9b.c} \
{{readelf -rW size-9.rd}} \ {{readelf -rW size-9.rd}} \
"libsize-9.so" \ "libsize-9.so" \
@ -284,12 +284,12 @@ run_ld_link_exec_tests [list \
] \ ] \
[list \ [list \
"Run size-9" \ "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-9a.c} \
"size-9" \ "size-9" \
"size-9.out" \ "size-9.out" \
"$NOSANTIZE_CFLAGS" \ "$NOSANITIZE_CFLAGS" \
] \ ] \
[list \ [list \
"Run size-10" \ "Run size-10" \

View File

@ -351,11 +351,11 @@ if { ![check_compiler_available] } {
# Pass -fplt to CC and CXX since -fno-plt doesn't work with S-records # 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 # tests. Also add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if PIE doesn't work
# with S-records. Also add $NOCF_PROTECTION_CFLAGS for S-records. # 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 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 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. # S-records can't handle .note.gnu.property sections.
if { [is_elf_format] \ if { [is_elf_format] \

View File

@ -703,7 +703,7 @@ if { [isnative] && [check_compiler_available] } {
run_cc_link_tests [list \ run_cc_link_tests [list \
[list \ [list \
"Helper X32 DSO from x86-64 object" "" \ "Helper X32 DSO from x86-64 object" "" \
"-m64 $NOSANTIZE_CFLAGS -fPIC -g" \ "-m64 $NOSANITIZE_CFLAGS -fPIC -g" \
{simple.c} {} "libsimple.a" \ {simple.c} {} "libsimple.a" \
] \ ] \
] ]
@ -721,7 +721,7 @@ if { [isnative] && [check_compiler_available] } {
[list \ [list \
"X32 DSO from x86-64 object" \ "X32 DSO from x86-64 object" \
"-shared -melf32_x86_64 tmpdir/simple-x32.o" \ "-shared -melf32_x86_64 tmpdir/simple-x32.o" \
"$NOSANTIZE_CFLAGS" \ "$NOSANITIZE_CFLAGS" \
"--x32 -mx86-used-note=yes" \ "--x32 -mx86-used-note=yes" \
{dummy.s} {{readelf {-s --wide} x86-64-x32.rd}} \ {dummy.s} {{readelf {-s --wide} x86-64-x32.rd}} \
"x86-64-x32" \ "x86-64-x32" \