diff options
author | Andreas Tobler <a.tobler@schweiz.org> | 2007-03-23 19:25:19 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2007-03-23 20:25:19 +0100 |
commit | 1850744bdd4f4e092a22e1424f6f2dd8bda681fd (patch) | |
tree | dbb5e839cddaaac02bf54e9eb8aec18d32f52593 | |
parent | b737d953fda13f9bed028c72f84486ab81498717 (diff) | |
download | gcc-1850744bdd4f4e092a22e1424f6f2dd8bda681fd.zip gcc-1850744bdd4f4e092a22e1424f6f2dd8bda681fd.tar.gz gcc-1850744bdd4f4e092a22e1424f6f2dd8bda681fd.tar.bz2 |
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
-rw-r--r-- | libgomp/ChangeLog | 7 | ||||
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c++/c++.exp | 26 |
3 files changed, 33 insertions, 5 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index a6f7032..bcfa440 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,10 @@ +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. + 2007-03-18 Uros Bizjak <ubizjak@gmail.com> * testsuite/config/default.exp: New file. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 98c07aa..2e9f9d8 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -124,6 +124,11 @@ proc libgomp_init { args } { && [check_effective_target_ilp32] } { lappend ALWAYS_CFLAGS "additional_flags=-march=i486" } + + if [istarget *-*-darwin*] { + lappend ALWAYS_CFLAGS "additional_flags=-shared-libgcc" + } + if [istarget sparc*-*-*] { lappend ALWAYS_CFLAGS "additional_flags=-mcpu=v9" } diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp index 0bc657e..213ce02 100644 --- a/libgomp/testsuite/libgomp.c++/c++.exp +++ b/libgomp/testsuite/libgomp.c++/c++.exp @@ -1,14 +1,30 @@ -set lang_library_path "../libstdc++-v3/src/.libs" -set lang_test_file "${lang_library_path}/libstdc++.a" -set lang_link_flags "-lstdc++" - 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 -if [file exists "${blddir}/${lang_test_file}"] { +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]] |