This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: How to enable multilib?


Xun, All,

On Sunday 27 March 2011 19:54:09 Xun Li wrote:
> I would need to use -msoft-float options to simulate floating point
> calculations, hence I would need multilib to be enabled in the cross
> compiler.

You do not need multilib to enable soft-float. You can have the toolchain
be entirely soft-float by default.

Multilib is needed if you want the _same_ toolchain to be able to emit
both HW and SW floating point operations.

(Note: the compiler itself is able to generate both SW and HW, but the
libraries have to be compiled twice, once for each case).

> How to do this in the crosstool?

Do you mean crostool, as 'the original crosstool by Dan KEGEL' and 
hosted there: http://kegel.com/crosstool/ ?

Or do you mean crosstool-NG, as 'the fork by Yann E. MORIN" and
hosted there: http://ymorin.is-a-geek.org/projects/crosstool ?

If the former, I don't really know. I think crosstool had support for
building multilb, but I never tried.

For the latter, no, crostool-NG does not support multilib. Properly doing so
is not easy. Multilib has a broad meaning, depending on the architecture you
speak about. For example:

- x86:
  - 32-bit and 64bit,
  - SW and HW floats
  --> 4 combinations

- ARM:
  - SW and HW floats
  - float format: VFP vs. softfp vs. NEON vs. Maverick
       (not too sure I'm not speaking with my ass here...)
  - armv4, armv5, armv6, armv7
  - big and little endian
  - ARM vs. Thumb
  - with or without interworking
  - ARM vs. ARM26  (although ARM26 is really dead nowadays)
  - OABI vs. EABI
  --> a hell of a lot of combinations! (1024 if I count correctly?)

MIPS:
  - Pfff. I don't even want to try listing it...
  --> a lot of conbinations as well (but less than for ARM?)

And for each combination in said architecture, we'd need to build all of the
libraries running on the target. And even if you can do it, we'd need a way
to configure the subset of multilib we'd want.

For now, I'd recommend to build one toolchain for each combination you need.
Basically, that boils down to two toolchain if you are only interested in HW
vs. SW floating point.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq


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