This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld selective link test failure
On Thu, Jul 02, 2009 at 01:28:14PM +0100, Will Newton wrote:
> On Thu, Jul 2, 2009 at 1:31 PM, Dave
> Korn<dave.korn.cygwin@googlemail.com> wrote:
> > Will Newton wrote:
> >
> >> CC in this case is gcc, but the arch-linux-uclibc-cc symlink to gcc,
Yeah, we pick up target-cc rather than target-gcc when running
"make check" from the top level dir because CC_FOR_TARGET is
passed down as CC (rather than GCC_FOR_TARGET). Curiously, you
get target-gcc if you run "make check" from the ld dir.
> >> so this check does not trigger and the C++ tests fail. Is there a
> >> better way to test for gcc?
> >
> > ?Does this testcase stand the slightest chance of succeeding on a non-GCC
> > compiler? ?Given the proliferation of gcc-specific command-line options in the
> > test, and gcc-specific asms and attributes in the testcase code, I'd think the
> > test of the name is superfluous and could just be dropped.
>
> I think you're right
Agreed. I've applied the following, which also fixes another minor
bug with the test. Since we are running $CXX we ought to check its
version rather than $CC, in case they happen to be different.
* ld-selective/selective.exp: Remove check that $CC contains the
string "gcc". Do -dumpversion for $CXX.
Index: ld/testsuite/ld-selective/selective.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/selective.exp,v
retrieving revision 1.40
diff -u -p -r1.40 selective.exp
--- ld/testsuite/ld-selective/selective.exp 30 Sep 2007 15:26:43 -0000 1.40
+++ ld/testsuite/ld-selective/selective.exp 8 Jul 2009 02:33:52 -0000
@@ -108,16 +108,14 @@ foreach testitem $seltests {
if { $testtype == "C++" } {
set testflags "$cflags $cxxflags"
set compiler "$CXX"
- if [string match "*gcc*" [lindex $CC 0]] {
- # Starting with 3.4.0, -fvtable-gc is no longer supported and thus
- # the functionality we try to test for cannot be expected to work.
- set version [remote_exec host "$CC -dumpversion"]
- set version [lindex $version 1]
- if [regexp "^(\[1-9\]\[0-9\]+|\[4-9\]|3.(\[1-9\]\[0-9\]+|\[4-9\]))\\." $version] {
- setup_xfail {*-*-*}
- }
+ # Starting with 3.4.0, -fvtable-gc is no longer supported and thus
+ # the functionality we try to test for cannot be expected to work.
+ set version [remote_exec host "$CXX -dumpversion"]
+ set version [lindex $version 1]
+ if [regexp "^(\[1-9\]\[0-9\]+|\[4-9\]|3.(\[1-9\]\[0-9\]+|\[4-9\]))\\." $version] {
+ setup_xfail {*-*-*}
}
- } {
+ } else {
set testflags "$cflags"
set compiler "$CC"
}
--
Alan Modra
Australia Development Lab, IBM