This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: gcc for big-endian as default


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

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