1 # Copyright
(C
) 2002 by Red Hat
, Incorporated. All rights
reserved.
3 # Permission to use
, copy
, modify
, and distribute this software
4 # is freely granted
, provided that this notice is preserved.
7 # flags.exp
: overrides the dejagnu versions of libgloss_link_flags
,
8 # newlib_link_flags
, and newlib_include_flags.
10 # These versions of the procedures generate link and
include flags
11 # by searching
for the needed files in the current build and source
12 # directories
, rather than in the build and source paths of the
13 # compiler being used.
15 proc libgloss_link_flags
{ args } {
17 # These
values come from the local site.exp.
21 verbose
"In newlib version of libgloss_link_flags...\n"
31 set target_build_path
"$objdir/$multibuildtop.."
33 set gloss_srcdir
[lookfor_file $
{srcdir
} libgloss
/$target_cpu
]
35 if { $gloss_srcdir
== "" } {
39 if [file
exists $target_build_path
/libgloss
/$target_cpu
] {
40 verbose
"libgloss path is $target_build_path/libgloss/$target_cpu" 2
41 return "-B$target_build_path/libgloss/$target_cpu/ -L$target_build_path/libgloss/$target_cpu -L$gloss_srcdir"
43 verbose
-log "No libgloss support for this target." 2
48 proc newlib_link_flags
{ args } {
52 verbose
"In newlib version of newlib_link_flags...\n"
58 set ld_script_path
[lookfor_file $
{tool_root_dir
} "ld/ldscripts"];
59 if { $ld_script_path
!= "" } {
60 set result
"-L[file dirname $ld_script_path]"
65 return "$result -B$objdir -L$objdir"
68 proc newlib_include_flags
{ args } {
71 verbose
"In newlib version of newlib_include_flags...\n"
77 set newlib_dir
[lookfor_file $
{srcdir
} newlib
/libc
/include/assert.h
]
78 if { $
{newlib_dir
} != "" } {
79 set newlib_dir
[file dirname $
{newlib_dir
}]
81 return " -I$objdir/targ-include -I${newlib_dir}"