aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfcomm
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2009-10-30 10:46:00 +0000
committerNathan Sidwell <nathan@codesourcery.com>2009-10-30 10:46:00 +0000
commit698be22afe187e449bbfc42f0b664ff5b3c44ff8 (patch)
tree74ab2288686210d9c1d023519ec8e05e312a41cc /ld/testsuite/ld-elfcomm
parent0522abc9eb4aa3fe97c9a271fa27c691c42470e7 (diff)
downloadgdb-698be22afe187e449bbfc42f0b664ff5b3c44ff8.zip
gdb-698be22afe187e449bbfc42f0b664ff5b3c44ff8.tar.gz
gdb-698be22afe187e449bbfc42f0b664ff5b3c44ff8.tar.bz2
* ld-elfcomm/elfcomm.exp: Compile with -fcommon.
Diffstat (limited to 'ld/testsuite/ld-elfcomm')
-rw-r--r--ld/testsuite/ld-elfcomm/elfcomm.exp7
1 files changed, 4 insertions, 3 deletions
diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp
index 213a821..5ece03f 100644
--- a/ld/testsuite/ld-elfcomm/elfcomm.exp
+++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
@@ -176,9 +176,10 @@ proc assembler_generates_commons {} {
return 1
}
-
-if { ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
- || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
+# Explicitly use "-fcommon" so that even if $CFLAGS includes
+# "-fno-common", these tests are compiled as expected.
+if { ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
+ || ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
unresolved $test1
return
}