This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ld testsuite fix
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: binutils <binutils at sources dot redhat dot com>
- Date: Fri, 30 Oct 2009 10:47:50 +0000
- Subject: ld testsuite fix
I've applied this patch of Mark's to robustify a testcase. We routinely enable
-fno-common on embedded targets, because it results in better code.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
2009-10-30 Mark Mitchell <mark@codesourcery.com>
* ld-elfcomm/elfcomm.exp: Compile with -fcommon.
Index: ld-elfcomm/elfcomm.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfcomm/elfcomm.exp,v
retrieving revision 1.20
diff -c -3 -p -r1.20 elfcomm.exp
*** ld-elfcomm/elfcomm.exp 15 Sep 2009 02:02:48 -0000 1.20
--- ld-elfcomm/elfcomm.exp 30 Oct 2009 10:31:30 -0000
*************** proc assembler_generates_commons {} {
*** 176,184 ****
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] } {
unresolved $test1
return
}
--- 176,185 ----
return 1
}
! # 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
}