]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - binutils/testsuite/config/default.exp
2001-02-11 H.J. Lu <hjl@gnu.org>
[thirdparty/binutils-gdb.git] / binutils / testsuite / config / default.exp
1 # Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17 # Please email any bugs, comments, and/or additions to this file to:
18 # bug-dejagnu@prep.ai.mit.edu
19
20 # This file was written by Rob Savoye. (rob@cygnus.com)
21
22 load_lib util-defs.exp
23 load_lib utils-lib.exp
24
25 if ![info exists NM] then {
26 set NM [findfile $base_dir/nm-new $base_dir/nm-new [transform nm]]
27 }
28 if ![info exists NMFLAGS] then {
29 set NMFLAGS ""
30 }
31
32 if ![info exists SIZE] then {
33 set SIZE [findfile $base_dir/size]
34 }
35 if ![info exists SIZEFLAGS] then {
36 set SIZEFLAGS ""
37 }
38
39 if ![info exists OBJDUMP] then {
40 set OBJDUMP [findfile $base_dir/objdump]
41 }
42 if ![info exists OBJDUMPFLAGS] then {
43 set OBJDUMPFLAGS ""
44 }
45
46 if ![info exists OBJCOPY] then {
47 set OBJCOPY [findfile $base_dir/objcopy]
48 }
49 if ![info exists OBJCOPYFLAGS] then {
50 set OBJCOPYFLAGS ""
51 }
52
53 if ![info exists AR] then {
54 set AR [findfile $base_dir/ar]
55 }
56
57 if ![info exists STRIP] then {
58 set STRIP [findfile $base_dir/strip-new $base_dir/strip-new [transform strip]]
59 }
60 if ![info exists STRIPFLAGS] then {
61 set STRIPFLAGS ""
62 }
63
64 if ![info exists READELF] then {
65 set READELF [findfile $base_dir/readelf]
66 }
67 if ![info exists READELFFLAGS] then {
68 set READELFFLAGS ""
69 }
70
71 if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
72
73 # Make a symlink from tmpdir/gas/as and tmpdir/gas/ld to the assembler
74 # and linker in the build tree, so that we can use a -B option to gcc
75 # to force it to use the newly built assembler/linker.
76 if {![file isdirectory tmpdir/gas]} then {
77 catch "exec mkdir tmpdir/gas" status
78 if {[file isfile ../gas/as-new]} then {
79 catch "exec ln -s ../../../gas/as-new tmpdir/gas/as" status
80 }
81 if {[file isfile ../ld/ld-new]} then {
82 catch "exec ln -s ../../../ld/ld-new tmpdir/gas/ld" status
83 }
84 }
85 set gcc_gas_flag "-B[pwd]/tmpdir/gas/"
86
87 #
88 # binutils_run
89 # run a program, returning the output
90 # sets binutils_run_failed if the program does not exist
91 #
92 proc binutils_run { prog progargs } {
93 default_binutils_run $prog $progargs
94 }
95
96 #
97 # binutils_assemble
98 # assemble a file
99 #
100 proc binutils_assemble { source object } {
101 default_binutils_assemble $source $object
102 }