This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: toolchain requirements submission


Hi Wouter,

Wouter van Heyst wrote:
The gcc multilib support is good. It is the building of glibc
(or uClibc) for the combinations where I usually have to fix
things up.


For gcc, uncommenting MULTILIB_OPTIONS and friends in
gcc/config/arm/t-arm-elf should get one going in my experience.
I don't know yet how to do that for glibc tho, do you have a list of
common problems you run in to, or even a solution that always works?

The additional steps that I use to do this are:


1.  Add the extra SEARCH_DIR when building binutils
    (in ld/earmelf_linux.c, for example adding
    /usr/local/arm-linux/lib/be)
2.  Adding the MULTILIB_OPTIONS to gcc/config/arm/t-linux
    (adding mlittle-endian/mbig-endian)
3.  Specifying --enable-mutlilib when configuring gcc

Then when building glibc for big-endian I:

1.  In config.make.in I change the @slibdir@ definition to be
     @slibdir@ = @libdir@
2.  When configuring specify --libdir=/usr/local/arm-linux/lib/be

That is petty much it. This glibc build will put all the big-endian
glibc into the right places under /usr/local/arm-linux/lib/be.
Just build the little-endian glibc as usual.

After installing you can happly build fully linked big or little
endian apps with no extra effort:

  arm-linux-gcc -mbig-endian -o hello hello.c
  arm-linux-gcc -o hello hello.c

Regards
Greg


------------------------------------------------------------------------ Greg Ungerer -- Chief Software Dude EMAIL: gerg@snapgear.com SnapGear -- a CyberGuard Company PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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