+2006-10-16 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/29095 continued
+ * testsuite/lib/libstdc++.exp (v3_target_compile_as_c): Additions
+ so that testing not in the build directory works for the "C"
+ target language.
+
2006-10-16 Jakub Jelinek <jakub@redhat.com>
* include/bits/basic_string.tcc (_Rep::_S_create): Call
global gluefile wrap_flags
global ld_library_path
global target_triplet
+ global flags_file
# We set LC_ALL and LANG to C so that we get the same error
# messages as expected.
set includes [exec sh $flags_file --build-includes]
} else {
set cxx [transform "g++"]
- set includes "-I${srcdir}/util"
set cxxldflags ""
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
+ set includes "-I${srcdir}/util"
}
}
global gluefile
global wrap_flags
global includes
+ global flags_file
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}"
}
set tname [target_info name]
- set cc_final [board_info $tname compiler]
- set cxxlibglossflags [libgloss_link_flags]
+ set cc [board_info $tname compiler]
+ set cc_final $cc
+ set cxxlibglossflags [libgloss_link_flags]
set cc_final [concat $cc_final $cxxlibglossflags]
set cc_final [concat $cc_final $includes]
regsub -all ".nostdinc.." $cc_final "" cc_final
+ # This is needed for "C" tests, as this type of test may need the
+ # C++ includes. And if we're not testing in the build directory,
+ # the includes variable is not likely to include the necessary info.
+ if { ![file exists $flags_file] } {
+ set version [exec ${cc} -dumpversion]
+ set machine [exec ${cc} -dumpmachine]
+ set comp_base_dir [file dirname [file dirname [file dirname [file dirname [file dirname [exec ${cc} --print-prog-name=cc1]]]]]]
+ set includesbase "${comp_base_dir}/include/c++/${version}"
+ set includestarget "${includesbase}/${machine}"
+ set cc_final [concat $cc_final "-I$includesbase -I$includestarget"]
+ }
+
lappend options "compiler=$cc_final"
lappend options "timeout=600"