gm2
[Top][All Lists]
Advanced

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

Re: A beginner's question


From: Gaius Mulley
Subject: Re: A beginner's question
Date: Fri, 07 Apr 2023 21:25:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Rudolf Schubert <rudolf@muc.de> writes:

Hi Rudolf and Benjamin,

> My 'real' problems go a bit 'deeper' but before I wanted to go in too
> much detail I first wanted to make sure I'm really using the latest
> version of GM2. I don't want to bore peeple with old stuff which is
> not relevant any more;-)

the latest gm2 in source form is available via:

  $ git clone git://gcc.gnu.org/git/gcc.git

note that GCC-13 is about to be released (somewhere within 0-3 weeks).
However gm2-13 is significantly different to gm2-12 (linking options and
many bug fixes).  The RTExceptions bug for example was fixed around 6
weeks ago iirc in GCC-13.

On a Debian system (if I need a fast build then) I build it with the
script included at the end.  Please read and adapt - it will remove the
$HOME/opt directory - and probably do other bad things - but the
configure arguments should be useful at least :-)

regards,
Gaius




#!/bin/bash

GCC=none
MAXCPU=$(nproc)
REGEN_CONFIGURE=0

REPRODIR=gcc-read-write

PROFILE=
LANGUAGES=m2

# INSTALLDIR=opt-lto
INSTALLDIR=opt
MAKEFLAGS=
# MAKEFLAGS=profiledbootstrap-lean
# CONFIGFLAGS=--with-build-config=bootstrap-lto-lean


if [ $# -gt 1 ]; then
   CONFIGFLAGS=$1
   shift
   echo "configure with ${CONFIGFLAGS}"
   echo "press enter to confirm"
   read ans
fi

if [ $# -eq 0 ]; then
   CPUS="-j ${MAXCPU}"
else
   CPUS="-j $*"
fi


pushd $HOME/opt && rm -rf bin  include  lib  lib32  lib64  libexec  share && 
popd

echo "download prereq"
pushd ${REPRODIR}
./contrib/download_prerequisites
popd

if [ ${REGEN_CONFIGURE} -eq 1 ] ; then
    echo "regenerating configuring files"
    chmod 755 rebuild-autofiles
    if ! ./rebuild-autofiles ${REPRODIR} ; then
        echo "failed to reconfigure"
        exit 1
    fi
    echo "after reconfigure"
else
    echo "not regenerating configuring files"
fi

rm -rf build ; mkdir build ; cd build ; CFLAGS="-O0 -g" CXXFLAGS="-O0 -g" 
../gcc-read-write/configure \
                                            --enable-languages=${LANGUAGES} \
                                            --enable-multilib  
--enable-checking \
                                            --disable-bootstrap \
                                            ${CONFIGFLAGS} \
                                            --prefix=$HOME/opt
if make ${CPUS} ${MAKEFLAGS} ; then
    cd gcc 
    if make m2/stage2/cc1gm2 ; then
        echo "built stage2 as well with full debugging"
    else
        echo "failed to build m2/stage2/cc1gm2"
        exit 1
    fi
    cd ..
    make check-m2 ${CPUS}
    make install
else
    echo "make failed"
fi



reply via email to

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