1 # Copyright (C) 1993, 1994 Free Software Foundation, Inc.
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.
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.
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. */
17 # Please email any bugs, comments, and/or additions to this file to:
18 # bug-dejagnu@prep.ai.mit.edu
20 # This file was written by Rob Savoye. (rob@cygnus.com)
22 load_lib util-defs.exp
23 load_lib utils-lib.exp
25 if ![info exists AS] then {
26 set AS [findfile $base_dir/../gas/as.new $base_dir/../gas/as.new [transform as]]
28 if ![info exists ASFLAGS] then {
32 if ![info exists NM] then {
33 set NM [findfile $base_dir/nm.new $base_dir/nm.new [transform nm]]
35 if ![info exists NMFLAGS] then {
39 if ![info exists SIZE] then {
40 set SIZE [findfile $base_dir/size]
42 if ![info exists SIZEFLAGS] then {
46 if ![info exists OBJDUMP] then {
47 set OBJDUMP [findfile $base_dir/objdump]
49 if ![info exists OBJDUMPFLAGS] then {
53 if ![info exists OBJCOPY] then {
54 set OBJCOPY [findfile $base_dir/objcopy]
56 if ![info exists OBJCOPYFLAGS] then {
60 if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
64 # run a program, returning the output
65 # sets binutils_run_failed if the program does not exist
67 proc binutils_run { prog progargs } {
68 default_binutils_run $prog $progargs
75 proc binutils_assemble { as source object } {
76 default_binutils_assemble $as $source $object
80 # add some basic error trapping. These mostly catch programming error's
81 # within the tests themselves
84 buffer_full { perror "internal buffer is full." }
85 "can't open '*'" { perror "Can't open test file." }