From: Renegade M. <dra...@sp...> - 2001-09-08 05:22:24
|
With assistance from this group i have managed to compile binutils and gcc, but am now having trouble with glibc (i must not yet grok some basic concept involved with setting up cross compilers to be having so many difficulties). Compilation runs for a bit and then i get messages like this: ../sysdeps/unix/sysv/linux/i386/sysdep.S: Assembler messages: ../sysdeps/unix/sysv/linux/i386/sysdep.S:28: Error: Unknown pseudo-op: `.bss' ../sysdeps/unix/sysv/linux/i386/sysdep.S:50: Error: Alignment too large: 15 assumed ../sysdeps/unix/sysv/linux/i386/sysdep.S:51: Error: unknown opcode ../sysdeps/unix/i386/sysdep.S:47: Error: unknown opcode ../sysdeps/unix/i386/sysdep.S:49: Error: unknown opcode ../sysdeps/unix/i386/sysdep.S:51: Error: unknown opcode ../sysdeps/unix/i386/sysdep.S:52: Error: unknown opcode ../sysdeps/unix/i386/sysdep.S:74: Error: unknown opcode ../sysdeps/unix/i386/sysdep.S:75: Error: unknown opcode Here's the (rather lengthy) command that make was trying to execute: sh-linux-gcc -ml -m4 ../sysdeps/unix/sysv/linux/i386/sysdep.S -c -I../include -I. -I/home/build/build-glibc/csu -I.. -I../libio -I/home/build/build-glibc -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386/i686 -I../sysdeps/unix/i386/i586 -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /usr/local/sh-linux/lib/gcc-lib/sh-linux/3.0/include -isystem /usr/local/sh-linux/linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -DASSEMBLER -I/home/build/build-glibc/csu/. -DGAS_SYNTAX -ml -o /home/build/build-glibc/csu/sysdep.o It looks to me like there are a lot of references to i386 stuff when i probably want references to sh stuff. How do i correct this? If it would help, below is the list of commands i've executed to get to this point; the interesting stuff involving glibc is naturally at the bottom. Any help or suggestions would be greatly appreciated. Thanks! HOST=i686-pc-linux-gnu TARGET=sh-linux ARCH=sh BASE=/home/build PREFIX=/usr/local/${TARGET} PATH=${PREFIX}/bin:${PATH} # files have been downloaded to $BASE, with the kernel in $BASE/kernel. # binutils cd ${BASE} tar -xvIf binutils-010513.tar.bz2 gunzip -c sh-binutils-010513-rela+arch+opc.diff.gz | patch -p0 mkdir build-binutils cd build-binutils ../binutils-010513/configure --target=${TARGET} --prefix=${PREFIX} -v \ 2>&1 | tee -a configure.out make -w all install \ 2>&1 | tee -a make.out # gcc cd ${BASE} tar -xvIf gcc-core-20010514.tar.bz2 tar -xvIfgcc-g++-20010514.tar.bz2 gunzip -c sh-gcc-20010514-arch+pic+wind+misc.diff.gz | patch -p0 mkdir build-gcc0 cd build-gcc0 ../gcc-20010514/configure --host=${HOST} --target=${TARGET} \ --prefix=${PREFIX} --without-headers --with-newlib \ --disable-shared -v \ 2>&1 | tee -a configure.out make -w all-gcc install-gcc \ 2>&1 | tee -a make.out # kernel, round 1 cd ${BASE} mv kernel ${PREFIX}/linux cd ${PREFIX}/linux make ARCH=${ARCH} menuconfig make ARCH=${ARCH} dep cd ${PREFIX}/include ln -s ${PREFIX}/linux/include/asm-${ARCH} asm ln -s ${PREFIX}/linux/include/linux linux # glibc cd ${BASE} tar -xvIf glibc-2.2.2.tar.bz2 bunzip2 -c glibc-linuxthreads-2.2.2.tar.bz2 | \ (cd glibc-2.2.2 ; tar -xvf -) gunzip -c sh-glibc-2.2.2-pthread+arch+ver.diff.gz | patch -p0 mkdir build-glibc cd build-glibc echo "CFLAGS := -ml -m4 -O \$(CFLAGS) ASFLAGS-.o := -ml LDFLAGS-relocatable := -ml crts-predefined=yes build-programs=no CC=${TARGET}-gcc -ml -m4 RANLIB=${TARGET}-ranlib AS=${TARGET}-gcc -ml LD=${TARGET}-ld -ml AR=${TARGET}-ar BUILD_CC=gcc" > configparms CC="${TARGET}-gcc -ml -m4" ../glibc-2.2.2/configure \ --host=${HOST} --build=${HOST} --target=${TARGET} \ --prefix=${PREFIX}/${TARGET} --enable-add-ons \ --with-headers=${PREFIX}/linux/include \ --with-binutils=${PREFIX}/bin \ 2>&1 | tee -a configure.out make -w all \ 2>&1 | tee -a make.out |