This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] adjust ld testsuite to work with gcc 3.4
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Thu, 03 Jun 2004 11:47:44 +0200
- Subject: [PATCH] adjust ld testsuite to work with gcc 3.4
Changes in gcc 3.4 resulted in certain tests in the ld testsuite
failing.
2004-06-03 Jan Beulich <jbeulich@novell.com>
* ld/testsuite/ld-elfvsb/main.c: Ensure visibility_def and
visibility_func are actually referenced (gcc 3.4 eliminates
comparisons of addresses of global symbols with NULL).
* ld/testsuite/ld-selective/selective.exp: Suppress -fvtable-gc
tests for gcc 3.4.0 and above, as this option and its
functionality
is no longer supported, making these tests fail).
---
/home/jbeulich/src/binutils/mainline/2004-06-03.09.12/ld/testsuite/ld-elfvsb/main.c 2003-10-07
19:30:02.000000000 +0200
+++ 2004-06-03.09.12/ld/testsuite/ld-elfvsb/main.c 2004-05-26
13:52:01.000000000 +0200
@@ -205,13 +205,13 @@
int
main_visibility_checkcom ()
{
- return &visibility_def != NULL;
+ return &visibility_def != NULL && visibility_def == 2;
}
int
main_visibility_checkweak ()
{
- return &visibility_func != NULL;
+ return &visibility_func != NULL && visibility_func () == 2;
}
#else
int
---
/home/jbeulich/src/binutils/mainline/2004-06-03.09.12/ld/testsuite/ld-selective/selective.exp 2004-01-09
22:19:15.000000000 +0100
+++
2004-06-03.09.12/ld/testsuite/ld-selective/selective.exp 2004-05-26
13:52:01.000000000 +0200
@@ -89,6 +89,14 @@
# It's either C or C++ at the moment.
if { $testtype == "C++" } {
set testflags "$cflags $cxxflags"
+ 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
+ catch "exec -- $CC -dumpversion" version
+ if [regexp
"^(\[1-9\]\[0-9\]+|\[4-9\]|3.(\[1-9\]\[0-9\]+|\[4-9\]))\\." $version] {
+ setup_xfail {*-*-*}
+ }
+ }
} {
set testflags "$cflags"
}