This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: fix multilib generation for sparc64-linux


When generating the multilib options for sparc64-linux I noticed a few
problems. The current options allow for an "alt" that uses the
"-mcmodel=medany -mno-app-regs" options. Under a normal compile we end up
with a 'alt/' and '64/alt' multilib directory that are identical. Also
when compiling using --with-cpu=v7 (default m32) we attempt to compile the
'alt/' directory using the above options. This fails given that -mcmodel
is invalid when we use -m32. This patche fixes both of these (actually
the same problem, just two different symptoms) and also one small
gramatical error in genmultilib that I saw :)

With these we get a multilib.h that looks like:

static char *multilib_raw[] = {
". !m64 !m32 !mno-app-regs !mcmodel=medany;",
"64 m64 !m32 !mno-app-regs !mcmodel=medany;",
"32 !m64 m32 !mno-app-regs !mcmodel=medany;",
"64/alt m64 !m32 mno-app-regs mcmodel=medany;",
"64/alt m64 !m32 mno-app-regs !mcmodel=medany;",
"64/alt m64 !m32 !mno-app-regs mcmodel=medany;",
NULL
};

static char *multilib_matches_raw[] = {
"mcmodel=medmid mcmodel=medany;",
"m64 m64;",
"m32 m32;",
"mno-app-regs mno-app-regs;",
"mcmodel=medany mcmodel=medany;",
NULL
};

This is what we want given that m64 will be the multilib_default (or
passed as an arg), and so the mno-app-regs and mcmodel=* options will match.
It makes for an odd directory layout however, since when compiling with
the default target cpu of v9 we will have '32/' and '64/alt' multilib
dirs, but I don't know how to get by this since genmultilib doesn't know
the default options (unless I missed something).

---------

1999-12-12  Ben Collins  <bcollins@debian.org>

	* t-linux64: (MULTILIB_EXCEPTIONS) fix matches for exceptions so
	  we don't get duplicate for the 64/alt or bad options being tried
	  for m32
	* genmultilib: fix gramatical error in comments

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`     bcollins@debian.org  -  collinbm@djj.state.va.us  -  bmc@visi.net    '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'
Index: config/sparc/t-linux64
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sparc/t-linux64,v
retrieving revision 1.3
diff -u -r1.3 t-linux64
--- t-linux64	1999/12/09 10:41:45	1.3
+++ t-linux64	1999/12/12 15:34:51
@@ -1,7 +1,7 @@
 MULTILIB_OPTIONS = m64/m32 mno-app-regs|mcmodel=medany
 MULTILIB_DIRNAMES = 64 32 alt 
 MULTILIB_MATCHES = mcmodel?medany=mcmodel?medmid
-MULTILIB_EXCEPTIONS = *m32/*medany *m32/*mno-app-regs
+MULTILIB_EXCEPTIONS = m32/*mcmodel* m32/*mno-app-regs* mcmodel=* mno-app-regs*
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
Index: genmultilib
===================================================================
RCS file: /cvs/gcc/egcs/gcc/genmultilib,v
retrieving revision 1.4
diff -u -r1.4 genmultilib
--- genmultilib	1999/12/09 10:41:44	1.4
+++ genmultilib	1999/12/12 15:35:30
@@ -136,7 +136,7 @@
 
 rm -f tmpmultilib
 
-# If there exceptions, weed them out now
+# If there are exceptions, weed them out now
 if [ -n "${exceptions}" ]; then
   rm -f tmpmultilib2
   cat >tmpmultilib2 <<\EOF

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]