From 04a6a8c9ad46a71a8d8f2336ca77ea27239465af Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 11 May 2014 13:15:19 +0200 Subject: [PATCH] avr-gcc: add symlinks in the path for executables. --- .../avr_gcc/avr_gcc-4.8.2_2014_03_20.recipe | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sys-devel/avr_gcc/avr_gcc-4.8.2_2014_03_20.recipe b/sys-devel/avr_gcc/avr_gcc-4.8.2_2014_03_20.recipe index 90623c3a3..25713e63e 100644 --- a/sys-devel/avr_gcc/avr_gcc-4.8.2_2014_03_20.recipe +++ b/sys-devel/avr_gcc/avr_gcc-4.8.2_2014_03_20.recipe @@ -62,7 +62,7 @@ BUILD_PREREQUIRES=" SOURCE_DIR="buildtools-$srcGitRev/gcc" sourceDir=$(pwd) -relativeInstallDir="develop/tools$secondaryArchSubDir" +relativeInstallDir="develop/tools/avr" installDir="$prefix/$relativeInstallDir" objectsDir=$(pwd)/../${portVersionedName}-obj @@ -79,24 +79,12 @@ BUILD() mkdir -p $objectsDir cd $objectsDir - local additionalConfigureFlags - if [ -n "$secondaryArchSuffix" ]; then - additionalConfigureFlags="\ - --with-hybrid-secondary=${effectiveTargetArchitecture}" - fi - if [ $effectiveTargetArchitecture == x86_64 ]; then - # disable multilib support, as x86_64 by default tries to build the - # 32-bit libraries, too, which fails as no 32-bit libroot is available - additionalConfigureFlags+=" --disable-multilib" - fi - CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" "$sourceDir/configure" \ --build=$effectiveTargetMachineTriple \ --prefix=$installDir --libexecdir=$installDir/lib --mandir=$manDir \ --docdir=$docDir --disable-nls --disable-libssp --with-gnu-ld \ --enable-languages=c,c++ --enable-lto --enable-frame-pointer \ - --with-pkgversion=$(echo $portVersion | cut -c 7-) --target=avr \ - $additionalConfigureFlags + --with-pkgversion=$(echo $portVersion | cut -c 7-) --target=avr make $jobArgs } @@ -107,6 +95,16 @@ INSTALL() make install-strip + ### Symlinks ############################################## + + echo "Creating required symlinks" + + # make all tools available via default paths + mkdir -p $binDir + for f in c++ cc cpp g++ gcc gcov; do + symlinkRelative -sfn $installDir/bin/avr-$f $binDir + done + ### Cleanup ############################################### echo "Cleanup"