gm2
[Top][All Lists]
Advanced

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

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


From: Gaius Mulley
Subject: Re: [Gm2] Configure options [Was: Re: gm2 builds as a cross compiler for the avr series of microprocessors on gcc-8.2.0]
Date: Wed, 28 Nov 2018 08:33:49 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

john o goyo <address@hidden> writes:

> 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?

Hi John,

it might be because some of the avr microprocessors are 8 (and 16) bit
and it needs to create long long as it doesn't have this datatype in
hardware.  


>>      --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?

ah yes, the duplication is a bug and should be removed.

> 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.

ah yes, I will look into this again!  Thanks for the reminder,


regards,
Gaius



reply via email to

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