This is the mail archive of the gcc@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]

MULTILIB_[OPTIONS/DEFAULTS/EXCEPTIONS] question


I have a question about MULTILIB_OPTIONS, MULTILIB_DEFAULTS, and
MULTILIB_EXCEPTIONS.

If I build a MIPS compiler (for example) that generates big-endian, mips32r2,
mabi=32 code by default, then I could use the MULTILIB_OPTIONS below to have
the compiler also support little-endian, mips32/mips64/mips64r2, and mabi=n32/
mabi=64 by using this MULTILIB_OPTIONS:

	MULTILIB_OPTIONS = EL mips32/mips64/mips64r2 mabi=n32/mabi=64

I could also use this, which should be equivelent:

	MULTILIB_OPTIONS = EB/EL mips32/mips32r2/mips64/mips64r2 \
				mabi=32/mabi=n32/mabi=64
	MULTILIB_DEFAULTS = { "EB", "mips32r2", "mabi=32" };

So far, so good, but my question involves MULTILIB_EXCEPTIONS. If mabi=n32
and mabi=64 are not supported with mips32 or mips32r2 then for the first
use of MULTILIB_OPTIONS I need six rules to exclude building combinations
of mips32/mips32r2 and mabi=n32/mabi=64 because the mips32r2 flag may not
actually appear in the compiler option list (it is the default).

MULTILIB_EXCEPTIONS += *mips32*/mabi=64* *mips32*/mabi=n32*
MULTILIB_EXCEPTIONS += mabi=64* EL/mabi=64*
MULTILIB_EXCEPTIONS += mabi=n32* EL/mabi=n32*

I was hoping that with the second version I could do everything with
only two rules:

MULTILIB_EXCEPTIONS += *mips32*/mabi=64* *mips32*/mabi=n32*

But this does not seem to be working.  Because mips32r2 is the default,
GCC still seems to be trying to build a compiler that supports mabi=n32
and mabi=64 with the (default) mips32r2 flag.

Is this the expected/desired behaviour?  It seems like it would be more
useful if MULTILIB_EXCEPTIONS were applied before the default flags were 
stripped out of MULTILIB_OPTIONS because then it would be easier to describe
the exceptions you want using explicit or default flag settings.

Steve Ellcey
sellcey@mips.com


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