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] | |
Hi there,
I was trying to build a powerpc-970 kernel with crosstool 0.28-rc37 while I got the same error messages as in <http://kegel.com/crosstool/crosstool-0.28-rc37/buildlogs/0.28/powerpc-970-gcc-3.4.2-glibc-2.3.3.log.txt>.
namely: gcc -Wp,-MD,arch/ppc64/boot/.crt0.o.d -D__ASSEMBLY__ -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -Iinclude -fno-builtin -traditional -c -o arch/ppc64/boot/crt0.o arch/ppc64/boot/crt0.S arch/ppc64/boot/crt0.S: Assembler messages: arch/ppc64/boot/crt0.S:17: Error: no such instruction: `lis 9,_start@h' arch/ppc64/boot/crt0.S:18: Error: no such instruction: `lis 8,_etext@ha' ... make[1]: *** [arch/ppc64/boot/crt0.o] Error 1 make: *** [zImage] Error 2
After looking what got wrong I had the following insights: - the error messages are triggered when trying to build with the wrong assembler (host instead of boot)
- linux-2.6.8/arch/ppc64/boot/Makefile has to be edited to compile with gcc -m32 (these kernel parts need 32bit code) and with 32bit binutils. I tried to build biarch binutils but failed (ld complained that powerpc32 is not the default output type), so I compiled 32bit binutils and wrote the paths in that Makefile. (But, propably you will be able to build/use biarch binutils.)
An alternate fix, and one that is easier than getting biarch going, is described at http://www.ussg.iu.edu/hypermail/linux/kernel/0409.2/1758.html i.e. build a 32 bit toolchain with crosstool first, then when compiling the kernel with the 64 bit toolchain, set the Make variable CROSS32_COMPILE on the commandline, e.g. (for 2.6) make ARCH=$ARCH CROSS_COMPILE=$PREFIX/bin/$TARGET- CROSS32_COMPILE=$PREFIX32/bin/$TARGET32- where ARCH is ppc64, $PREFIX and $PREFIX32 are where you installed the 64 and 32 bit toolchains, $TARGET is the machine tuple of the 32 bit toolchain (powerpc-750-linux-gnu), $TARGET64 is the machine tuple of the 64 bit toolchain (powerpc-970-linux-gnu)
I've been meaning to use this workaround in my testlinux.sh script that comes with crosstool, but haven't had a chance.
Hope that helps, 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] |