diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2001-02-12 00:21:59 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2001-02-12 00:21:59 +0000 |
commit | 9a580d9af6169d6b6e9f90abe70bebb26e912bb3 (patch) | |
tree | 020e61b796a3007ea63cc06f1d22548c646a1b57 /binutils/testsuite/binutils-all | |
parent | 708b82c780e2647c46c63021893cf9339eb33611 (diff) | |
download | fsf-binutils-gdb-9a580d9af6169d6b6e9f90abe70bebb26e912bb3.zip fsf-binutils-gdb-9a580d9af6169d6b6e9f90abe70bebb26e912bb3.tar.gz fsf-binutils-gdb-9a580d9af6169d6b6e9f90abe70bebb26e912bb3.tar.bz2 |
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 ().
Diffstat (limited to 'binutils/testsuite/binutils-all')
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 6 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/testprog.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 430b7fe..85a320b 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -398,6 +398,7 @@ strip_test_with_saving_a_symbol proc copy_setup { } { global srcdir global subdir + global gcc_gas_flag set res [build_wrapper testglue.o]; set flags { debug }; @@ -409,6 +410,11 @@ proc copy_setup { } { 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 } diff --git a/binutils/testsuite/binutils-all/testprog.c b/binutils/testsuite/binutils-all/testprog.c index c2b1856..57de461 100644 --- a/binutils/testsuite/binutils-all/testprog.c +++ b/binutils/testsuite/binutils-all/testprog.c @@ -1,6 +1,7 @@ /* This program is used to test objcopy and strip. */ #include <stdio.h> +#include <string.h> int common; int global = 1; @@ -22,9 +23,9 @@ main () || strcmp (string, "string") != 0) { printf ("failed\n"); - exit (1); + return (1); } printf ("ok\n"); - exit (0); + return (0); } |