This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: Multilib question


Ian Lance Taylor wrote:
Michael Eager <eager@eagercon.com> writes:

Ian Lance Taylor wrote:
Michael Eager <eager@eagercon.com> writes:

I want a multilib configurations to specify two options,
not just a single option.  I don't see anything in the
docs which describes how to do this or any target which
does this.

Is there a way to specify that the 'foo' multilib
config should be built with -mfoo and -mbar?
You can probably do this but it's not clear what you want.  Multilibs
go two ways: they tell the build process which libraries to build at
build time, and they tell the compiler driver which libraries to link
against at link time.  What should happen if somebody links using just
-mfoo or just -mbar?
-mbar is an optimization which is only valid if -mfoo is also specified.
Linking a non- -mbar lib with -mfoo works OK, -mbar with non- -mfoo fails.

In that case, I think one way would be something like MULTILIB_OPTIONS = mfoo mbar MULTILIB_EXCLUSIONS = !mfoo/mbar

This is not that great, though, in that will build the -mbar library,
it just won't use it.  I don't know of a way to do exactly what you
want.

Yeah, that's not quite what I want. I want the driver to link in the mbar library if -mbar is specified.

I might (reluctantly) look at how MULTILIB_OPTIONS is
parsed and see if I can make it accept something like

MULTILIB_OPTIONS = mfoo mbar{mfoo}

where this means to generate mbar but also pass -mfoo.

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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