From 698be22afe187e449bbfc42f0b664ff5b3c44ff8 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 30 Oct 2009 10:46:00 +0000 Subject: * ld-elfcomm/elfcomm.exp: Compile with -fcommon. --- ld/testsuite/ld-elfcomm/elfcomm.exp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ld/testsuite/ld-elfcomm') 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 } -- cgit v1.1