public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re:  Multilib nightmares (breaking EGCS builds)
@ 1997-08-26 14:34 meissner
  0 siblings, 0 replies; 5+ messages in thread
From: meissner @ 1997-08-26 14:34 UTC (permalink / raw)
  To: egcs

| your compiler doesn't do multilibing.  Given the above, I would expect the
| following to be in gcc/config/t-sco5:
| 
| 	MULTILIB_OPTIONS    = mcoff/melf fPIC
| 	MULTILIB_DIRNAMES   = coff elf pic
| 	MULTILIB_EXCEPTIONS = *mcoff*/*fPIC*
| 	MULTILIB_EXTRA_OPTS =

You probably also want:

	MULTILIB_MATCHES = fPIC=fpic

so that use of either -fpic or -fPIC will use the libraries compiled with
-fPIC.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re:  Multilib nightmares (breaking EGCS builds)
@ 1997-08-26 14:34 meissner
  0 siblings, 0 replies; 5+ messages in thread
From: meissner @ 1997-08-26 14:34 UTC (permalink / raw)
  To: egcs

| > your compiler doesn't do multilibing.  Given the above, I would expect the
| > following to be in gcc/config/t-sco5:
| > 
| > 	MULTILIB_OPTIONS    = mcoff/melf fPIC
| > 	MULTILIB_DIRNAMES   = coff elf pic
| > 	MULTILIB_EXCEPTIONS = *mcoff*/*fPIC*
| > 	MULTILIB_EXTRA_OPTS =
| > 
| > Then in your sco5.h file you would have:
| > 	#define MULTILIB_DEFAULTS { "melf" }
| Done. This works like a charm. I have just a few further questions, and I
| can lay the Open Server multilib stuff to bed: How can I make fPIC and
| fpic be the same, in terms of multilibbing? IE, both should use the
| directory pic/.

I just answered that in another message (ie, using MULTILIB_MATCHES).

|		  Also, what is the point of "elf" in the MULTILIB_DIRNAMES
| variable? Surely I only need two directories: coff and pic. The elf
| directory is not required as it is the default. I took a look at the
| generated multilib.h and this does not seem to be the case. I have
| included this generated file below, in case it helps you at all.

The MULTILIB_OPTIONS & MULTILIB_DIRNAMES lines above would want to create the
following directories:

	<dir>		no switches
	<dir>/coff	-mcoff
	<dir>/elf	-melf
	<dir>/coff/pic	-mcoff -fPIC
	<dir>/elf/pic	-melf -fPIC
	<dir>/pic	-fPIC

The MULTILIB_EXCEPTIONS line prevents -mcoff -fPIC from being generated.

The MULTILIB_DEFAULTS define in the .h file says what defaults are turned on by
default.  The compiler then doesn't have to build anything that uses that
directory (ie, <dir>/elf and <dir>/elf/pic above).  This is useful if you
wanted different .h files to use the same t-* file.  For example, using the
rs6000/powerpc configurations, if you configure for:

	powerpc-eabi

the default is for -mcall-sysv, so it doesn't build those directories.  If
however, you configured it via:

	powerpc-eabiaix

it would set the default to -mcall-aix.  Both of these use the same t-* files,
but powerpc-eabi uses the eabi.h config file, while powerpc-eabiaix uses the
eabiaix.h config file.  If you aren't going to need that ability, you could
define the make variables as (assuming -melf is default):

	MULTILIB_OPTIONS  = mcoff/fPIC
	MULTILIB_DIRNAMES = coff pic
	MULTLIB_MATCHES   = fPIC=fpic

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re:  Multilib nightmares (breaking EGCS builds)
@ 1997-08-26  3:38 meissner
  1997-08-26  4:00 ` J. Kean Johnston
  0 siblings, 1 reply; 5+ messages in thread
From: meissner @ 1997-08-26  3:38 UTC (permalink / raw)
  To: egcs

| On open server, we have two modes of compilation. Normal and -mcoff.
| In normal mode, we support PIC, in -mcoff mode we dont. Gcc creates
| two libgcc.a's, one for normal and one for mcoff. Good. Now in the
| rest of egcs, I would expect the following:
| 1) A "normal" ELF libstdc++.a (and libio.a etc)
| 2) a PIC libstdc++.so and friends
| 3) an mcoff/libstdc++.a compiled with -mcoff.

At least as the sources currently exist on the Cygnus cvs server, none of the
x86 targets create multilib libraries.  The simplest way to check for
multilibing is to egrep for MULTI in the gcc/config/<machine> directory in the
t-* files.  The second way to check for multilibing is to issue:

	gcc -print-multi-lib

and if the only line it split out is:
	.;

your compiler doesn't do multilibing.  Given the above, I would expect the
following to be in gcc/config/t-sco5:

	MULTILIB_OPTIONS    = mcoff/melf fPIC
	MULTILIB_DIRNAMES   = coff elf pic
	MULTILIB_EXCEPTIONS = *mcoff*/*fPIC*
	MULTILIB_EXTRA_OPTS =

Then in your sco5.h file you would have:
	#define MULTILIB_DEFAULTS { "melf" }

if you wanted -melf to be the default (otherwise it would build libraries with
-melf and libraries with no specific switches).

Finally, go in and remove libgcc-elf.a and related rules, and change
LIBGCC_SPEC to not use libgcc-elf.a.

| It seems like configure is trying to do that. In the root of the egcs tree
| I have an mcoff directory, with libio and libstdc++ directories. libiberty
| is missing, and this causes the build to fail. Worse yet, the objects in
| mcoff/libio and mcoff/libstdc++ are ELRF objects, meaning they weren't
| even compiled with -mcoff. What is wrong? Am I missing makefile fragments
| or is the configuration process just plain wrong?
| 
| ANY help at all would be greatly appreciated.

Assuming you have multilibs set up, if it doesn't build multilib versions of
libstdc++.a, etc. then try --enable-multilib (old versions of the Cygnus tree
needed this, but I thought it had been fixed).

Note, this doesn't cover building a shared library out of libstdc++, just
getting the multilibs built for the static libraries.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: libf2c.a doesnt obey MULTILIB
@ 1997-08-26  3:02 Jim Wilson
  1997-08-26  3:19 ` Multilib nightmares (breaking EGCS builds) J. Kean Johnston
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Wilson @ 1997-08-26  3:02 UTC (permalink / raw)
  To: egcs

	Not sure if this is a known problem or not, but when building g77, it
	does not obey the multilib rules when building libf2c.a. I am
	assuming it should.

The objective C runtime has the same problem.  The multilib stuff in gcc
probably isn't easily extensible past libgcc.a.  However, we do have support
for building libio/libstdc++ as multilib libraries.

Since I would like to see both the objc and f77 runtimes moved out of
gcc anyways, for other reasons, it seems natural to fix this by multilbbing
these runtimes the same way we multilib the c++ runtime.  I don't expect this
to happen anytime soon though.

Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-08-26 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-26 14:34 Multilib nightmares (breaking EGCS builds) meissner
  -- strict thread matches above, loose matches on Subject: below --
1997-08-26 14:34 meissner
1997-08-26  3:38 meissner
1997-08-26  4:00 ` J. Kean Johnston
1997-08-26  3:02 libf2c.a doesnt obey MULTILIB Jim Wilson
1997-08-26  3:19 ` Multilib nightmares (breaking EGCS builds) J. Kean Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).