aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-shared/shared.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-08-30 07:27:02 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-08-30 07:28:17 -0700
commit42afa120eb180bce52c692939cd179e3c02160d9 (patch)
tree55f0aacbec693d08a5517f8f1529b51c232c6b2d /ld/testsuite/ld-shared/shared.exp
parentd0ed6fddfac5c54c50fa17f960d51efc0f111cae (diff)
downloadgdb-42afa120eb180bce52c692939cd179e3c02160d9.zip
gdb-42afa120eb180bce52c692939cd179e3c02160d9.tar.gz
gdb-42afa120eb180bce52c692939cd179e3c02160d9.tar.bz2
ld: Add $NOSANTIZE_CFLAGS to more linker tests
* 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.
Diffstat (limited to 'ld/testsuite/ld-shared/shared.exp')
-rw-r--r--ld/testsuite/ld-shared/shared.exp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index fa64730..eb346e9 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