[committed] Fix LD_LIBRARY_PATH setting in libgomp fortran.exp testing (PR libgomp/47804)
Jakub Jelinek
jakub@redhat.com
Fri Feb 18 20:58:00 GMT 2011
Hi!
The recent change resulted in libgfortran/.libs not being added
into LD_LIBRARY_PATH for fortran libgomp testing if libquadmath
didn't exist, which is wrong.
Additionally, similarly to the earlier checks in fortran.exp we should
test both libquadmath.a and libquadmath.${shlib_ext} presence.
Bootstrapped/regtested on x86_64-linux and i686-linux, manually tested
with removing libquadmath.a, then also libquadmath.so, committed to trunk.
2011-02-18 Jakub Jelinek <jakub@redhat.com>
PR libgomp/47804
* testsuite/libgomp.fortran/fortran.exp: Check for both
libquadmath.a and libquadmath.${shlib_ext}. If neither exists,
but $blddir != "", still append ${blddir}/${lang_library_path}
to ld_library_path.
--- libgomp/testsuite/libgomp.fortran/fortran.exp.jj 2011-02-18 08:49:27.000000000 +0100
+++ libgomp/testsuite/libgomp.fortran/fortran.exp 2011-02-18 18:29:07.000000000 +0100
@@ -37,11 +37,16 @@ if { $lang_test_file_found } {
# Gather a list of all tests.
set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
- if { ($blddir != "") && [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"] } {
- lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
- # Allow for spec subsitution.
- lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/"
- set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}"
+ if { $blddir != "" } {
+ if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
+ || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
+ lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
+ # Allow for spec subsitution.
+ lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/"
+ set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}"
+ } else {
+ set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
+ }
} else {
set ld_library_path "$always_ld_library_path"
}
Jakub
More information about the Gcc-patches
mailing list