scummvm random work
[patches.git] / binutils-ld-selective-pick-CXX.patch
1 2007-09-29 Mike Frysinger <vapier@gentoo.org>
2
3 * ld-selective/selective.exp: Set $compiler based on $testtype and
4 use that instead of $CC.
5
6 Index: ld-selective/selective.exp
7 ===================================================================
8 RCS file: /cvs/src/src/ld/testsuite/ld-selective/selective.exp,v
9 retrieving revision 1.38
10 diff -u -p -r1.38 selective.exp
11 --- ld-selective/selective.exp 28 Aug 2007 13:21:58 -0000 1.38
12 +++ ld-selective/selective.exp 30 Sep 2007 01:45:19 -0000
13 @@ -100,6 +100,7 @@ foreach testitem $seltests {
14 # It's either C or C++ at the moment.
15 if { $testtype == "C++" } {
16 set testflags "$cflags $cxxflags"
17 + set compiler "$CXX"
18 if [string match "*gcc*" [lindex $CC 0]] {
19 # Starting with 3.4.0, -fvtable-gc is no longer supported and thus
20 # the functionality we try to test for cannot be expected to work.
21 @@ -111,19 +112,20 @@ foreach testitem $seltests {
22 }
23 } {
24 set testflags "$cflags"
25 + set compiler "$CC"
26 }
27
28 # Note that we do not actually *use* CXX; we just add cxxflags for C++
29 # tests. It might have been a buglet originally; now I think better
30 # leave as is.
31 - if { ![ld_compile "$CC $testflags" $srcdir/$subdir/$testfile $objfile] } {
32 + if { ![ld_compile "$compiler $testflags" $srcdir/$subdir/$testfile $objfile] } {
33 unresolved $testname
34 continue
35 }
36
37 # V850 targets need libgcc.a
38 if [istarget v850*-*-elf] {
39 - set libgcc [remote_exec host "$CC -print-libgcc-file-name"]
40 + set libgcc [remote_exec host "$compiler -print-libgcc-file-name"]
41 set libgcc [lindex $libgcc 1]
42 regsub -all "\[\r\n\]" $libgcc "" libgcc
43 set objfile "$objfile $libgcc"
44 @@ -131,7 +133,7 @@ foreach testitem $seltests {
45
46 # ARM targets need libgcc.a in THUMB mode so that __call_via_r3 is provided
47 if {[istarget arm-*-*] || [istarget xscale-*-*]} {
48 - set libgcc [remote_exec host "$CC -print-libgcc-file-name"]
49 + set libgcc [remote_exec host "$compiler -print-libgcc-file-name"]
50 set libgcc [lindex $libgcc 1]
51 regsub -all "\[\r\n\]" $libgcc "" libgcc
52 set objfile "$objfile $libgcc"
53 @@ -139,7 +141,7 @@ foreach testitem $seltests {
54
55 # HPPA linux targets need libgcc.a for millicode routines ($$dyncall).
56 if [istarget hppa*-*-linux*] {
57 - set libgcc [remote_exec host "$CC -print-libgcc-file-name"]
58 + set libgcc [remote_exec host "$compiler -print-libgcc-file-name"]
59 set libgcc [lindex $libgcc 1]
60 regsub -all "\[\r\n\]" $libgcc "" libgcc
61 set objfile "$objfile $libgcc"