aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-17 13:36:00 +0000
committerJakub Jelinek <jakub@redhat.com>2005-08-17 13:36:00 +0000
commitdec20c9e4de7d566680b40aa18ff3004d974020b (patch)
treede205715a3cd06238f3b41eb80ff3fb6ff605821 /ld
parent46fda84e7884329104a843e17cf2f4513998a745 (diff)
downloadgdb-dec20c9e4de7d566680b40aa18ff3004d974020b.zip
gdb-dec20c9e4de7d566680b40aa18ff3004d974020b.tar.gz
gdb-dec20c9e4de7d566680b40aa18ff3004d974020b.tar.bz2
* lib/ld-lib.exp (default_ld_compile): Append $cc arguments after
$CFLAGS instead of prepending them.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog3
-rw-r--r--ld/testsuite/lib/ld-lib.exp7
2 files changed, 8 insertions, 2 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 8f0af1a..6812aab 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2005-08-17 Jakub Jelinek <jakub@redhat.com>
+ * lib/ld-lib.exp (default_ld_compile): Append $cc arguments after
+ $CFLAGS instead of prepending them.
+
* ld-elfvers/vers.exp: Add a new test, vers30.
* ld-elfvers/vers30.c: New file.
* ld-elfvers/vers30.map: New file.
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 9f9ec91..f1bcc85 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -226,8 +226,11 @@ proc default_ld_compile { cc source object } {
# based on the name of the compiler.
set ccexe $cc
set ccparm [string first " " $cc]
+ set ccflags ""
if { $ccparm > 0 } then {
+ set ccflags [string range $cc $ccparm end]
set ccexe [string range $cc 0 $ccparm]
+ set cc $ccexe
}
set ccexe [string replace $ccexe 0 [string last "/" $ccexe] ""]
if {[string match "*gcc*" $ccexe] || [string match "*++*" $ccexe]} then {
@@ -238,9 +241,9 @@ proc default_ld_compile { cc source object } {
append flags " [board_info [target_info name] multilib_flags]"
}
- verbose -log "$cc $flags -c $source -o $object"
+ verbose -log "$cc $flags $ccflags -c $source -o $object"
- catch "exec $cc $flags -c $source -o $object" exec_output
+ catch "exec $cc $flags $ccflags -c $source -o $object" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
if {![file exists $object]} then {