1 load_lib libgomp
-dg.exp
6 set shlib_ext
[get_shlib_extension
]
7 set lang_library_path
"../libgfortran/.libs"
8 set lang_link_flags
"-lgfortran"
9 set lang_test_file_found
0
10 set quadmath_library_path
"../libquadmath/.libs"
16 if { $blddir
!= "" } {
17 # Look
for a static libgfortran first.
18 if [file
exists "${blddir}/${lang_library_path}/libgfortran.a"] {
19 set lang_test_file
"${lang_library_path}/libgfortran.a"
20 set lang_test_file_found
1
21 # We may have a shared only build
, so look
for a shared libgfortran.
22 } elseif
[file
exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] {
23 set lang_test_file
"${lang_library_path}/libgfortran.${shlib_ext}"
24 set lang_test_file_found
1
26 puts
"No libgfortran library found, will not execute fortran tests"
28 } elseif
[info exists GFORTRAN_UNDER_TEST
] {
29 set lang_test_file_found
1
30 # Needs to exist
for libgomp.exp.
33 puts
"GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
36 if { $lang_test_file_found
} {
37 # Gather a list of all tests.
38 set tests
[lsort
[find $srcdir
/$subdir
*.\
[fF\
]{,90,95,03,08}]]
40 if { ($blddir
!= "") && [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"] } {
41 lappend ALWAYS_CFLAGS
"ldflags=-L${blddir}/${quadmath_library_path}/"
42 # Allow
for spec subsitution.
43 lappend ALWAYS_CFLAGS
"additional_flags=-B${blddir}/${quadmath_library_path}/"
44 set ld_library_path
"$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}"
46 set ld_library_path
"$always_ld_library_path"
48 append ld_library_path
[gcc
-set-multilib
-library
-path $GCC_UNDER_TEST
]
49 set_ld_library_path_env_vars
52 gfortran
-dg
-runtest $tests
""