comp.lang.ada
 help / color / mirror / Atom feed
From: "Dwight Schauer" <dschauer@gmail.com>
Subject: Re: Help with getting GNAT Ada running on 64-bit Gentoo Linux
Date: 26 Mar 2005 00:45:50 -0800
Date: 2005-03-26T00:45:50-08:00	[thread overview]
Message-ID: <1111826750.382122.170630@f14g2000cwb.googlegroups.com> (raw)
In-Reply-To: mailman.154.1109500828.527.comp.lang.ada@ada-france.org

I checked out GCC from CVS on a Fedora Core 3 X86_64 box. I
bootstrapped GCC 4.0.0 20050325 (prerelease) with full gnat/ada support
using gnatgcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3) . I installed
it to an alternate directory. (Not /usr).

I copied it over to my gentoo amd64 box (a no multilib profile) and
after a bit of mucking around was able to get the same bootstrap
working on Gentoo. I had to symlink gnatgcc to gcc in the alternate bin
directory, as some parts of the compile were using gcc rather than the
CC or ADAC variable and were breaking as result. I put that alternate
bin directory as the first one in executeable path in my build script.
Since the gcc symlink is in the path first, the one in /usr/bin is not
used.

I was able to successfully bootstrap again on Gentoo amd64 using the
gnatgcc built on Gentoo amd64.

I've not tried to make a Gentoo ebuild for it yet.

Here is the script I used to build it:

#!/bin/bash

function bye
{
        exit ${1}
}

function die
{
        echo "*** ${1}"
        echo "*** error at line ${BASH_LINENO[$i]}"
        echo "*** fatal"
        bye -1
}

S=../../gcc-cvs/gcc


#export PATH=/opt/local-tools/host-gcc-ada-3.4.3/bin:${PATH}
#export CC=/opt/local-tools/host-gcc-ada-3.4.3/bin/gnatgcc
#export ADAC=/opt/local-tools/host-gcc-ada-3.4.3/bin/gnatgcc

export PATH=/opt/local-tools/host-gnat-cvs-gcc4/bin:${PATH}

#export PATH=/opt/local-tools/host-gnat-cvs/bin:${PATH}
#export CC=/opt/local-tools/host-gnat-cvs/bin/gnatgcc
#export ADAC=/opt/local-tools/host-gnat-cvs/bin/gnatgcc


INSTALL_PREFIX=/opt/local-tools
TARGET_COMPILER=host-gnat-cvs-gcc4-native
PREFIX=${INSTALL_PREFIX}/${TARGET_COMPILER}

function configure_gnat
{
        ${S}/configure --prefix=${PREFIX} \
        --program-prefix=gnat \
        --enable-languages="c,ada" \
        --enable-libada \
        --with-gcc \
        --with-gnu-ld \
        --with-gnu-as \
        --enable-threads=posix \
        --disable-shared \
        --with-system-zlib \
        --disable-nls \
        --libdir=${PREFIX}/lib/ada \
        --libexecdir=${PREFIX}/libexec/ada \
        --mandir=${PREFIX}/share/man \
        --infodir=${PREFIX}/share/info \
        --disable-multilib \
        || die "configure failed"
}

configure_gnat
make bootstrap || die "bootstrap failed"
##make -C gcc gnatlib_and_tools || die "gnatlib_and_tools failed"
make -C gcc/ada gnatlib || die "gnatlib"
make || die "make"
make install || die "make install"

echo '****'
echo done
echo '****'




      reply	other threads:[~2005-03-26  8:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-23  2:53 Help with getting GNAT Ada running on 64-bit Gentoo Linux Larry Elmore
2004-08-23  5:17 ` Ludovic Brenta
2004-08-23 23:54   ` Larry Elmore
2004-08-24 23:12     ` Cesar Rabak
2005-02-27  1:47       ` Dwight Schauer
2005-02-27 10:40         ` Duncan Sands
2005-03-26  8:45           ` Dwight Schauer [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox