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


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.

Cheers
	Nick



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