]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - binutils/testsuite/config/default.exp
gdb/ChangeLog:* valops.c (value_assign): Do not call to value_coerce_to_target.(value...
[thirdparty/binutils-gdb.git] / binutils / testsuite / config / default.exp
CommitLineData
aa820537 1# Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2004, 2005, 2007, 2009
8c2bc687 2# Free Software Foundation, Inc.
252b5132
RH
3
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
32866df7 6# the Free Software Foundation; either version 3 of the License, or
252b5132
RH
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
b43b5d5f 16# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
252b5132
RH
17
18# Please email any bugs, comments, and/or additions to this file to:
19# bug-dejagnu@prep.ai.mit.edu
20
21# This file was written by Rob Savoye. (rob@cygnus.com)
22
252b5132
RH
23load_lib utils-lib.exp
24
25if ![info exists NM] then {
26 set NM [findfile $base_dir/nm-new $base_dir/nm-new [transform nm]]
27}
28if ![info exists NMFLAGS] then {
29 set NMFLAGS ""
30}
252b5132
RH
31if ![info exists SIZE] then {
32 set SIZE [findfile $base_dir/size]
33}
34if ![info exists SIZEFLAGS] then {
35 set SIZEFLAGS ""
36}
252b5132
RH
37if ![info exists OBJDUMP] then {
38 set OBJDUMP [findfile $base_dir/objdump]
39}
40if ![info exists OBJDUMPFLAGS] then {
41 set OBJDUMPFLAGS ""
42}
252b5132
RH
43if ![info exists OBJCOPY] then {
44 set OBJCOPY [findfile $base_dir/objcopy]
45}
46if ![info exists OBJCOPYFLAGS] then {
47 set OBJCOPYFLAGS ""
48}
252b5132
RH
49if ![info exists AR] then {
50 set AR [findfile $base_dir/ar]
51}
252b5132
RH
52if ![info exists STRIP] then {
53 set STRIP [findfile $base_dir/strip-new $base_dir/strip-new [transform strip]]
54}
55if ![info exists STRIPFLAGS] then {
56 set STRIPFLAGS ""
57}
252b5132
RH
58if ![info exists READELF] then {
59 set READELF [findfile $base_dir/readelf]
60}
61if ![info exists READELFFLAGS] then {
62 set READELFFLAGS ""
63}
30fd33bb
L
64if ![info exists ELFEDIT] then {
65 set ELFEDIT [findfile $base_dir/elfedit]
66}
67if ![info exists ELFEDITFLAGS] then {
68 set ELFEDITFLAGS ""
69}
64e08727
DD
70if ![info exists WINDRES] then {
71 set WINDRES [findfile $base_dir/windres]
72}
c9e38879
NC
73if ![info exists DLLTOOL] then {
74 set DLLTOOL [findfile $base_dir/dlltool]
75}
64e08727 76
252b5132
RH
77if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
78
0fd555c4 79# Make a copy from tmpdir/gas/as and tmpdir/gas/ld to the assembler
9a580d9a
L
80# and linker in the build tree, so that we can use a -B option to gcc
81# to force it to use the newly built assembler/linker.
9ab80182
JB
82if {![file isdirectory tmpdir/gas]} {catch "exec mkdir tmpdir/gas" status}
83
84proc link_or_copy { src dst } {
85 if ![catch "exec ln -sf ../../../$src tmpdir/gas/$dst" status] then {return 0}
86 if ![catch "exec ln -f ../$src tmpdir/gas/$dst" status] then {return 0}
87 catch "exec cp -fpu ../$src tmpdir/gas/$dst" status
88}
89
90if {[file isfile gas/as-new[exe_ext]]} then {
91 link_or_copy gas/as-new[exe_ext] as[exe_ext]
92} else {
93 # For non-Windows hosts there may be an executable
94 # without a .exe suffix, so try copying that instead.
95 link_or_copy gas/as-new as[exe_ext]
96}
97# This may not be needed any more...
98if {[file isfile ld/ld-new[exe_ext]]} then {
99 link_or_copy ld/ld-new[exe_ext] ld[exe_ext]
100} else {
101 link_or_copy ld/ld-new ld[exe_ext]
9a580d9a 102}
b67ce46f
JM
103if {[file isfile tmpdir/gas/as[exe_ext]]} then {
104 set gcc_gas_flag "-B[pwd]/tmpdir/gas/"
105 set dlltool_gas_flag "-S [pwd]/tmpdir/gas/as[exe_ext]"
106} else {
107 # Testing an installed toolchain.
108 set gcc_gas_flag ""
109 set dlltool_gas_flag ""
110}
9a580d9a 111
252b5132
RH
112#
113# binutils_run
114# run a program, returning the output
115# sets binutils_run_failed if the program does not exist
116#
117proc binutils_run { prog progargs } {
118 default_binutils_run $prog $progargs
119}
120
121#
122# binutils_assemble
123# assemble a file
124#
125proc binutils_assemble { source object } {
126 default_binutils_assemble $source $object
127}