This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[patch] xx
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [patch] xx
- From: Catherine Moore <clm at cygnus dot com>
- Date: Wed, 07 Jun 2000 14:41:13 -0700
- cc: clm at cygnus dot com, law at cygnus dot com
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
match.
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.
Thanks,
Catherine
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 1.1.1.1
diff -p -r1.1.1.1 libgloss.exp
*** libgloss.exp 1999/11/09 01:28:42 1.1.1.1
--- 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