From d0c5ed9f3728bd5998ab06c43af974447034ccfc Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 14 May 2014 11:51:51 +0200 Subject: [PATCH] avr_gcc: fix LIBRARY_PATH conflict * gcc tries to set this to the target libs, but haiku use it for the runtime_loader * We have a workaround in our target config, but it is not used when building a cross compiler with a non-haiku target * Apply the workaround manually by forcing LIBRARY_PATH_ENV --- sys-devel/avr_gcc/avr_gcc-4.8.2_2014_03_20.recipe | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 25713e63e..351b97fdd 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 @@ -39,6 +39,7 @@ PROVIDES=" REQUIRES=" haiku$secondaryArchSuffix >= $haikuVersion cmd:avr_as$secondaryArchSuffix + lib:libstdc++$secondaryArchSuffix " BUILD_REQUIRES=" cmd:avr_as$secondaryArchSuffix @@ -47,6 +48,7 @@ BUILD_PREREQUIRES=" haiku${secondaryArchSuffix}_devel >= $haikuVersion cmd:autoconf cmd:awk + cmd:bison cmd:find cmd:flex cmd:gcc$secondaryArchSuffix @@ -79,7 +81,11 @@ BUILD() mkdir -p $objectsDir cd $objectsDir - CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" "$sourceDir/configure" \ + # Setting a quoted string in an environment variable is ugly. + echo '#define LIBRARY_PATH_ENV "AVR_LIBRARY_PATH"' > haiku_host.h + + CXXFLAGS="-O2 -include $objectsDir/haiku_host.h" \ + CFLAGS="-O2 -U_FORTIFY_SOURCE" "$sourceDir/configure" \ --build=$effectiveTargetMachineTriple \ --prefix=$installDir --libexecdir=$installDir/lib --mandir=$manDir \ --docdir=$docDir --disable-nls --disable-libssp --with-gnu-ld \