[patch] xx

Catherine Moore clm@cygnus.com
Wed Jun 7 14:41:00 GMT 2000

For ports which define MULTILIB_EXTRA_OPTS, dejagnu is unable
to build the proper library pathnames for multilibs.  Dejagnu
uses the output from the --print-multi-lib option to gcc and
the multilib options from the site.exp file to choose the
appropriate multilib.  It then builds the pathname from the

The MULTILIB_EXTRA_OPTS definition causes extra output
to be emitted in the --print-multi-lib output.  Dejagnu
then fails to match the appropriate multilib.  The 
--print-multilib-output is used to build options for 
Makefiles and should not be changed to correct this
problem.  This patch will trim the extra option from the
--print-multi-lib output so that dejagnu can properly
match the multilib.  Please let me know if this is OK
to commit.


Fri Jun  2 15:29:48 2000  Catherine Moore  <clm@cygnus.com>

	* lib/libgloss.exp (proc_get_multilibs):  Handle multilib
        pathnames for ports that have defined MULTILIB_EXTRA_OPTS.

Index: libgloss.exp
RCS file: /cvs/src/src/dejagnu/lib/libgloss.exp,v
retrieving revision
diff -p -r1.1.1.1 libgloss.exp
*** libgloss.exp	1999/11/09 01:28:42
--- libgloss.exp	2000/06/07 21:26:12
*************** proc get_multilibs { args } {
*** 418,425 ****
--- 418,433 ----
  	set comp_base_dir [file dirname [file dirname [file dirname [file dirname [file dirname [exec $compiler --print-prog-name=cc1]]]]]];
+     # 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 "."]
      # 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"]
+ 	}
  	set opts ""
  	set dir ""
  	regexp -- "\[a-z0-9=/\.-\]*;" $i dir

More information about the Gdb-patches mailing list