aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/ChangeLog5
-rw-r--r--binutils/testsuite/config/default.exp35
2 files changed, 25 insertions, 15 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 648080c..8dce127 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-15 Jan Beulich <jbeulich@novell.com>
+
+ * config/default.exp (link_or_copy): New. Use it for setting
+ up assembler and linker for the compiler to use.
+
2005-10-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/251
diff --git a/binutils/testsuite/config/default.exp b/binutils/testsuite/config/default.exp
index 6ee5eda..4c8b6e0 100644
--- a/binutils/testsuite/config/default.exp
+++ b/binutils/testsuite/config/default.exp
@@ -74,21 +74,26 @@ if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
# Make a copy from tmpdir/gas/as and tmpdir/gas/ld to the assembler
# and linker in the build tree, so that we can use a -B option to gcc
# to force it to use the newly built assembler/linker.
-if {![file isdirectory tmpdir/gas]} then {
- catch "exec mkdir tmpdir/gas" status
- if {[file isfile ../gas/as-new[exe_ext]]} then {
- catch "exec cp ../gas/as-new[exe_ext] tmpdir/gas/as[exe_ext]" status
- } else {
- # For non-Windows hosts there may be an executable
- # without a .exe suffix, so try copying that instead.
- catch "exec cp ../gas/as-new tmpdir/gas/as[exe_ext]" status
- }
- # This may not be needed any more...
- if {[file isfile ../ld/ld-new[exe_ext]]} then {
- catch "exec cp ../ld/ld-new[exe_ext] tmpdir/gas/ld[exe_ext]" status
- } else {
- catch "exec cp ../ld/ld-new tmpdir/gas/ld[exe_ext]" status
- }
+if {![file isdirectory tmpdir/gas]} {catch "exec mkdir tmpdir/gas" status}
+
+proc link_or_copy { src dst } {
+ if ![catch "exec ln -sf ../../../$src tmpdir/gas/$dst" status] then {return 0}
+ if ![catch "exec ln -f ../$src tmpdir/gas/$dst" status] then {return 0}
+ catch "exec cp -fpu ../$src tmpdir/gas/$dst" status
+}
+
+if {[file isfile gas/as-new[exe_ext]]} then {
+ link_or_copy gas/as-new[exe_ext] as[exe_ext]
+} else {
+ # For non-Windows hosts there may be an executable
+ # without a .exe suffix, so try copying that instead.
+ link_or_copy gas/as-new as[exe_ext]
+}
+# This may not be needed any more...
+if {[file isfile ld/ld-new[exe_ext]]} then {
+ link_or_copy ld/ld-new[exe_ext] ld[exe_ext]
+} else {
+ link_or_copy ld/ld-new ld[exe_ext]
}
set gcc_gas_flag "-B[pwd]/tmpdir/gas/"
set dlltool_gas_flag "-S [pwd]/tmpdir/gas/as[exe_ext]"