OSDN Git Service

* cgraph.c (first_cgraph_function_insertion_hook): New variable.
[pf3gnuchains/gcc-fork.git] / libgomp / testsuite / libgomp.c++ / c++.exp
1 load_lib libgomp-dg.exp
2
3 global shlib_ext
4
5 set shlib_ext [get_shlib_extension]
6 set lang_link_flags "-lstdc++"
7 set lang_test_file_found 0
8 set lang_library_path "../libstdc++-v3/src/.libs"
9
10 # Initialize dg.
11 dg-init
12
13 set blddir [lookfor_file [get_multilibs] libgomp]
14
15 # Look for a static libstdc++ first.
16 if [file exists "${blddir}/${lang_library_path}/libstdc++.a"] {
17     set lang_test_file "${lang_library_path}/libstdc++.a"
18     set lang_test_file_found 1
19 # We may have a shared only build, so look for a shared libstdc++.
20 } elseif [file exists "${blddir}/${lang_library_path}/libstdc++.${shlib_ext}"] {
21     set lang_test_file "${lang_library_path}/libstdc++.${shlib_ext}"
22     set lang_test_file_found 1
23 } else {
24     puts "No libstdc++ library found, will not execute c++ tests"
25 }
26
27 if { $lang_test_file_found } {
28     # Gather a list of all tests.
29     set tests [lsort [glob -nocomplain $srcdir/$subdir/*.C]]
30
31     set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
32     append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
33     set_ld_library_path_env_vars
34
35     set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
36     if { [file exists $flags_file] } {
37         set libstdcxx_includes [exec sh $flags_file --build-includes]
38     } else {
39         set libstdcxx_includes ""
40     }
41
42     # Main loop.
43     gfortran-dg-runtest $tests $libstdcxx_includes
44 }
45
46 # All done.
47 dg-finish