From d9c28ce3a4b7a885ee63b295036f95f861bf212d Mon Sep 17 00:00:00 2001 From: Peter Schmid Date: Thu, 4 Oct 2001 19:49:54 +0000 Subject: [PATCH] g77.exp: set libg2c_dir correctly. 2001-10-04 Peter Schmid * lib/g77.exp: set libg2c_dir correctly. From-SVN: r46013 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/lib/g77.exp | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e289f1a4685..0335486a156 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-10-04 Peter Schmid + + * lib/g77.exp: set libg2c_dir correctly. + 2001-10-02 Neil Booth * gcc.dg/cpp/macro11.c: New test. diff --git a/gcc/testsuite/lib/g77.exp b/gcc/testsuite/lib/g77.exp index b5287a79a9f..44ea774d970 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] } -- 2.30.2