* ld-bootstrap/bootstrap.exp: Pass cmp output through
[external/binutils.git] / ld / testsuite / config / default.exp
1 # Basic expect script for LD Regression Tests
2 #   Copyright (C) 1993,1994 Free Software Foundation
3 #
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
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
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
17 #
18 # Written by Jeffrey Wheat (cassidy@cygnus.com)
19 #
20
21 if ![info exists ld] then {
22     set ld [findfile $objdir/ld.new $objdir/ld.new [transform ld]]
23 }
24
25 if ![info exists as] then {
26     set as [findfile $base_dir/../gas/as.new $base_dir/../gas/as.new [transform as]]
27 }
28
29 if ![info exists nm] then {
30     set nm [findfile $base_dir/../binutils/nm.new $base_dir/../binutils/nm.new [transform nm]]
31 }
32
33 if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
34
35 # load the utility procedures
36 load_lib ld.exp
37
38 #
39 # ld_version -- extract and print the version number of ld compiler (GCC)
40 #
41 proc ld_version {} {
42     global ld
43     default_ld_version $ld
44 }
45
46 #
47 # ld_exit -- just a stub for ld
48 #
49 proc ld_exit {} {
50 }
51
52 #
53 # ld_start 
54 #       relink the linker
55 #
56 proc ld_start { ld target } {
57         #
58 }
59
60 #
61 # ld_relocate 
62 #       link an object using relocation
63 #
64 proc ld_relocate { ld target objects } {
65         default_ld_relocate $ld $target $objects
66 }
67
68 #
69 # ld_link 
70 #       link a program using ld
71 #
72 proc ld_link { ld target objects } {
73         default_ld_link $ld $target $objects
74 }
75
76 #
77 # ld_simple_link 
78 #       link a program using ld, without including any libraries
79 #
80 proc ld_simple_link { ld target objects } {
81         default_ld_simple_link $ld $target $objects
82 }
83
84 #
85 # ld_compile 
86 #       compile an object using $cc
87 #
88 proc ld_compile { cc source object } {
89         default_ld_compile $cc $source $object 
90 }
91
92 #
93 # ld_assemble
94 #       assemble a file
95 #
96 proc ld_assemble { as source object } {
97         default_ld_assemble $as $source $object 
98 }
99
100 #
101 # ld_nm
102 #       run nm on a file
103 #
104 proc ld_nm { nm object } {
105         default_ld_nm $nm $object
106 }
107
108 #
109 # ld_exec
110 #       execute ithe target
111 #
112 proc ld_exec { target output } {
113         default_ld_exec $target $output
114 }
115