1 load_lib libgomp
-dg.exp
2 load_gcc_lib gcc
-dg.exp
5 set libstdc
++_library_path
"../libstdc++-v3/src/.libs"
6 set shlib_ext
[get_shlib_extension
]
7 if { ![file
exists "${blddir}/${libstdc++_library_path}/libstdc++.a"]
8 && ![file
exists "${blddir}/${libstdc++_library_path}/libstdc++.${shlib_ext}"] } {
9 verbose
-log "No libstdc++ library found, will not execute c++ tests"
10 unset libstdc
++_library_path
13 lappend lang_library_paths $
{libstdc
++_library_path
}
14 } elseif
{ ![info exists GXX_UNDER_TEST
] } {
15 verbose
-log "GXX_UNDER_TEST not defined, will not execute c++ tests"
18 if { $blddir
!= "" } {
19 set lang_source_re
{^.
*\.
[cC
]$
}
20 set lang_include_flags
[exec sh $
{blddir
}/..
/libstdc
++-v3
/scripts
/testsuite_flags
--build
-includes
]
22 lappend ALWAYS_CFLAGS
"compiler=$GXX_UNDER_TEST"
24 #
If a testcase doesn
't have special options, use these.
25 if ![info exists DEFAULT_CFLAGS] then {
26 set DEFAULT_CFLAGS "-O2"
33 lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
35 # Gather a list of all tests.
36 set tests [lsort [concat \
37 [find $srcdir/$subdir *.C] \
38 [find $srcdir/$subdir/../libgomp.c-c++-common *.c]]]
40 set ld_library_path $always_ld_library_path
41 if { $blddir != "" } {
42 append ld_library_path ":${blddir}/${libstdc++_library_path}"
44 append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
45 set_ld_library_path_env_vars
48 dg-runtest $tests "" $DEFAULT_CFLAGS
50 if { $blddir != "" } {
52 unset lang_include_flags
53 unset libstdc++_library_path
54 unset lang_library_paths