This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc for big-endian as default
- To: Nick Clifton <nickc at cygnus dot com>
- Subject: Re: gcc for big-endian as default
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Wed, 2 Aug 2000 16:52:55 -0400
- Cc: naeem dot m dot afzal at intel dot com, gcc at gcc dot gnu dot org
- References: <200008022034.NAA15802@elmo.cygnus.com>
On Wed, Aug 02, 2000 at 01:34:45PM -0700, Nick Clifton wrote:
> Hi Naeem,
>
> : > How could I make gcc crosscompiler (ARM-LINUX) to compile with
> : > target paltform as big-endian, so that when compiling with this
> : > compiler, I dont have to use -mbig-endian every time.
>
> The simplest method is to add the -mbig-endian switch to CC1_SPEC
> defiend in gcc/config/arm/arm.h, like this:
>
> #define CC1_SPEC "-mbig-endian"
>
> Note, that you will probably also want to change the defintion of
> CPP_ENDIAN_DEFAULT_SPEC to reflect this change.
>
> Also you ought to change the defintion of MULTILIB_DEFAULTS in
> gcc/config/arm/linux-elf.h again to reflect this change.
The ARM maintainers might want to think about providing support directly.
Looking at config.sub, it looks like armbe-* and armle-* specifically select
between big and little endian defaults. I did a similar thing with the Powerpc
-- configuring powerpc-eabi selects the big endian as default, and configuring
powerpcle-eabi selects the little endian as default.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482