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]
Other format: [Raw text]

Re: Selecting the correct default ABI for the iWMMXt processor


Daniel Jacobowitz <drow@false.org> writes:

> Best would be to support the two-option multilib, but that's going to
> be really hard.  We might be able to multilib on -mcpu and -mabi, and
> exclude all combinations we don't want.

I don't think the two-option is multilib is really hard.

There are two main things we have to do: 1) when handling a
multi-option multilib, turn it back into multiple options when
invoking the compiler; 2) when considering the command line options,
require that all components of a multi-option be present.

We represent a multi-option using '&', as in
"mcpu=iwmmxt&mabi=iwmmxt".  It is extremely unlikely that any option
will use '&'--less likely than the '/' we are currently using for
incompatible options in MULTILIB_OPTIONS.

I think these multi-options will only appear in MULTILIB_OPTIONS.  I
don't think any special handling will be required in genmultilib.  We
have to modify set_multilib_dir in gcc.c: when faced with a
multi-option, it needs to ensure that all the options are present; the
negation of a multi-option is satisfied when at least one of the
options is missing.

mklibgcc.in will need some minor modifications to convert "&" to " -".

Not trivial, obviously, but not really hard either.

Ian


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