g++.exp (g++_include_flags): Override libgloss.exp version with one that knows about the new gcc tree structure.
2000-06-27 H.J. Lu <hjl@gnu.org> Loren J. Rittle <ljrittle@acm.org> * lib/g++.exp (g++_include_flags): Override libgloss.exp version with one that knows about the new gcc tree structure. (g++_link_flags): Same. Co-Authored-By: Loren J. Rittle <ljrittle@acm.org> From-SVN: r34735
This commit is contained in:
parent
e57b9d6566
commit
1c7781fbb3
@ -1,3 +1,10 @@
|
||||
2000-06-27 H.J. Lu <hjl@gnu.org>
|
||||
Loren J. Rittle <ljrittle@acm.org>
|
||||
|
||||
* lib/g++.exp (g++_include_flags): Override libgloss.exp
|
||||
version with one that knows about the new gcc tree structure.
|
||||
(g++_link_flags): Same.
|
||||
|
||||
2000-06-26 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* gcc.dg/20000419-1.c, gcc.dg/cpp-mi.c, gcc.dg/cpp-tradwarn1.c,
|
||||
|
@ -62,6 +62,100 @@ proc g++_version { } {
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# provide new versions of g++_include_flags and g++_link_flags (both
|
||||
# originally from libgloss.exp) which know about the new gcc tree structure
|
||||
#
|
||||
proc g++_include_flags { args } {
|
||||
global srcdir
|
||||
|
||||
if [is_remote host] {
|
||||
return ""
|
||||
}
|
||||
|
||||
set gccpath [get_multilibs]
|
||||
set libio_dir ""
|
||||
set flags ""
|
||||
|
||||
set dir [lookfor_file ${srcdir} libg++]
|
||||
if { ${dir} != "" } {
|
||||
append flags "-I${dir} -I${dir}/src "
|
||||
}
|
||||
set odir_v2 [lookfor_file ${gccpath} libstdc++]
|
||||
set sdir_v2 [lookfor_file ${srcdir} libstdc++]
|
||||
if { ${odir_v2} != "" } {
|
||||
append flags "-I${sdir_v2} -I${sdir_v2}/stl "
|
||||
}
|
||||
set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
|
||||
set sdir_v3 [lookfor_file ${srcdir} libstdc++-v3]
|
||||
if { ${odir_v3} != "" } {
|
||||
append flags [exec ${odir_v3}/mkcheck 2 ${odir_v3} ${sdir_v3}]
|
||||
}
|
||||
|
||||
if { ${odir_v2} != "" && ${odir_v3} != ""} {
|
||||
send_error "ERROR: can't handle both libstdc++ and libstdc++-v3 appearing in build tree.\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
return "$flags"
|
||||
}
|
||||
|
||||
proc g++_link_flags { args } {
|
||||
global srcdir
|
||||
global ld_library_path
|
||||
|
||||
set gccpath [get_multilibs];
|
||||
set libio_dir ""
|
||||
set flags ""
|
||||
set ld_library_path "."
|
||||
|
||||
if { $gccpath != "" } {
|
||||
if [file exists "${gccpath}/lib/libstdc++.a"] {
|
||||
append ld_library_path ":${gccpath}/lib"
|
||||
}
|
||||
if [file exists "${gccpath}/libg++/libg++.a"] {
|
||||
append flags "-L${gccpath}/libg++ "
|
||||
append ld_library_path ":${gccpath}/libg++"
|
||||
}
|
||||
if [file exists "${gccpath}/libstdc++/libstdc++.a"] {
|
||||
append flags "-L${gccpath}/libstdc++ "
|
||||
append ld_library_path ":${gccpath}/libstdc++"
|
||||
}
|
||||
if [file exists "${gccpath}/libstdc++-v3/src/.libs/libstdc++.a"] {
|
||||
append flags " -L${gccpath}/libstdc++-v3/src/.libs "
|
||||
append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
|
||||
}
|
||||
if [file exists "${gccpath}/libiberty/libiberty.a"] {
|
||||
append flags "-L${gccpath}/libiberty "
|
||||
}
|
||||
if [file exists "${gccpath}/librx/librx.a"] {
|
||||
append flags "-L${gccpath}/librx "
|
||||
}
|
||||
} else {
|
||||
global tool_root_dir;
|
||||
|
||||
set libgpp [lookfor_file ${tool_root_dir} libg++];
|
||||
if { $libgpp != "" } {
|
||||
append flags "-L${libgpp} ";
|
||||
append ld_library_path ":${libgpp}"
|
||||
}
|
||||
set libstdcpp [lookfor_file ${tool_root_dir} libstdc++];
|
||||
if { $libstdcpp != "" } {
|
||||
append flags "-L${libstdcpp} ";
|
||||
append ld_library_path ":${libstdcpp}"
|
||||
}
|
||||
set libiberty [lookfor_file ${tool_root_dir} libiberty];
|
||||
if { $libiberty != "" } {
|
||||
append flags "-L${libiberty} ";
|
||||
}
|
||||
set librx [lookfor_file ${tool_root_dir} librx];
|
||||
if { $librx != "" } {
|
||||
append flags "-L${librx} ";
|
||||
}
|
||||
}
|
||||
return "$flags"
|
||||
}
|
||||
|
||||
#
|
||||
# g++_init -- called at the start of each subdir of tests
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user