+2001-02-11 H.J. Lu <hjl@gnu.org>
+
+ * config/default.exp: Set up gcc_gas_flag.
+
+ * binutils-all/objcopy.exp (copy_setup): Process gcc_gas_flag
+ for Linux only.
+
+ * binutils-all/testprog.c: Include <string.h> and don't use
+ exit ().
+
2001-01-16 Matthew Green <mrg@redhat.com>
* binutils-all/readelf.s-64: Match readelf -S output.
proc copy_setup { } {
global srcdir
global subdir
+ global gcc_gas_flag
set res [build_wrapper testglue.o];
set flags { debug };
set add_libs "";
}
+ if { [istarget *-*-linux*] } {
+ foreach i $gcc_gas_flag {
+ set flags "additional_flags=$i $flags"
+ }
+ }
if { [target_compile "$srcdir/$subdir/testprog.c $add_libs" tmpdir/testprog executable $flags] != "" } {
return 2
}
if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
+# Make a symlink 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]} then {
+ catch "exec ln -s ../../../gas/as-new tmpdir/gas/as" status
+ }
+ if {[file isfile ../ld/ld-new]} then {
+ catch "exec ln -s ../../../ld/ld-new tmpdir/gas/ld" status
+ }
+}
+set gcc_gas_flag "-B[pwd]/tmpdir/gas/"
+
#
# binutils_run
# run a program, returning the output