aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-gc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-09-03 16:26:21 +0930
committerAlan Modra <amodra@gmail.com>2021-09-03 16:26:21 +0930
commit669d5115345a3f3dc1c06aec31098eb4b349a6d0 (patch)
tree0bd69d93c3e4c1b7b57d6a58e803ad3a9bd0419f /ld/testsuite/ld-gc
parentad77db1c02a92c912f9719f32e2452890aa738ad (diff)
downloadgdb-669d5115345a3f3dc1c06aec31098eb4b349a6d0.zip
gdb-669d5115345a3f3dc1c06aec31098eb4b349a6d0.tar.gz
gdb-669d5115345a3f3dc1c06aec31098eb4b349a6d0.tar.bz2
ld testsuite tidy
Fixes a few issues: 1) If you use "-fsanitize=address,undefined" in CFLAGS, the Makefile attempt to trim off -fsanitize options left us with ",undefined". 2) ld_compile adds CFLAGS_FOR_TARGET itself, no need to pass it. 3) CFLAGS might be needed linking bootstrap test. * Makefile.am (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Trim off all -fsanitize=*. * Makefile.in: Regenerate. * testsuite/ld-bootstrap/bootstrap.exp: Use CFLAGS when linking. * testsuite/ld-cdtest/cdtest.exp: Use CFLAGS_FOR_TARGET when linking. * testsuite/ld-auto-import/auto-import.exp: Don't pass CFLAGS_FOR_TARGET to ld_compile. * testsuite/ld-cygwin/exe-export.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-pe/pe-compile.exp: Likewise. * testsuite/ld-pe/pe-run.exp: Likewise. * testsuite/ld-pe/pe-run2.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise, and don't allow nios2 testing to trash CFLAGS_FOR_TARGET. * testsuite/ld-scripts/crossref.exp: Don't pass options in CC_FOR_TARGET, do so in CFLAGS_FOR_TARGET instead. * testsuite/ld-srec/srec.exp: Likewise, and for CXX.
Diffstat (limited to 'ld/testsuite/ld-gc')
-rw-r--r--ld/testsuite/ld-gc/gc.exp14
1 files changed, 7 insertions, 7 deletions
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp
index 60491fe..8071222 100644
--- a/ld/testsuite/ld-gc/gc.exp
+++ b/ld/testsuite/ld-gc/gc.exp
@@ -37,7 +37,7 @@ if { [istarget m681*-*-*] || [istarget m68hc1*-*-*] } {
}
if { [check_compiler_available] } {
- ld_compile "$CC_FOR_TARGET -c $CFLAGS_FOR_TARGET $cflags" $srcdir/$subdir/gc.c $objfile
+ ld_compile "$CC_FOR_TARGET -c $cflags" $srcdir/$subdir/gc.c $objfile
}
proc test_gc { testname filename linker ldflags} {
@@ -144,9 +144,9 @@ if { [check_compiler_available] } {
if { [istarget "*-*-linux*"]
|| [istarget "*-*-nacl*"]
|| [istarget "*-*-gnu*"] } {
- ld_compile "$CC_FOR_TARGET -fPIC $CFLAGS_FOR_TARGET $cflags" $srcdir/$subdir/pr11218-1.c tmpdir/pr11218-1.o
+ ld_compile "$CC_FOR_TARGET -fPIC $cflags" $srcdir/$subdir/pr11218-1.c tmpdir/pr11218-1.o
ld_link $ld tmpdir/pr11218-1.so "-shared tmpdir/pr11218-1.o"
- ld_compile "$CC_FOR_TARGET -c $CFLAGS_FOR_TARGET $cflags" $srcdir/$subdir/pr11218-2.c tmpdir/pr11218-2.o
+ ld_compile "$CC_FOR_TARGET -c $cflags" $srcdir/$subdir/pr11218-2.c tmpdir/pr11218-2.o
run_dump_test "pr11218"
}
}
@@ -157,18 +157,18 @@ if [is_pecoff_format] {
}
if { [check_compiler_available] } {
- ld_compile "$CC_FOR_TARGET $CFLAGS_FOR_TARGET $cflags" $srcdir/$subdir/pr13683.c tmpdir/pr13683.o
+ ld_compile "$CC_FOR_TARGET $cflags" $srcdir/$subdir/pr13683.c tmpdir/pr13683.o
run_dump_test "pr13683" $symdefs
}
if { [check_compiler_available] } {
- ld_compile "$CC_FOR_TARGET $CFLAGS_FOR_TARGET $cflags $NOPIE_CFLAGS" $srcdir/$subdir/pr14265.c tmpdir/pr14265.o
+ ld_compile "$CC_FOR_TARGET $cflags $NOPIE_CFLAGS" $srcdir/$subdir/pr14265.c tmpdir/pr14265.o
run_dump_test "pr14265" $symdefs
}
if { [check_compiler_available] } {
- ld_compile "$CC_FOR_TARGET $CFLAGS_FOR_TARGET $cflags -O0" $srcdir/$subdir/pr19161-1.c tmpdir/pr19161-1.o
- ld_compile "$CC_FOR_TARGET $CFLAGS_FOR_TARGET $cflags -O0" $srcdir/$subdir/pr19161-2.c tmpdir/pr19161-2.o
+ ld_compile "$CC_FOR_TARGET $cflags -O0" $srcdir/$subdir/pr19161-1.c tmpdir/pr19161-1.o
+ ld_compile "$CC_FOR_TARGET $cflags -O0" $srcdir/$subdir/pr19161-2.c tmpdir/pr19161-2.o
if [istarget hppa*-*-linux*] {
set symdefs {{ld {--defsym '\$\$dyncall=0'}}}
}