public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* armeb target cross compiler endianness question
@ 2008-07-31  4:37 xenoneus .
  2008-07-31  4:46 ` Brian Dessent
  0 siblings, 1 reply; 2+ messages in thread
From: xenoneus . @ 2008-07-31  4:37 UTC (permalink / raw)
  To: gcc-help

Hi,

I am trying to build a cross compiler for the "armeb-softfloat-linux-uclibceabi" target using gcc-4.2.4 for an embedded linux system based on arm 1176 processor core.

I have a suspicion that the compiler defaults to little endian output. Is there a way to check the default endianness setting used by the compiler? I understand that I could pass "-mbig-endian" flag but this is not an option for me. 

I have grepped through the code and googled and I saw references in very old mails about modifying CC1_SPEC in arm.h to "-mbig-endian" but I am afraid if this information is current. I also see endian flag used an ASM_SPEC in elf.h.

What's the correct way to provide the correct default endian value? 

Thanks,
Mohan



      

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: armeb target cross compiler endianness question
  2008-07-31  4:37 armeb target cross compiler endianness question xenoneus .
@ 2008-07-31  4:46 ` Brian Dessent
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Dessent @ 2008-07-31  4:46 UTC (permalink / raw)
  To: xenoneus .; +Cc: gcc-help

"xenoneus ." wrote:

> I am trying to build a cross compiler for the "armeb-softfloat-linux-uclibceabi" target using gcc-4.2.4 for an embedded linux system based on arm 1176 processor core.
> 
> I have a suspicion that the compiler defaults to little endian output. 

This is <http://gcc.gnu.org/PR16350>.  It was fixed for 4.3:
<http://gcc.gnu.org/viewcvs?view=rev&revision=129999>.  (Somebody ought
to update that PR to set the status to FIXED and set the target
milestone to 4.3.0.)

Anyway, if you use 4.3 and it ought to automatically work when the
target matches arm*b-*.

> Is there a way to check the default endianness setting used by the compiler? I 

How about: $target-gcc -dM -E - </dev/null | grep __ARMEB__

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-30 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-31  4:37 armeb target cross compiler endianness question xenoneus .
2008-07-31  4:46 ` Brian Dessent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).