Subject: i686->StrongARM gcc/g++ cross compile problems

From: "Jim Fischer" <[email-masked]>
Date: Sun, 9 Jul 2000 17:38:16 -0700

I'm in the process of creating an i686 to StrongARM (EBSA-285) cross
compiler for both gcc and g++. I can successfully build the gcc cross
compiler (using the
components listed below) if I manually modify the top-level gcc Makefile by
changing the,

    LANGUAGES="c c++"

option to,

    LANGUAGES="c"

----------
Components:

binutils-2.9.5.0.34-1.src.rpm

gcc-core-2.95.2.tar.gz
gcc-g++-2.95.2.tar.gz
gcc-2.95.2-arm4.patch.gz

kernel-2.2.14-5.0.src.rpm
patch-2.2.14-rmk6.gz

glibc-2.1.3.tar.gz
glibc-crypt-2.1.tar.gz
glibc-linuxthreads-2.1.3.tar.gz

[Note: The ./configure step specifies 'LANGUAGES="c c++"' in the gcc
Makefile whether the g++ sources are installed or not -- i.e., even when
only the gcc-core sources are installed. --end note]

[Note: When I do a gcc-only build, I'm able to build a linux 'zImage' kernel
image using the gcc cross compiler. --end note]

When I add the g++ sources to the mix and leave the LANGUAGES option set to
"c c++" in the top-level Makefile, I get the following error messages at the
(tail end of the) make process:

<---start--->
Running configure in multilib subdirs soft-float
pwd: /usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/libio
Running configure in multilib subdir soft-float
pwd: /usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu
Appending /usr/src/redhat/BUILD/gcc-2.95.2/libio/config/linux.mt to
target-mkfrag
Appending /usr/src/redhat/BUILD/gcc-2.95.2/libio/config/mtsafe.mt to
target-mkfrag
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/soft-float/
libio using "target-mkfrag"
Adding multilib support to Makefile in
/usr/src/redhat/BUILD/gcc-2.95.2/libio with_multisubdir=soft-float
Configuring tests...
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/soft-float/
libio/tests
Configuring dbz...
Linked "rdbz.c" to "/usr/src/redhat/BUILD/gcc-2.95.2/libio/dbz/dbz.c".
Linked "rdbzmain.c" to
"/usr/src/redhat/BUILD/gcc-2.95.2/libio/dbz/dbzmain.c".
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/soft-float/
libio/dbz
Configuring stdio...
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/soft-float/
libio/stdio
Configuring testsuite...
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/soft-float/
libio/testsuite
Configuring tests...
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/libio/tests
Configuring dbz...
Linked "rdbz.c" to "/usr/src/redhat/BUILD/gcc-2.95.2/libio/dbz/dbz.c".
Linked "rdbzmain.c" to
"/usr/src/redhat/BUILD/gcc-2.95.2/libio/dbz/dbzmain.c".
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/libio/dbz
Configuring stdio...
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/libio/stdio
Configuring testsuite...
Created "Makefile" in
/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/libio/tests
uite
Configuring in arm-ebsa285-linux-gnu/libiberty
creating cache ./config.cache
checking host system type... arm-ebsa285-linux-gnu
checking host system type... arm-ebsa285-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for arm-ebsa285-linux-gnu-ar... arm-ebsa285-linux-gnu-ar
checking for arm-ebsa285-linux-gnu-ranlib... arm-ebsa285-linux-gnu-ranlib
checking for gcc...
/usr/jdf/fornax/armtools/work/gcc-stage-1_/gcc/xgcc -B/usr/jdf/fornax/armtoo
ls/work/gcc-stage-1_/gcc/ -B/usr/jdf/fornax/armtools/arm-ebsa285-linux-gnu/b
in/
checking whether we are using GNU C... yes
checking whether
/usr/jdf/fornax/armtools/work/gcc-stage-1_/gcc/xgcc -B/usr/jdf/fornax/armtoo
ls/work/gcc-stage-1_/gcc/ -B/usr/jdf/fornax/armtools/arm-ebsa285-linux-gnu/b
in/ accepts -g... yes
checking for POSIXized ISC... no
checking for a BSD compatible install... /bin/sh
/usr/src/redhat/BUILD/gcc-2.95.2/install-sh -c
checking how to run the C preprocessor... /lib/cpp
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... no
checking whether the C compiler
(/usr/jdf/fornax/armtools/work/gcc-stage-1_/gcc/xgcc -B/usr/jdf/fornax/armto
ols/work/gcc-stage-1_/gcc/ -B/usr/jdf/fornax/armtools/arm-ebsa285-linux-gnu/
bin/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot
create executables.
make[2]: Entering directory
`/usr/jdf/fornax/armtools/work/gcc-stage-1_/arm-ebsa285-linux-gnu/libio'
if [ x"no" = xyes ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
test x"no" != xyes ||\
/usr/jdf/fornax/armtools/work/gcc-stage-1_/gcc/xgcc -B/usr/jdf/fornax/armtoo
ls/work/gcc-stage-1_/gcc/ -B/usr/jdf/fornax/armtools/arm-ebsa285-linux-gnu/b
in/ -c -g -O2 -I. -I/usr/src/redhat/BUILD/gcc-2.95.2/libio -D_IO_MTSAFE_IO
/usr/src/redhat/BUILD/gcc-2.95.2/libio/iogetline.c -o pic/iogetline.o
/usr/jdf/fornax/armtools/work/gcc-stage-1_/gcc/xgcc -B/usr/jdf/fornax/armtoo
ls/work/gcc-stage-1_/gcc/ -B/usr/jdf/fornax/armtools/arm-ebsa285-linux-gnu/b
in/ -c -g -O2 -I. -I/usr/src/redhat/BUILD/gcc-2.95.2/libio -D_IO_MTSAFE_IO
/usr/src/redhat/BUILD/gcc-2.95.2/libio/iogetline.c
In file included from /usr/src/redhat/BUILD/gcc-2.95.2/libio/iogetline.c:26:
/usr/src/redhat/BUILD/gcc-2.95.2/libio/libioP.h:30: errno.h: No such file or
directory
In file included from /usr/src/redhat/BUILD/gcc-2.95.2/libio/iolibio.h:1,
from /usr/src/redhat/BUILD/gcc-2.95.2/libio/libioP.h:47,
from /usr/src/redhat/BUILD/gcc-2.95.2/libio/iogetline.c:26:
/usr/src/redhat/BUILD/gcc-2.95.2/libio/libio.h:30: _G_config.h: No such file
or directory
/usr/src/redhat/BUILD/gcc-2.95.2/libio/iogetline.c:27: string.h: No such
file or directory

<---stop--->

[Note: I've tried a number of variations on the 'target' name just to see
what would happen. The code above shows the output when the target name was
set to 'arm-ebsa285-linux-gnu', but target names of 'arm-linux' and
'arm-ebsa285-linux' produce the same set of error messages as shown
above. --end note]

Any ideas as to what's causing these errors ?

Jim

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Mike Touloumtzis <[email-masked]>
Date: Sun, 9 Jul 2000 20:44:34 -0700

On Sun, Jul 09, 2000 at 05:38:16PM -0700, Jim Fischer wrote:
> compiler for both gcc and g++.

....

>
> [Note: I've tried a number of variations on the 'target' name just
> to see what would happen. The code above shows the output when the
> target name was set to 'arm-ebsa285-linux-gnu', but target names of
> 'arm-linux' and 'arm-ebsa285-linux' produce the same set of error
> messages as shown above. --end note]
>

Jim,

See the notes I just (a few minutes ago) posted to the list.  To
build languages other than C, first build C (you might get errors
in libio; 'make install' anyway), then build and install glibc,
then go back and do a full build of gcc.

miket