Cross building gnatlib for arm-elf fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am trying to build gcc for arm-elf target with Ada support.
I am using gnat sources (binutils-2.15.tar.gz, gcc-3.4.5-20050524-src.tgz and gnat-gpl-2005-src.tgz) and newlib 1.14.0. The host is an Intel box running Fedora Core 2 with gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7).

The following steps were successful:
- build and install binutils
- build and install gcc + gnat with c and ada both enabled
- build and install newlib

The build fails when making gnatlib and gnattools (see trace below): Apparently make attempts to cross compile file system oriented code which can not success, I suppose, since the target arm-elf has no file system and thus does not support operations like opendir, readdir, etc.

I hoped that the trouble was of same concern as what was reported in bug 21276 and tried to apply the workaround suggested by corsepiu@xxxxxxxxxxx:
- build and install binutils
- build and install gcc + gnat with ada disabled
- build and install newlib
- build and install gcc + gnat with ada enabled
- build gnatlib and cross gnattools
However the last step still fails with same error messages as previously (see below).

I'd be really grateful for any help or suggestion.

Pierre

=======================================================================
$ make -C gcc gnatlib cross-gnattools ada.all.cross
make: Entering directory `/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc'
make -C ada "BISON=bison" "BISONFLAGS=" "CFLAGS=-g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long " "LDFLAGS=" "FLEX=flex" "FLEXFLAGS=" "LN=ln" "LN_S=ln -s" "MAKEINFO=makeinfo" "MAKEINFOFLAGS=--no-split" "MAKEOVERRIDES=" "SHELL=/bin/sh" "exeext=" "build_exeext=" "objext=.o" "exec_prefix=/opt/gnu/arm+ada" "prefix=/opt/gnu/arm+ada" "local_prefix=/usr/local" "gxx_include_dir=/opt/gnu/arm+ada/lib/gcc/arm-elf/3.4.5/../../../..`echo /opt/gnu/arm+ada | sed -e 's|^/opt/gnu/arm+ada||' -e 's|/[^/]*|/..|g'`/include/c++/3.4.5" "build_tooldir=/opt/gnu/arm+ada/arm-elf" "gcc_tooldir=/opt/gnu/arm+ada/lib/gcc/arm-elf/3.4.5/../../../../arm-elf" "bindir=/opt/gnu/arm+ada/bin" "libexecsubdir=/opt/gnu/arm+ada/lib/gcc/arm-elf/3.4.5" "datadir=/opt/gnu/arm+ada/share" "localedir=/opt/gnu/arm+ada/share/locale" "CC=gcc" "STAGE_PREFIX=" \
   GNATLIBFLAGS="-W -Wall -gnatpg" \
   GNATLIBCFLAGS="-g -O2 " \
   TARGET_LIBGCC2_CFLAGS="-Dinhibit_libc -fno-inline" \
   THREAD_KIND="native" \
   TRACE="no" \
   gnatlib
make[1]: Entering directory `/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc/ada'
make -C rts \
CC="`echo \" ./xgcc -B./ -B/opt/gnu/arm+ada/arm-elf/bin/ -isystem /opt/gnu/arm+ada/arm-elf/include -isystem /opt/gnu/arm+ada/arm-elf/sys-include -L/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc/../ld\" \
        | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`" \
INCLUDES="-I. -I.. -I../.. -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada/../config -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada/../../include -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada/.. -I./../.." \ CFLAGS="-g -O2 -Dinhibit_libc -fno-inline -fexceptions -DIN_RTS" \
        srcdir=/usr/local/src/gcc-3.4.5-gnat/gcc/ada \
-f ../Makefile adaint.o argv.o cio.o cstreams.o ctrl_c.o errno.o exit.o raise.o sysdep.o aux-io.o init.o initialize.o seh_init.o cal.o final.o tracebak.o expect.o mkdir.o socket.o make[2]: Entering directory `/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc/ada/rts' ../../xgcc -B../../ -B/opt/gnu/arm+ada/arm-elf/bin/ -isystem /opt/gnu/arm+ada/arm-elf/include -isystem /opt/gnu/arm+ada/arm-elf/sys-include -L/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc/../ld -c -DCROSS_COMPILE -DIN_GCC `echo -g -O2 -Dinhibit_libc -fno-inline -fexceptions -DIN_RTS |sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'` -I. -I.. -I../.. -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada/../config -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada/../../include -I/usr/local/src/gcc-3.4.5-gnat/gcc/ada/.. -I./../.. adaint.c \
  -o adaint.o
In file included from /opt/gnu/arm+ada/arm-elf/include/dirent.h:6,
                 from adaint.h:34,
                 from adaint.c:156:
/opt/gnu/arm+ada/arm-elf/include/sys/dirent.h:10:2: #error "<dirent.h> not supported"
In file included from adaint.c:156:
adaint.h:71: error: syntax error before '*' token
adaint.c:275: error: `MAXPATHLEN' undeclared here (not in a function)
adaint.c:832: error: syntax error before '*' token
adaint.c: In function `__gnat_readdir':
adaint.c:842: error: `dirp' undeclared (first use in this function)
adaint.c:842: error: (Each undeclared identifier is reported only once
adaint.c:842: error: for each function it appears in.)
adaint.c:846: error: `buffer' undeclared (first use in this function)
adaint.c:846: error: dereferencing pointer to incomplete type
adaint.c: In function `__gnat_get_env_value_ptr':
adaint.c:1231: warning: assignment makes pointer from integer without a cast
adaint.c: In function `__gnat_locate_exec_on_path':
adaint.c:2053: warning: initialization makes pointer from integer without a cast
make[2]: *** [adaint.o] Error 1
make[2]: Leaving directory `/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc/ada/rts'
make[1]: *** [gnatlib] Error 2
make[1]: Leaving directory `/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc/ada'
make: *** [gnatlib] Error 2
make: Leaving directory `/usr/local/src/build-linux/gcc-3.4.5-gnat/gcc'
$
=======================================================================
--
Pierre HABRAKEN - mailto:Pierre.Habraken@xxxxxxx
Tél: 04 76 82 72 46 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux