bug-dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-dejagnu] [patch] Fix for MULTILIB_EXTRA_OPTS handling in get_multil


From: Matt Hiller
Subject: [Bug-dejagnu] [patch] Fix for MULTILIB_EXTRA_OPTS handling in get_multilibs
Date: Tue, 1 May 2001 16:30:55 -0700 (PDT)

        The routines for handling MULTILIB_EXTRA_OPTS in get_multilibs can
slurp up too much of the the strings output by
'$compiler --print-multi-lib'. This patch fixes this.

--

Matt Hiller
GCC Engineer, Red Hat, Inc., Sunnyvale office
address@hidden

2001-05-01  Matt Hiller  <address@hidden>

        * lib/libgloss.exp (get_multilibs): Correction to Catherine
        Moore's patch of 2000-06-09.

Index: lib/libgloss.exp
===================================================================
RCS file: /cvsroot/dejagnu/dejagnu/lib/libgloss.exp,v
retrieving revision 1.1.1.1
diff -u -5 -r1.1.1.1 libgloss.exp
--- lib/libgloss.exp    2001/02/05 04:32:42     1.1.1.1
+++ lib/libgloss.exp    2001/05/01 23:29:12
@@ -419,16 +419,19 @@
     }
 
     # set output [exec $objdump_name --file-headers objfmtst.o ]
     set default_multilib [exec $compiler --print-multi-lib]
     set default_multilib [lindex $default_multilib 0];
-    set extra [string trimleft $default_multilib "."]
+    set extra [string trimleft $default_multilib ".;@"]
 
     # extract the options and their directory names as know by gcc
     foreach i "[exec $compiler --print-multi-lib]" {
        if {$extra != ""} {
-         set i [string trimright $i $extra"]
+           # string trimright would do the wrong thing if we included
+           # the leading @ in $extra
+           set i [string trimright $i $extra]
+           set i [string trimright $i "@"]
        }
        set opts ""
        set dir ""
        regexp -- "\[a-z0-9=/\.-\]*;" $i dir
        set dir [string trimright $dir "\;@"]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]