diff options
author | Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> | 2001-10-04 19:49:54 +0000 |
---|---|---|
committer | Toon Moene <toon@gcc.gnu.org> | 2001-10-04 19:49:54 +0000 |
commit | d9c28ce3a4b7a885ee63b295036f95f861bf212d (patch) | |
tree | da28733db3e6b73702afef4e8d5598b314f97644 | |
parent | 7f50e2e396b2450cedd2116220a99289cae0d6d9 (diff) | |
download | gcc-d9c28ce3a4b7a885ee63b295036f95f861bf212d.zip gcc-d9c28ce3a4b7a885ee63b295036f95f861bf212d.tar.gz gcc-d9c28ce3a4b7a885ee63b295036f95f861bf212d.tar.bz2 |
g77.exp: set libg2c_dir correctly.
2001-10-04 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
* lib/g77.exp: set libg2c_dir correctly.
From-SVN: r46013
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/lib/g77.exp | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e289f1a..0335486 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-10-04 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> + + * lib/g77.exp: set libg2c_dir correctly. + 2001-10-02 Neil Booth <neil@daikokuya.demon.co.uk> * gcc.dg/cpp/macro11.c: New test. diff --git a/gcc/testsuite/lib/g77.exp b/gcc/testsuite/lib/g77.exp index b5287a7..44ea774 100644 --- a/gcc/testsuite/lib/g77.exp +++ b/gcc/testsuite/lib/g77.exp @@ -116,10 +116,14 @@ proc g77_init { args } { } proc g77_target_compile { source dest type options } { + global rootme; global tmpdir; global gluefile wrap_flags; global G77_UNDER_TEST global TOOL_OPTIONS + global ld_library_path; + + set ld_library_path ".:${rootme}" if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } { lappend options "libs=${gluefile}" @@ -143,12 +147,21 @@ proc g77_target_compile { source dest type options } { } if ![is_remote host] { set gccpath "[get_multilibs]" - set libg2c_dir [lookfor_file ${gccpath} libf2c/libg2c.a] + set libg2c_dir [lookfor_file ${gccpath} libf2c/libg2c.la] if { $libg2c_dir != "" } { set libg2c_link_flags "-L[file dirname ${libg2c_dir}]" lappend options "additional_flags=${libg2c_link_flags}" } } + set g2cpath "[get_multilibs]" + set libg2c_dir [lookfor_file ${g2cpath} libf2c/.libs/libg2c.a] + if { $libg2c_dir != "" } { + set libg2c_dir [file dirname ${libg2c_dir}] + set g2c_link_flags "-L${libg2c_dir}" + lappend options "additional_flags=${g2c_link_flags}" + append ld_library_path ":${libg2c_dir}" + } + lappend options "compiler=$G77_UNDER_TEST" return [target_compile $source $dest $type $options] } |