aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfvsb
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-08-26 11:28:26 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-08-26 11:57:35 -0700
commit05fd99cc80b1955e8c846dacfa57fe52816d4869 (patch)
treeecc89255958362cd0747dbbe60f5959d7c16b986 /ld/testsuite/ld-elfvsb
parent8c51f2f291a5459e1eabd000b2c52e5de52b4c56 (diff)
downloadgdb-05fd99cc80b1955e8c846dacfa57fe52816d4869.zip
gdb-05fd99cc80b1955e8c846dacfa57fe52816d4869.tar.gz
gdb-05fd99cc80b1955e8c846dacfa57fe52816d4869.tar.bz2
ld: Add $NOSANTIZE_CFLAGS to more linker tests
-fsanitize= can be used to build binutils with $ CC="gcc -fsanitize=address,undefined" CXX="g++ -fsanitize=address,undefined" .../configure --disable-werror Since not all linker tests are compatible with -fsanitize=, pass $NOSANTIZE_CFLAGS to disable -fsanitize= for such tests. * testsuite/ld-elf/indirect.exp: Append $NOSANTIZE_CFLAGS to CC. * testsuite/ld-elf/shared.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-plugin/lto.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elfvsb')
-rw-r--r--ld/testsuite/ld-elfvsb/elfvsb.exp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp
index fda2416..3a242d3 100644
--- a/ld/testsuite/ld-elfvsb/elfvsb.exp
+++ b/ld/testsuite/ld-elfvsb/elfvsb.exp
@@ -444,7 +444,7 @@ visibility_run protected_undef_def
visibility_run protected_weak
visibility_run normal
-if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {
+if { ![ld_compile "$CC -g $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {
unresolved "common hidden symbol"
} else {
if ![ld_link $ld tmpdir/common "tmpdir/common.o"] {
@@ -454,10 +454,10 @@ if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {
}
}
-if { ![ld_compile "$CC -g $CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
+if { ![ld_compile "$CC -g $CFLAGS $NOSANTIZE_CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
unresolved "weak hidden symbol"
} else {
- if { ![ld_compile "$CC -g $CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {
+ if { ![ld_compile "$CC -g $CFLAGS $NOSANTIZE_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"] {