Problems Building Tool Chain for EBSA-285
-----------------------------------------
I have been attempting to build the GNU tools for the EBSA-285. The
sources I have been working with are:
binutils Ver 2.9.1.0.19a
with patch: binutils-2.9.1.0.19a-arm-diff-981230
egcs Ver 1.1.1
with patch: egcs-1.1.1-arm-diff-990113
glibc Ver 2.1
with add-ons: glibc-crypt-2.1, glibc-linuxthreads-2.1
linux Ver 2.2.2
with patch: linux-2.2.2-philb-990318, patch-2.2.2-rmk5
I have tried building binutils and egcs with both gcc 2.7.2.3 and
egcs 1.1.2 (2.91.66) release. Both of these compile without errors.
However, when I attempt to compile glibc I get the following
internal compiler error (I have broken up to enormous compiler command line.):
arm-linux-gcc gconv_conf.c -c -O -Wall -Winline -Wstrict-prototypes \
-Wwrite-strings -g -DGCONV_PATH='"/home/elph/gjohnson/Arm/lib/gconv"' \
-I../include -I. -I/home/elph/gjohnson/Arm/src/glibc-2.1-build/iconv \
-I.. -I../libio -I/home/elph/gjohnson/Arm/src/glibc-2.1-build \
-I../sysdeps/arm/elf -I../crypt/sysdeps/unix
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread \
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix \
-I../linuxthreads/sysdeps/arm -I../linuxthreads/sysdeps/pthread/no-cmpxchg \
-I../sysdeps/unix/sysv/linux/arm -I../sysdeps/unix/sysv/linux \
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman \
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/arm \
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/arm/fpu -I../sysdeps/arm \
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754 -I../sysdeps/libm-ieee754 \
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc \
-isystem /home/elph/gjohnson/Arm/lib/gcc-lib/arm-linux/egcs-2.91.60/include \
-isystem /home/elph/gjohnson/Arm/include -D_LIBC_REENTRANT \
-include ../include/libc-symbols.h \
-o /home/elph/gjohnson/Arm/src/glibc-2.1-build/iconv/gconv_conf.o
gconv_conf.c: In function `__gconv_read_conf':
gconv_conf.c:587: internal error--unrecognizable insn:
(insn 7879 7876 4902 (set (reg:QI 12 ip)
(mem:QI (plus:SI (reg:SI 12 ip)
(const_int -577)))) -1 (nil)
(nil))
../../egcs-1.1.1/gcc/toplev.c:1360: Internal compiler error in function fatal_insn
make[2]: *** [/home/elph/gjohnson/Arm/src/glibc-2.1-build/iconv/gconv_conf.o] Error 1
make[2]: Leaving directory `/home/elph/gjohnson/Arm/src/glibc-2.1/iconv'
make[1]: *** [iconv/subdir_lib] Error 2
make[1]: Leaving directory `/home/elph/gjohnson/Arm/src/glibc-2.1'
make: *** [all] Error 2
This compiler error occurs regardless of whether I use gcc or egcs to build
the cross-compiler.
In addition, when I build glibc using a native version of the egcs 1.1.2
compiler, which was compiled with the native gcc 2.7.2.3, glibc builds
without trouble.
The system I am using is an x86, Redhat Linux 5.2 system.
I have also attempted the whole proceedure over again building egcs-1.1.2
for cross compiling, same result.
A coleague of mine also had the exact same problem when building on
a Sparc-Solaris box.
I have no trouble building egcs/glibc for native x86.
Below is an edited log of the steps/commands that I used in the build.
Any help would be appreciated.
Regards
Greg.
--
[gjohnson@loesser:~/Arm/src (6) Fri Apr 9 14:15:50 (0)]
> zcat ../arc/binutils-2.9.1.0.19a.tar.gz | tar xvf -
# Unpack binutils.
[gjohnson@loesser:~/Arm/src (9) Fri Apr 9 14:18:41 (130)]
> zcat ../arc/binutils-2.9.1.0.19a-arm-diff-981230.gz | patch -p0
# Patch binutils.
[gjohnson@loesser:~/Arm/src (11) Fri Apr 9 14:19:07 (0)]
> find binutils-2.9.1.0.19a -name "*.rej" -print
# Check for .rej files indicating failure.
# Check passed.
[gjohnson@loesser:~/Arm/src (12) Fri Apr 9 14:20:16 (0)]
> cd binutils-2.9.1.0.19a/
[gjohnson@loesser:~/Arm/src/binutils-2.9.1.0.19a (13) Fri Apr 9 14:32:43 (0)]
> ./configure --target=arm-linux --prefix=/$HOME/Arm
# Configure binutils.
[gjohnson@loesser:~/Arm/src/binutils-2.9.1.0.19a (15) Fri Apr 9 14:42:08 (2)]
> make
# Build binutils.
[gjohnson@loesser:~/Arm/src/binutils-2.9.1.0.19a (16) Fri Apr 9 14:50:44 (0)]
> make install
# Install binutils.
[gjohnson@loesser:~/Arm/src (26) Fri Apr 9 15:20:05 (0)]
> zcat ~/Arm/arc/linux-2.2.2.tar.gz | tar xvf -
# Unpack the linux kernel.
[gjohnson@loesser:~/Arm/src (33) Fri Apr 9 15:32:06 (130)]
> zcat ../arc/patch-2.2.2-rmk5.gz | patch --dry-run -p0
# Apply first kernel patch.
[gjohnson@loesser:~/Arm/src (35) Fri Apr 9 15:33:16 (130)]
> zcat ../arc/linux-2.2.2-philb-990318.gz | patch -p0
# Apply second kernel patch.
[gjohnson@loesser:~/Arm/src (37) Fri Apr 9 15:49:23 (2)]
> cd linux/
[gjohnson@loesser:~/Arm/src/linux (39) Fri Apr 9 15:50:06 (130)]
> vi Makefile
# Edit the make file and change
# CROSS_COMPILE = /usr/src/bin/arm/arm-linuxelf-
# to
# CROSS_COMPILE = /home/elph/gjohnson/Arm/bin
# Also set ARCH = arm
[gjohnson@loesser:~/Arm/src/linux (40) Fri Apr 9 15:51:46 (0)]
> make config
# Configure the kernel.
# Select ARM system type to be EBSA-110
# Include support for Intel EBSA285
# Change other options as necessary.
[gjohnson@loesser:~/Arm/src/linux (43) Fri Apr 9 15:55:45 (0)]
> make dep
# Run make depend.
[gjohnson@loesser:~/Arm/src/linux (44) Fri Apr 9 15:59:24 (0)]
> cd ../../include
# Change to the include directory for the Arm Linux tools.
[gjohnson@loesser:~/Arm/include (49) Fri Apr 9 16:18:43 (0)]
> ln -s ~/Arm/src/linux/include/asm-arm/ asm
# Link the asm-arm include directory from the kernel source to the current
# include directory.
[gjohnson@loesser:~/Arm/include (50) Fri Apr 9 16:19:12 (0)]
> ln -s ~/Arm/src/linux/include/linux/ linux
# Link the linux include directory from the kernel source to the current
# include directory.
[gjohnson@loesser:~/Arm/include (52) Fri Apr 9 16:19:21 (0)]
> cd ../src/
# Back to the src directory.
[gjohnson@loesser:~/Arm/src (56) Fri Apr 9 16:25:02 (130)]
> bunzip2 -c ~/Arm/arc/egcs-1.1.1.tar.bz2 | tar xvf -
# Unpack the egcs compiler.
[gjohnson@loesser:~/Arm/src (59) Fri Apr 9 16:37:14 (130)]
> zcat ../arc/egcs-1.1.1-arm-diff-990113.gz | patch -p0
# Patch the egcs compiler.
[gjohnson@loesser:~/Arm/src (67) Fri Apr 9 16:43:27 (0)]
> mkdir egcs-build
# Create a seperate build directory for the egcs compiler.
[gjohnson@loesser:~/Arm/src (68) Fri Apr 9 16:43:33 (0)]
> cd egcs-build/
# Go to the build directory.
[gjohnson@loesser:~/Arm/src/egcs-build (70) Fri Apr 9 16:43:37 (0)]
> ../egcs-1.1.1/configure --target=arm-linux --prefix=/home/elph/gjohnson/Arm \
--with-cpu=strongarm110
# Configure the compiler.
[gjohnson@loesser:~/Arm/src/egcs-build (71) Fri Apr 9 16:48:32 (0)]
> cd gcc
# Go to the gcc sub-direcory.
[gjohnson@loesser:~/Arm/src/egcs-build/gcc (72) Fri Apr 9 16:50:10 (0)]
> vi Makefile
# Edit the Makefile
# add -Dinhibit_libc to the CFLAGS of this and the main Makefile.
[gjohnson@loesser:~/Arm/src/egcs-build/gcc (74) Fri Apr 9 16:51:19 (0)]
> make -i LANGUAGES=c
# Build the compiler for the C language only.
[gjohnson@loesser:~/Arm/src/egcs-build/gcc (5) Mon Apr 12 11:18:37 (0)]
> make -i LANGUAGES=c install
# Install the compiler.
[gjohnson@loesser:~/Arm/src/egcs-build (7) Mon Apr 12 12:00:46 (0)]
> cd ..
[gjohnson@loesser:~/Arm/src (8) Mon Apr 12 12:00:47 (0)]
> zcat ../arc/glibc-2.1.tar.gz | tar xvf -
# Unpack the glibc Library.
[gjohnson@loesser:~/Arm/src (16) Mon Apr 12 12:13:48 (0)]
> export CC=arm-linux-gcc
# Export the CC environment variable to use the arm compiler.
[gjohnson@loesser:~/Arm/src (17) Mon Apr 12 12:14:05 (0)]
> PATH=/home/elph/gjohnson/Arm/bin:$PATH
# Add the path to the bin utils directory to the PATH environment variable.
[gjohnson@loesser:~/Arm/src (18) Mon Apr 12 12:15:11 (0)]
> cd glibc-2.1/
[gjohnson@loesser:~/Arm/src/glibc-2.1 (20) Mon Apr 12 12:15:19 (0)]
> zcat ../../arc/glibc-linuxthreads-2.1.tar.gz | tar xvf -
# Unpack the Linux threads package to the glibc directory.
[gjohnson@loesser:~/Arm/src/glibc-2.1 (22) Mon Apr 12 12:16:00 (0)]
> zcat ~/Arm/arc/glibc-crypt-2.1.tar.gz | tar xvf -
# Unpack the cryptography extensions to the glibc directory.
[gjohnson@loesser:~/Arm/src/glibc-2.1 (24) Mon Apr 12 12:18:40 (0)]
> cd ..
[gjohnson@loesser:~/Arm/src (26) Mon Apr 12 12:19:06 (0)]
> mkdir glibc-2.1-build
# Create a seperate build directory for the glibc.
[gjohnson@loesser:~/Arm/src (27) Mon Apr 12 12:19:17 (0)]
> cd glibc-2.1-build/
[gjohnson@loesser:~/Arm/src/glibc-2.1-build (28) Mon Apr 12 12:19:21 (0)]
> ../glibc-2.1/configure arm-linux --build=i586-linux \
--prefix=/home/elph/gjohnson/Arm --enable-add-ons \
--with-headers=/home/elph/gjohnson/Arm/include
# Configure glibc
--
+----------------------------------------------------+
| Do you want to know more? |
| --== Greg Johnson ==-- |
| HW/SW Engineer [EMAIL PROTECTED] |
| Canon Information Systems Research Australia |
| 1 Thomas Holt Dr, North Ryde, NSW, 2113, Australia |
| "I FLEXed my BISON and it went YACC!" - me. |
+----------------------------------------------------+
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]