diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-08-26 11:28:26 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-08-26 11:57:35 -0700 |
commit | 05fd99cc80b1955e8c846dacfa57fe52816d4869 (patch) | |
tree | ecc89255958362cd0747dbbe60f5959d7c16b986 /ld/testsuite/ld-elf/indirect.exp | |
parent | 8c51f2f291a5459e1eabd000b2c52e5de52b4c56 (diff) | |
download | gdb-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-elf/indirect.exp')
-rw-r--r-- | ld/testsuite/ld-elf/indirect.exp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp index 8acae4d..9451b21 100644 --- a/ld/testsuite/ld-elf/indirect.exp +++ b/ld/testsuite/ld-elf/indirect.exp @@ -64,6 +64,9 @@ if {[check_lto_available]} { append cc_cmd " -fno-lto" } +# Disable all sanitizers. +append cc_cmd " $NOSANTIZE_CFLAGS" + 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 -fPIC" $srcdir/$subdir/indirect2.c tmpdir/indirect2.o] |