gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] How do I use the git repository to build?


From: Gaius Mulley
Subject: Re: [Gm2] How do I use the git repository to build?
Date: Sun, 08 Dec 2013 13:15:56 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

JD <address@hidden> writes:

> Gaius,
> I've taken a copy of your git repository and updated it with:
>      git clone git://git.savannah.nongnu.org/gm2.git
> and
>     git pull
>
> But the directory structure is different from the tarball.  For
> example, in the repository 'configure' is in
>      .../git-repository/gm2/gcc-versionno/gcc/gm2
> whereas in the tarball it is in:
>    ... /gcc-4.7.3+gm2-git-latest/gm2/gcc-versionno
>
> Do I just go to where 'configure' is and run it into a new directory,
> e.g. build-4.7.3, which can be anywhere?
>
> I'd like to start running the test suite.  I've just tried executing
> gm2.exp in one of the directories and it failed at the end of the test
> for 'tracelevel'.  How should I be doing this?
>
> Regards,
> John

Hi John,

ah yes the repository has changed so that it is easier to overlay onto
the gcc file structure (and probably needs some tidying up).

The git repository only contains the gm2 front end, so you would need to
overlay the gcc source tree on top of the gm2 repository and patch it
before the configure would function.

Below is my script for automatically downloading gm2 and
rebuilding/testing.

It might be worth looking at
gm2/gm2-harness/shell-bin/prodice-gcc-gm2-tree for absolute detail on
how the patches are applied.

In summary the gcc-4.7.3 tree is overlaid onto of
git-repository/gm2/gcc-versionno and then all patches in
git-repository/gm2/gcc-versionno/gcc/gm2/patches/gcc/4.7.3/??-* are
applied.

There after the git-repository/gm2/gcc-versionno/configure can be
configured (note this comes from the vanilla gcc and is not part of
gm2).

I think this needs writing up clearly in the documentation,

regards,
Gaius




#!/bin/bash

export PATH=/usr/bin:$PATH
echo path set to ${PATH}

echo "press enter to continue if the path is correct"
read ans

LANGUAGES=c,c++,gm2
cd $HOME/GM2

GCC=$1

if [ "${GCC}" == "" ] ; then
    echo "You must specify which gcc release you want to download, currently 
supported are:  4.1.2 and 4.7.3"
    exit 1
fi

if [ ! -d $HOME/GM2 ] ; then
    echo "no $HOME/GM2 found"
    exit 1
fi

rm -rf scratch-area
mkdir scratch-area
cd scratch-area

if ! wget 
http://floppsie.comp.glam.ac.uk/download/c/gcc-${GCC}+gm2-git-latest.tar.gz ; 
then
    echo "unable to download gm2 grafted onto gcc-${GCC}"
    exit 2
fi

tar zxf gcc-${GCC}+gm2-git-latest.tar.gz
rm -rf build-${GCC}
mkdir build-${GCC}
cd build-${GCC}

if [ "$GCC" == "4.7.3" ] ; then
    ../gcc-${GCC}+gm2-git-latest/gm2/gcc-versionno/configure --prefix=$HOME/opt 
\
    --enable-languages=${LANGUAGES} \
    --libexecdir=$HOME/opt/lib --enable-shared \
    --enable-threads=posix --enable-__cxa_atexit \
    --enable-clocale=gnu \
    --disable-multilib --disable-bootstrap \
    --enable-checking --enable-libgm2
fi
if [ "$GCC" == "4.1.2" ] ; then
     CFLAGS=-B/usr/lib/x86_64-linux-gnu
     export CFLAGS
     LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
     export LIBRARY_PATH
     ../gcc-${GCC}+gm2-git-latest/gm2/gcc-versionno/configure 
--enable-languages=c,c++,gm2 \
     --disable-multilib --enable-checking=all --prefix=$HOME/opt
fi

time ( ( make "SHELL=/bin/bash" && cd gcc && make check-gm2 ) >& build-log < 
/dev/null ) &
sleep 3
tail -f build-log



reply via email to

[Prev in Thread] Current Thread [Next in Thread]