aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-selective
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-30 15:26:43 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-30 15:26:43 +0000
commit6182869c3d79ebc8df04a88bbb7be2e5a68129fd (patch)
treefe172bdca0e108ca701d316fe8bcf38903a2123e /ld/testsuite/ld-selective
parenta0c8462faffffedfcb4efc4e8c88f8da88658576 (diff)
downloadgdb-6182869c3d79ebc8df04a88bbb7be2e5a68129fd.zip
gdb-6182869c3d79ebc8df04a88bbb7be2e5a68129fd.tar.gz
gdb-6182869c3d79ebc8df04a88bbb7be2e5a68129fd.tar.bz2
2007-09-30 Mike Frysinger <vapier@gentoo.org>
* ld-selective/selective.exp: Set $compiler based on $testtype and use that instead of $CC.
Diffstat (limited to 'ld/testsuite/ld-selective')
-rw-r--r--ld/testsuite/ld-selective/selective.exp10
1 files changed, 6 insertions, 4 deletions
diff --git a/ld/testsuite/ld-selective/selective.exp b/ld/testsuite/ld-selective/selective.exp
index 191cd63..b698154 100644
--- a/ld/testsuite/ld-selective/selective.exp
+++ b/ld/testsuite/ld-selective/selective.exp
@@ -107,6 +107,7 @@ foreach testitem $seltests {
# It's either C or C++ at the moment.
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.
@@ -118,19 +119,20 @@ foreach testitem $seltests {
}
} {
set testflags "$cflags"
+ set compiler "$CC"
}
# Note that we do not actually *use* CXX; we just add cxxflags for C++
# tests. It might have been a buglet originally; now I think better
# leave as is.
- if { ![ld_compile "$CC $testflags" $srcdir/$subdir/$testfile $objfile] } {
+ if { ![ld_compile "$compiler $testflags" $srcdir/$subdir/$testfile $objfile] } {
unresolved $testname
continue
}
# V850 targets need libgcc.a
if [istarget v850*-*-elf] {
- set libgcc [remote_exec host "$CC -print-libgcc-file-name"]
+ set libgcc [remote_exec host "$compiler -print-libgcc-file-name"]
set libgcc [lindex $libgcc 1]
regsub -all "\[\r\n\]" $libgcc "" libgcc
set objfile "$objfile $libgcc"
@@ -138,7 +140,7 @@ foreach testitem $seltests {
# ARM targets need libgcc.a in THUMB mode so that __call_via_r3 is provided
if {[istarget arm-*-*] || [istarget xscale-*-*]} {
- set libgcc [remote_exec host "$CC -print-libgcc-file-name"]
+ set libgcc [remote_exec host "$compiler -print-libgcc-file-name"]
set libgcc [lindex $libgcc 1]
regsub -all "\[\r\n\]" $libgcc "" libgcc
set objfile "$objfile $libgcc"
@@ -146,7 +148,7 @@ foreach testitem $seltests {
# HPPA linux targets need libgcc.a for millicode routines ($$dyncall).
if [istarget hppa*-*-linux*] {
- set libgcc [remote_exec host "$CC -print-libgcc-file-name"]
+ set libgcc [remote_exec host "$compiler -print-libgcc-file-name"]
set libgcc [lindex $libgcc 1]
regsub -all "\[\r\n\]" $libgcc "" libgcc
set objfile "$objfile $libgcc"