gcc/libgomp/testsuite/libgomp.c++/c++.exp
Andreas Tobler 1850744bdd libgomp.exp (libgomp_init): Add -shared-libgcc for *-*-darwin*.
2007-03-23  Andreas Tobler  <a.tobler@schweiz.org>

	* testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for
	*-*-darwin*.
	* testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library
	and use it if found.

From-SVN: r123162
2007-03-23 20:25:19 +01:00

40 lines
1.1 KiB
Plaintext

load_lib libgomp-dg.exp
global shlib_ext
set shlib_ext [get_shlib_extension]
set lang_link_flags "-lstdc++"
set lang_test_file_found 0
set lang_library_path "../libstdc++-v3/src/.libs"
# Initialize dg.
dg-init
set blddir [lookfor_file [get_multilibs] libgomp]
# Look for a static libstdc++ first.
if [file exists "${blddir}/${lang_library_path}/libstdc++.a"] {
set lang_test_file "${lang_library_path}/libstdc++.a"
set lang_test_file_found 1
# We may have a shared only build, so look for a shared libstdc++.
} elseif [file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] {
set lang_test_file "${lang_library_path}/libstdc++.${shlib_ext}"
set lang_test_file_found 1
} else {
puts "No libstdc++ library found, will not execute c++ tests"
}
if { $lang_test_file_found } {
# Gather a list of all tests.
set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]]
set ld_library_path [concat $always_ld_library_path ":${blddir}/${lang_library_path}"]
set_ld_library_path_env_vars
# Main loop.
gfortran-dg-runtest $tests ""
}
# All done.
dg-finish