OSDN Git Service

2001-10-04 Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
authortoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Oct 2001 19:49:54 +0000 (19:49 +0000)
committertoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Oct 2001 19:49:54 +0000 (19:49 +0000)
* lib/g77.exp: set libg2c_dir correctly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46013 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/lib/g77.exp

index e289f1a..0335486 100644 (file)
@@ -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.
index b5287a7..44ea774 100644 (file)
@@ -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]
 }