From d0091659f567710964f4cd141ada9140aa78a2bd Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 30 Oct 2009 19:46:00 +0000 Subject: [PATCH] * ld-elfcomm/elfcomm.exp: Compile with -fcommon. --- ld/testsuite/ChangeLog | 4 ++++ ld/testsuite/ld-elfcomm/elfcomm.exp | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 28829c6325..e634cceb71 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-10-30 Mark Mitchell + + * ld-elfcomm/elfcomm.exp: Compile with -fcommon. + 2009-10-28 Johan Kristell * ld-cris/dso12-pltdis.d: New test. diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp index 213a821bc3..5ece03fd8f 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 } -- 2.11.0