multilib question

Till Straumann strauman at
Thu Nov 10 17:07:15 UTC 2005

Ralf Corsepius wrote:
> On Wed, 2005-11-09 at 22:06 -0800, Till Straumann wrote:
>>I want to build gcc/newlib with the following variants:
>>-mcpu=860 -soft-float
>>-mcpu=603e -Dmpc8260
>>-mcpu=7400 -mabi=altivec -maltivec -mvrsave=yes
>>-mcpu=7400 -mabi=altivec -maltivec -mvrsave=no
>>-mcpu=7400 -mabi=altivec -mno-altivec
>>how do I have to set the MULTILIB_xxx variables in 't-rtems' ?

OK, let me simplify my question:

I want something like MULTILIB_EXTRA_OPTS but it should only
apply to one specific variant. E.g., -mcpu=7400 should always
activate -mabi=altivec but -mabi=altivec should not be active
on other cpus.


> It's documented in

Got that but it only describes the simplest cases.  I also dug
through 'genmultilib' etc. but I thought I ask if someone has
an easy explanation...

> Search for MULTILIB*, the documentation is spread across several
> chapters. Also, check gcc/config/rs6000/rs6000.[ch], there are other
> macros being involved (compiler defaults and implicit flags)
> The details of how to achieve your objective are far from being trivial
> and beyond the scope of this list. It's not possible to answer this in
> one sentence.
> The brute force approach would be:
> Set up a vector of compiler flags containing _all_ flags being used.
> Then expand all possible permutations of this vector. Afterwards start
> minimizing the resulting matrix by applying MULTILIB_* rules.
> An easier approach would be to start with the existing t-rtems and to
> try gradually adding one variant after the other. This way you at least
> avoid side-effects you might not be aware about (e.g. the implicit
> defaults of the default multilib variant - It's missing from your list
> above and often not visible in t-* files)
> Ralf

More information about the users mailing list