Is it possible to build a cross compiler supporting both big & little endian?

View: New views
4 Messages — Rating Filter:   Alert me  

Is it possible to build a cross compiler supporting both big & little endian?

by Joachim Nilsson-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

We run both little and big endian Arm targets at work. Currently both
are Arm9 so naturally I started thinking about creating one single
toolchain to bind them all...

I put together a standard arm-unknown-linux-uclibc with crosstool and
building the kernel worked fine using "-mbig-endian -mcpu=xscale
-mtune=xscale -msoft-float", but when I reached userspace the first
effort at linking with libgcc of course failed.

So I wonder, is it even possible to maintain one toolchain supporting
different endians?

Regards
  /Jocke

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


Re: Is it possible to build a cross compiler supporting both big & little endian?

by Yann E. MORIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Joachim,
All,

On Sunday 06 September 2009 17:59:38 Joachim Nilsson wrote:
> We run both little and big endian Arm targets at work. Currently both
> are Arm9 so naturally I started thinking about creating one single
> toolchain to bind them all...

Hehe! :-)

> So I wonder, is it even possible to maintain one toolchain supporting
> different endians?

It is theoretically possible. That's called "multilib".
But crosstool-NG does not support that.

There has been some discussions about the issue; search the archives.
The latest was in last July, IIRC.

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  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


Re: Is it possible to build a cross compiler supporting both big & little endian?

by Ralf Corsepius-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 09/06/2009 05:59 PM, Joachim Nilsson wrote:

> Hi!
>
> We run both little and big endian Arm targets at work. Currently both
> are Arm9 so naturally I started thinking about creating one single
> toolchain to bind them all...
>
> I put together a standard arm-unknown-linux-uclibc with crosstool and
> building the kernel worked fine using "-mbig-endian -mcpu=xscale
> -mtune=xscale -msoft-float", but when I reached userspace the first
> effort at linking with libgcc of course failed.
>
> So I wonder, is it even possible to maintain one toolchain supporting
> different endians?

Generally speaking, of course it is. What you are looking for is a
big/little endian multilib'ed toolchains.

Ralf


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


Re: Is it possible to build a cross compiler supporting both big & little endian?

by Joachim Nilsson-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Yann & Ralf!

On 09/06/2009 06:14 PM, Yann E. MORIN wrote:
> On Sunday 06 September 2009 17:59:38 Joachim Nilsson wrote:
>> So I wonder, is it even possible to maintain one toolchain supporting
>> different endians?
> It is theoretically possible. That's called "multilib".

Aha, thanks!

> There has been some discussions about the issue; search the archives.
> The latest was in last July, IIRC.

Yep, found some now.  It helps to have a keyword or such to pull at.
:-)

Regards
  /Jocke

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