This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Ada] Bootstrapping mainline GNAT fails (with workaround androot cause: makefile bug)


When bootstrapping the ADA frontend for GCC3.1, I ran into some build 
problems, but managed to find a workaround and the underlying cause, as 
described below.

While I tried building inside the source tree I ran into the internal 
error reported by other people.

Then I tried building in a separate build tree but I got problems during 
linking of gnatlib:

    c-charac.o not found

After spending a some time reading the Makefiles and trying out various 
things, I found that the observed problems are caused by the file:

    build/gcc/ada/Makefile

which contains
    VPATH=../../../gcc/ada

When making in the directory
    build/gcc/ada/rts

the file build/gcc/ada/Makefile is used, as follows:
    make -f ../Makefile

When used like this, the relative directory in VPATH ends up pointing to 
the wrong directory.

Setting VPATH to the absolute directory, with the '--srcdir' option to 
the configure script, provides a workaround for this problem.
I think there must be a better solution, but I am no VPATH expert, so 
I'll leave that for someone else...


Here is the bootstrap procedure that worked for me:

Set my gnat-enabled GCC compiler in the path.
This is gnat-3.14p-i686-pc-linux-gnu-bin.tar.gz
# export PATH=/usr/gnat/bin:$PATH

(in toplevel directory, where MAINTAINERS resides)
# mkdir build
# cd build
# ../configure --srcdir=`cd ..;pwd` {other options}
# make bootstrap
# cd gcc
# make gnatlib_and-tools
# cd ..
# make install


Results of the compilation:

# /usr/gcc-3.1/bin/gcc -v
Reading specs from /usr/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../configure --enable-languages=c,ada --prefix=/usr/gcc-3.1
Thread model: single
gcc version 3.1 20020322 (prerelease)

# ./config.guess
i686-pc-linux-gnu

# /usr/gnat/bin/gcc -v
Reading specs from /usr/gnat/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/specs
gcc version 2.8.1

# uname -a
Linux arthur 2.4.13 #2 Mon Dec 10 21:28:35 CET 2001 i686 unknown

# grep -H  . /usr/lib/setup/*version*
slack-version-8.0.0:(åtta)

# grep -h 'GNU glibc' /var/adm/packages/*
glibc:    GNU glibc-2.2.3



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]