diff options
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 8 | ||||
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 16 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c++/c++.exp | 31 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/fortran.exp | 24 |
4 files changed, 62 insertions, 17 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index efa3639..2b9fedf 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,11 @@ +2008-08-12 Nathan Froyd <froydnj@codesourcery.com> + + * testsuite/libgomp.exp (libgomp_init): Only set things that + depend on blddir if blddir exists. + (libgomp_target_compile): Likewise. + * testsuite/libgomp.c++/c++.exp: Likewise. + * testsuite/libgomp.fortran/fortran.exp: Likewise. + 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * libgomp.texi: Update to GFDL 1.2. Update copyright years. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 9aa891f..f86f1a1 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -119,10 +119,13 @@ proc libgomp_init { args } { } set ALWAYS_CFLAGS "" - lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/" - lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}" + if { $blddir != "" } { + lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/" + lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}" + lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" + } lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." - lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs -lgomp" + lappend ALWAYS_CFLAGS "ldflags=-lgomp" # We use atomic operations in the testcases to validate results. if { ([istarget i?86-*-*] || [istarget x86_64-*-*]) @@ -164,8 +167,11 @@ proc libgomp_target_compile { source dest type options } { global lang_library_path global lang_link_flags - if { [info exists lang_test_file] && [file exists "${blddir}/"] } { - lappend options "ldflags=-L${blddir}/${lang_library_path} ${lang_link_flags}" + if { [info exists lang_test_file] } { + if { $blddir != "" } { + lappend options "ldflags=-L${blddir}/${lang_library_path}" + } + lappend options "ldflags=${lang_link_flags}" } if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp index d9872cc..decda3d 100644 --- a/libgomp/testsuite/libgomp.c++/c++.exp +++ b/libgomp/testsuite/libgomp.c++/c++.exp @@ -12,23 +12,36 @@ 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}" + +if { $blddir != "" } { + # 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" + } +} elseif { [info exists GXX_UNDER_TEST] } { set lang_test_file_found 1 + # Needs to exist for libgomp.exp. + set lang_test_file "" } else { - puts "No libstdc++ library found, will not execute c++ tests" + puts "GXX_UNDER_TEST not defined, 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 "$always_ld_library_path:${blddir}/${lang_library_path}" + if { $blddir != "" } { + set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + } else { + set ld_library_path "$always_ld_library_path" + } append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp index 293ccbc..0f7ad6e 100644 --- a/libgomp/testsuite/libgomp.fortran/fortran.exp +++ b/libgomp/testsuite/libgomp.fortran/fortran.exp @@ -1,18 +1,36 @@ set lang_library_path "../libgfortran/.libs" -set lang_test_file "${lang_library_path}/libgfortranbegin.a" set lang_link_flags "-lgfortranbegin -lgfortran" +set lang_test_file_found 0 load_lib libgomp-dg.exp # Initialize dg. dg-init -if [file exists "${blddir}/${lang_test_file}"] { +if { $blddir != "" } { + if [file exists "${blddir}/${lang_library_path}/libgfortranbegin.a"] { + set lang_test_file "${lang_library_path}/libgfortranbegin.a" + set lang_test_file_found 1 + } else { + puts "No libgfortranbegin library found, will not execute fortran tests" + } +} elseif [info exists GFORTRAN_UNDER_TEST] { + set lang_test_file_found 1 + # Needs to exist for libgomp.exp. + set lang_test_file "" +} else { + puts "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests" +} +if { $lang_test_file_found } { # Gather a list of all tests. set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]] - set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + if { $blddir != "" } { + set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + } else { + set ld_library_path "$always_ld_library_path" + } append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] set_ld_library_path_env_vars |