This is the mail archive of the crossgcc@sourceware.org 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: crosstool OS X host -> sparc/linux target?


Thomas Kalla wrote:
I'm trying to build a toolchain for a sparc32 linux architecture.

My choice was to use gcc-3.4.4, glibc-2.3.5, binutils-2.15 and kernel-2.6.8 because it's marked to work in the build matrix.

My build system is a Mac OS X 10.3.7, G4-1.5GHz, 512MB-RAM. It has all nessessary tools like GNU sed 4.1.4, GNU Awk 3.1.4 and GNU Wget 1.10, crosstool-0.38

In fact I didn't get very far.

The first show-stopper was the same as in http://sourceware.org/ml/crossgcc/2005-06/msg00055.html . Mac uses Mach-O and not ELF, so I can neither use GNU ld nor GNU as.

Have you read http://kegel.com/crosstool/current/doc/crosstool-howto.html#mac ? It doesn't sound like it, offhand. You most certainly can use gnu ld and as; crosstool is going to be generating Linux binaries, not Mac OS X binaries.

After applying the patch, the compilation stopped while building the glibc headers. The compiler couldn't find a path to stddef.h. (The same happened while trying to build für i686 just for verification). So I copied $HEADERDIR/linux/stddef.h to $HEADERDIR/stddef.h and the compilation went fine

That sounds familiar. Maybe if you pasted in the few lines in the log around the error, I could dredge it up.

until the following error:

sparc-unknown-linux-gnu-gcc dl-reloc.c -c -std=gnu99 -O -Wall -Winline ... sparc-unknown-linux-gnu/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -DNOT_IN_libc=1 -DIS_IN_rtld=1 -o /Developer/sparc/crosstool-0.38/build/sparc-unknown-linux-gnu/gcc -3.4.4-glibc-2.3.5/build-glibc/elf/dl-reloc.os -MD -MP -MF /Developer/sparc/crosstool-0.38/build/sparc-unknown-linux-gnu/gcc -3.4.4-glibc-2.3.5/build-glibc/elf/dl-reloc.os.dt -MT /Developer/sparc/crosstool-0.38/build/sparc-unknown-linux-gnu/gcc -3.4.4-glibc-2.3.5/build-glibc/elf/dl-reloc.os
In file included from dynamic-link.h:22,
from dl-reloc.c:269:
../sysdeps/sparc/sparc32/dl-machine.h: In function `elf_machine_rela':
../sysdeps/sparc/sparc32/dl-machine.h:435: error: `_dl_rtld_map' undeclared (first use in this function)

There's at least one other report of this: http://lists.ibiblio.org/pipermail/sm-grimoire-bugs/2005-August/000961.html

One last thing to mention: The same toolchain bilds fine when crosstool is run on my old Athlon based PC.

Try installing Fink's ld and as... can't hurt. Maybe the real fix for your stddef.h problem would help, too. - Dan

--
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

------
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]