4 |
# it under the terms of the GNU General Public License as published by |
# 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 |
# the Free Software Foundation; either version 2 of the License, or |
6 |
# (at your option) any later version. |
# (at your option) any later version. |
7 |
# |
# |
8 |
# This program is distributed in the hope that it will be useful, |
# This program is distributed in the hope that it will be useful, |
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 |
# GNU General Public License for more details. |
# GNU General Public License for more details. |
12 |
# |
# |
13 |
# You should have received a copy of the GNU General Public License |
# You should have received a copy of the GNU General Public License |
14 |
# along with this program; if not, write to the Free Software |
# along with this program; if not, write to the Free Software |
15 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
16 |
|
|
17 |
# Please email any bugs, comments, and/or additions to this file to: |
# Please email any bugs, comments, and/or additions to this file to: |
18 |
# bug-dejagnu@prep.ai.mit.edu |
# bug-dejagnu@prep.ai.mit.edu |
66 |
warning "Couldn't find the linker script name for target" |
warning "Couldn't find the linker script name for target" |
67 |
return "" |
return "" |
68 |
} |
} |
69 |
|
|
70 |
# if we're on a remote host, we can't search for the file, so use the |
# if we're on a remote host, we can't search for the file, so use the |
71 |
# linker script in the path. |
# linker script in the path. |
72 |
if [is3way] { |
if [is3way] { |
73 |
return "-T${script}" |
return "-T${script}" |
74 |
} |
} |
75 |
|
|
76 |
# search for the general directories |
# search for the general directories |
77 |
foreach i ".. ../.. ../../.. ../../../.." { |
foreach i ".. ../.. ../../.. ../../../.." { |
78 |
verbose "Looking for a ${srcdir}/${i}/libgloss/${target_cpu}/${script}" 2 |
verbose "Looking for a ${srcdir}/${i}/libgloss/${target_cpu}/${script}" 2 |
88 |
|
|
89 |
# |
# |
90 |
# Find all the pieces of libgloss for testing the GNU development tools |
# Find all the pieces of libgloss for testing the GNU development tools |
91 |
# needed to use $CC or $CXX. It returns a string suitable to pass to |
# needed to use $CC or $CXX. It returns a string suitable to pass to |
92 |
# $CC or $CXX to get a fully linked binary for the target. |
# $CC or $CXX to get a fully linked binary for the target. |
93 |
# |
# |
94 |
proc libgloss_flags { } { |
proc libgloss_flags { } { |
107 |
if [is3way] { |
if [is3way] { |
108 |
return "[libgloss_script]" |
return "[libgloss_script]" |
109 |
} |
} |
110 |
|
|
111 |
# search for the general directories |
# search for the general directories |
112 |
foreach i ".. ../.. ../../.. ../../../.." { |
foreach i ".. ../.. ../../.. ../../../.." { |
113 |
if [file exists ${base_dir}/${i}/${target_alias}/libgloss/${target_cpu} ] { |
if [file exists ${base_dir}/${i}/${target_alias}/libgloss/${target_cpu} ] { |
115 |
return "-L${base_dir}/${i}/${target_alias}/libgloss/${target_cpu} [libgloss_script]" |
return "-L${base_dir}/${i}/${target_alias}/libgloss/${target_cpu} [libgloss_script]" |
116 |
} |
} |
117 |
} |
} |
118 |
|
|
119 |
# we didn't find any support at all |
# we didn't find any support at all |
120 |
return "[libgloss_script]" |
return "[libgloss_script]" |
121 |
} |
} |
206 |
} else { |
} else { |
207 |
perror "No crt0.o built for this target" |
perror "No crt0.o built for this target" |
208 |
} |
} |
209 |
|
|
210 |
# find the BSP (currently an object, it may become an archive soon) |
# find the BSP (currently an object, it may become an archive soon) |
211 |
foreach i "[list_targets]" { |
foreach i "[list_targets]" { |
212 |
if [info exists target_info($i,name}] { |
if [info exists target_info($i,name}] { |