Re: question cross-compiler
Frank Loeffler wrote:
> $ make -C libiberty LANGUAGES=c
> $ make -C gcc LANGUAGES=c
You could try 'AS_FOR_TARGET=mips64-linux-as make -C gcc LANGUAGES=c'
> At the last step I get an error:
> as: unrecogniced option `-EB'
> The commandline the makesystem is trying here is (in ./gcc):
> ./xgcc -B./ -B~/mips/crossdev/build//mips64-linux/bin/ -isystem
> ~/mips/crossdev/build//mips64-linux/include -isystem
> ~/mips/crossdev/build//mips64-linux/sys-include -DCROSS_COMPILE -DIN_GCC
> -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> -isystem ./include -I. -I. -I. -I./. -I./config -I./../include -g0
> -finhibit-size-directive -fno-inline-functions -fno-exceptions
> -Dinhibit_libc -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
> The problem is, that this executes (according to gcc -v):
> as -EB -g0 -v -KPIC -o crtbegin.o /tmp/ccmcigtB.s
> As far as I understood the creation of a cross compiler (which is not
> very much yet), at this stage it should generate executables for i386,
> which later are generating executables for mips64. Therefore I do not
> understand, why the makesystem is using -EB and -KPIC, which only makes
> sense on mips, but uses 'as' and not 'mips64-linux-as'.
> Could someone more wise than me could give me a hint, what I could have
> done wrong?
The method recommended upstream is to build binutils and gcc in a
combined tree (gcc as a subdirectory, like gas or ld).