gm2
[Top][All Lists]
Advanced

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

[Gm2] Configure options [Was: Re: gm2 builds as a cross compiler for the


From: john o goyo
Subject: [Gm2] Configure options [Was: Re: gm2 builds as a cross compiler for the avr series of microprocessors on gcc-8.2.0]
Date: Tue, 27 Nov 2018 13:47:06 -0500
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15

Gaius,

I am curious about your choice of configuration options (below):

On 27/11/2018 12:24, Gaius Mulley wrote (in part):
Hello,

I thought I'd mention I have pushed a few patches which allow gm2 to be
built as a cross compiler for the avr series of microprocessors.
The script I used to configure and build gm2 is below.  I'll see if I
can rebuild the gm2-avr debian package for 8.2.0

#/bin/bash

GCC=8.2.0

DIR=/home/gaius/GM2/graft-${GCC}

LANGUAGES=c,c++,gm2
PREFIX=/usr
PREFIX=$HOME/opt

if [ -d $DIR ] ; then
#   if ! ./rebuild-autofiles ; then
#       echo "failed to reconfigure"
#       exit 1
#   fi
    cd $DIR
    rm -rf build-avr-${GCC}
    mkdir build-avr-${GCC}
    cd build-avr-${GCC}
    CFLAGS=-g \
    ../combined/gm2/gcc-versionno/configure \
     --prefix=${PREFIX}/lib \
     --libexecdir=${PREFIX}/lib \
     --infodir=${PREFIX}/share/info \
     --mandir=${PREFIX}/share/man \
     --bindir=${PREFIX}/bin \
     --libdir=${PREFIX}/lib \
     --enable-shared \
     --with-system-zlib \
     --enable-long-long \
Is this recommended for gm2?
     --enable-nls \
     --without-included-gettext \
     --disable-libssp \
     --build=x86_64-linux-gnu \
     --host=x86_64-linux-gnu \
     --enable-languages=c,c++ \
     --target=avr \
     --enable-languages=${LANGUAGES} \
Why is this a separate line partly duplicating the above?
     --enable-checking \
     --disable-libssp \
     --disable-bootstrap \
     --target=avr \
     --build=x86_64-linux-gnu \
     --host=x86_64-linux-gnu

     if ! time make ; then
        echo "build of gcc for the avr failed"
        exit 1
     fi

     if ! make install ; then
        echo "install of gcc for the avr failed"
        exit 2
     fi
else
    echo "cannot find directory $DIR"
    exit 1
fi

hope this is useful,

regards,
Gaius
As a comparison point, here is my build script on Solaris 10/sparc:

#!/bin/bash
# $Revision: 1.2 $
#
GM2DATE=20181123
GCCVER=8.2.0

export LD_LIBRARY_PATH=/usr/local/lib:/home/build/gcc/$GCCVER/lib
export LD_LIBRARY_PATH_64=/usr/local/lib/64:/home/build/gcc/$GCCVER/lib/sparcv9

rm -rf gm2-$GCCVER-$GM2DATE
mkdir gm2-$GCCVER-$GM2DATE
cd gm2-$GCCVER-$GM2DATE

CC=/home/build/gcc/$GCCVER/bin/gcc \
CXX=/home/build/gcc/$GCCVER/bin/g++ \
CFLAGS="-lnsl -lsocket -lpthread -lrt -L/lib" \
LDFLAGS="-lnsl -lsocket -lpthread -lrt -L/lib" \
../../src/gcc-$GCCVER+gm2-$GM2DATE/gm2/gcc-versionno/configure \
--prefix=$HOME/gm2/$GCCVER \
--exec-prefix=$HOME/gm2/$GCCVER \
--without-gnu-ld --with-ld=/usr/ccs/bin/ld \
--without-gnu-as --with-as=/usr/sfw/bin/gas  \
--with-mpc-include=/usr/local/include \
--with-mpc-lib=/usr/local/lib \
--with-mpc-lib=/usr/local/lib/64 \
--with-mpfr-include=/usr/local/include \
--with-mpfr-lib=/usr/local/lib \
--with-mpfr-lib=/usr/local/lib/64 \
--with-gmp-include=/usr/local/include \
--with-gmp-lib=/usr/local/lib \
--with-gmp-lib=/usr/local/lib/64 \
--enable-languages=c,c++,gm2 \
--disable-bootstrap --enable-checking \
--enable-shared --disable-libitm \
--enable-threads=posix

#
# Following needs to be exported for building with gcc-$GCCVER
#
echo .
echo export LD_LIBRARY_PATH=/usr/local/lib:/home/build/gcc/$GCCVER/lib
echo export LD_LIBRARY_PATH_64=/usr/local/lib/64:/home/build/gcc/$GCCVER/lib/sparcv9
echo ensure /usr/xpg6/bin:/usr/xpg4/bin is before /usr/bin
echo build with gmake -j4

#[end]

Notus bene: LDFLAGS is not propogated down to the gm2 directories during the build so I always need to add "-lnsl -lpthread -lsocket" after all occurrences of "-lpth" in gm2/Make-lang.in.

Sincerely,
john




reply via email to

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