-mrelocatable problem building simple cross-compiler
Thierry Moreau
Thierry.Moreau@Connotech.com
Sat Aug 31 05:45:00 GMT 2002
Thierry Moreau wrote:
> IÂm trying to build a simple cross-compiler: host i586-pc-linux-gnu,
> target powerpc-eabi (can something else be more plain vanilla?).
>
> IÂve got binutils-2.11.2, gcc-3.1, and newlib-1.10.0.
>
> I followed the http://crossgcc.billgatliff.com/crossgccfaq/t1.html
> procedure.
>
> At the step make all-gcc install-gcc, the compilation of libgcc2.c
> (first use of xgcc on a non-trivial source code, I guess), I get this
> message from the assembler:
>
> if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
> /home/compiler/binutils/gcc/xgcc -B/home/compiler/binutils/gcc/
> -nostdinc -B/home/compiler/binutils/powerpc-eabi/newlib/ -isystem
> /home/compiler/binutils/powerpc-eabi/newlib/targ-include -isystem
> /home/compiler/gcc-3.1/newlib/libc/include
> -B/home/compiler/xtools-14.1/powerpc-eabi/powerpc-eabi/bin/
> -B/home/compiler/xtools-14.1/powerpc-eabi/powerpc-eabi/lib/ -isystem
> /home/compiler/xtools-14.1/powerpc-eabi/powerpc-eabi/include -O2
> -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -isystem ./include -g -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.1/gcc
> -I../../gcc-3.1/gcc/. -I../../gcc-3.1/gcc/config
> -I../../gcc-3.1/gcc/../include -mrelocatable-lib -mno-eabi
> -mstrict-align -DL_muldi3 -c ../../gcc-3.1/gcc/libgcc2.c -o
> libgcc/./_muldi3.o
> /tmp/cca4Ah5B.s: Assembler messages:
> /tmp/cca4Ah5B.s:94: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:97: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:98: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:99: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:579: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:1570: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:1571: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:1606: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:1615: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:1676: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:2130: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:80: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:81: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:2096: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:2104: Error: Relocation cannot be done when using
> -mrelocatable
> /tmp/cca4Ah5B.s:2109: Error: Relocation cannot be done when using
> -mrelocatable
>
> I'm not so familiar with the linux shell, the gcc configure process,
> makefile intricacies, or the overall structure of source file
> directories, but I'm confident that I followed the instructions properly
> (I tried variations). I tried to make sure the assembler called by the
> xgcc executable is the proper one, and I guess it is.
>
> Any suggestion?
>
I solved this difficulty: gcc-3.1 appears to require a binutils more recent than
binutils-2.11.2 because it enhanced the debugging information in a way which
requires a code enhancement to the assembler.
At least this is what I understood after manually doing the xgcc command above
with the -S option to look at the assembler source lines which caused the error
messages.
As of now, I proceed with binutils-2.13, gcc-3.1, and newlib-1.10.0.
Cheers,
- Thierry Moreau
CONNOTECH Experts-conseils inc.
9130 Place de Montgolfier
Montreal, Qc
H2M 2A1
Tel.: (514)385-5691
Fax: (514)385-5900
e-mail: thierry.moreau@connotech.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
More information about the crossgcc
mailing list