ld: Add $NOSANTIZE_CFLAGS to more linker tests
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 26 Aug 2020 18:28:26 +0000 (11:28 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 26 Aug 2020 18:57:35 +0000 (11:57 -0700)
commit05fd99cc80b1955e8c846dacfa57fe52816d4869
treeecc89255958362cd0747dbbe60f5959d7c16b986
parent8c51f2f291a5459e1eabd000b2c52e5de52b4c56
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.
ld/ChangeLog
ld/testsuite/ld-elf/indirect.exp
ld/testsuite/ld-elf/shared.exp
ld/testsuite/ld-elfcomm/elfcomm.exp
ld/testsuite/ld-elfvers/vers.exp
ld/testsuite/ld-elfvsb/elfvsb.exp
ld/testsuite/ld-elfweak/elfweak.exp
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/plugin.exp
ld/testsuite/ld-scripts/crossref.exp