How to enable multilib?

Sun Mar 27 18:17:00 GMT 2011

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: ?

Or do you mean crosstool-NG, as 'the fork by Yann E. MORIN" and
hosted there: ?

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?)

  - 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.

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  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

For unsubscribe information see

More information about the crossgcc mailing list