This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Re: big-endian gcc compiler


A Roturier wrote:
> i compile gcc cross compiler for arm platform under windows and find the
> compiled library is in little-endian(default) mode.

What you want is called "multilib mode"; search for MULTILIB_OPTIONS
in the gcc texinfo docs for a description.

Multilib mode is off by default in gcc 2.95.3, I had to adjust
the ARM-specific target makefile fragment:


*** gcc-2.95.3/gcc/config/arm/t-arm-elf.orig    Wed Aug  1 12:44:44 2001
--- gcc-2.95.3/gcc/config/arm/t-arm-elf Wed Aug  1 12:45:07 2001
***************
*** 21,35 ****
        echo '#endif' >> dp-bit.c
        cat $(srcdir)/config/fp-bit.c >> dp-bit.c

! # MULTILIB_OPTIONS  = mlittle-endian/mbig-endian
mhard-float/msoft-float mapcs-32/mapcs-26
fno-leading-underscore/fleading-underscore
! # MULTILIB_DIRNAMES = le be fpu soft 32bit 26bit elf under
! # MULTILIB_EXCEPTIONS =
! # MULTILIB_MATCHES  =
! # EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
! # LIBGCC = stmp-multilib
! # INSTALL_LIBGCC = install-multilib

  # If EXTRA_MULTILIB_PARTS is not defined above then define EXTRA_PARTS
here
! EXTRA_PARTS = crtbegin.o crtend.o

  TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc
--- 21,35 ----
        echo '#endif' >> dp-bit.c
        cat $(srcdir)/config/fp-bit.c >> dp-bit.c

! MULTILIB_OPTIONS  = mlittle-endian/mbig-endian mhard-float/msoft-float
mapcs-32/mapcs-26 fno-leading-underscore/fleading-underscore
! MULTILIB_DIRNAMES = le be fpu soft 32bit 26bit elf under
! MULTILIB_EXCEPTIONS =
! MULTILIB_MATCHES  =
! EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
! LIBGCC = stmp-multilib
! INSTALL_LIBGCC = install-multilib

  # If EXTRA_MULTILIB_PARTS is not defined above then define EXTRA_PARTS
here
! # EXTRA_PARTS = crtbegin.o crtend.o

  TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc


Best regards,
Thomas

-- 
Thomas Fähnle					thomas.faehnle@tst-ag.de
Digital Signal Processing			+49 731 80018-28
Touchless Sensor Technology AG			89231 Neu-Ulm · Germany


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