From 53bb7b63e0c54865e7b41a72d4e35d4f773f5088 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 1 Sep 2019 21:35:15 +0200 Subject: [PATCH] avr_gcc: fix secondary arch support. Put the compiler in the main architecture dir, that's simpler (no need to setarch to use it). And avr_libc would not handle it otherwise, anyways. --- dev-embedded/avr_libc/avr_libc-2.0.0.recipe | 2 +- .../avr_binutils-2.26.1_2016_07_22.recipe | 47 ++++++++++--------- sys-devel/avr_gcc/avr_gcc-8.3.0.recipe | 24 +++++----- 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/dev-embedded/avr_libc/avr_libc-2.0.0.recipe b/dev-embedded/avr_libc/avr_libc-2.0.0.recipe index 94aa49045..73dbc1db9 100644 --- a/dev-embedded/avr_libc/avr_libc-2.0.0.recipe +++ b/dev-embedded/avr_libc/avr_libc-2.0.0.recipe @@ -16,7 +16,7 @@ COPYRIGHT="1999-2016 Keith Gudger, Bjoern Haase, Steinar Haugen, Peter Jansen, Joerg Wunsch, Dmitry Xmelkov, The Regents of the University of California." SOURCE_URI="http://download.savannah.gnu.org/releases/avr-libc/avr-libc-$portVersion.tar.bz2" CHECKSUM_SHA256="b2dd7fd2eefd8d8646ef6a325f6f0665537e2f604ed02828ced748d49dc85b97" -REVISION="2" +REVISION="3" ARCHITECTURES="any" SECONDARY_ARCHITECTURES="x86" diff --git a/sys-devel/avr_binutils/avr_binutils-2.26.1_2016_07_22.recipe b/sys-devel/avr_binutils/avr_binutils-2.26.1_2016_07_22.recipe index be7ed9207..061899932 100644 --- a/sys-devel/avr_binutils/avr_binutils-2.26.1_2016_07_22.recipe +++ b/sys-devel/avr_binutils/avr_binutils-2.26.1_2016_07_22.recipe @@ -23,7 +23,7 @@ HOMEPAGE="https://www.gnu.org/software/binutils" COPYRIGHT="1988-2016 Free Software Foundation, Inc." LICENSE="GNU GPL v3 GNU LGPL v3" -REVISION="4" +REVISION="5" srcGitRev="68e96393c7be88bc0e577404869a07ad3c0b48b3" SOURCE_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz" CHECKSUM_SHA256="95743a550c7e2b561273a1e349a270c659b0c454209de9cd7fc105395fec66fd" @@ -35,24 +35,24 @@ SECONDARY_ARCHITECTURES="x86" PROVIDES=" avr_binutils$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_addr2line$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_ar$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_as$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_c++filt$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_elfedit$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_gprof$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_ld$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_ld.bfd$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_nm$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_objcopy$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_objdump$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_ranlib$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_readelf$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_size$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_strings$secondaryArchSuffix = $portVersion compat >= 2.23 - cmd:avr_strip$secondaryArchSuffix = $portVersion compat >= 2.23 - lib:avr_libbfd_$portVersion$secondaryArchSuffix = $portVersion compat >= 2.23 - lib:avr_libopcodes_$portVersion$secondaryArchSuffix = $portVersion compat >= 2.23 + cmd:avr_addr2line = $portVersion compat >= 2.23 + cmd:avr_ar = $portVersion compat >= 2.23 + cmd:avr_as = $portVersion compat >= 2.23 + cmd:avr_c++filt = $portVersion compat >= 2.23 + cmd:avr_elfedit = $portVersion compat >= 2.23 + cmd:avr_gprof = $portVersion compat >= 2.23 + cmd:avr_ld = $portVersion compat >= 2.23 + cmd:avr_ld.bfd = $portVersion compat >= 2.23 + cmd:avr_nm = $portVersion compat >= 2.23 + cmd:avr_objcopy = $portVersion compat >= 2.23 + cmd:avr_objdump = $portVersion compat >= 2.23 + cmd:avr_ranlib = $portVersion compat >= 2.23 + cmd:avr_readelf = $portVersion compat >= 2.23 + cmd:avr_size = $portVersion compat >= 2.23 + cmd:avr_strings = $portVersion compat >= 2.23 + cmd:avr_strip = $portVersion compat >= 2.23 + lib:avr_libbfd_$portVersion = $portVersion compat >= 2.23 + lib:avr_libopcodes_$portVersion = $portVersion compat >= 2.23 " REQUIRES=" @@ -99,12 +99,13 @@ BUILD() mkdir -p $objectsDir cd $objectsDir - CFLAGS=-O2 CXXFLAGS=-O2 runConfigure "$sourceDir/configure" \ + CFLAGS=-O2 CXXFLAGS=-O2 runConfigure --omit-dirs binDir \ + "$sourceDir/configure" \ --exec-prefix=$installDir \ --includedir=$includeDir/binutils \ --docdir=$docDir --with-sysroot=$installDir \ --enable-deterministic-archives --enable-shared=yes \ - --disable-nls --target=avr + --disable-nls --bindir=$prefix/bin --target=avr make $jobArgs LEXLIB= } @@ -122,7 +123,7 @@ INSTALL() echo "Strip debug info" - strip --strip-debug $binDir/* + strip --strip-debug $prefix/bin/* ### Symlinks ############################################## @@ -131,7 +132,7 @@ INSTALL() # There are copies of a subset of the commands below installDir. We # overwrite those with symlinks to the ones in binDir. for file in $installDir/avr/bin/*; do - symlinkRelative -sfn $binDir/avr-$(basename $file) $file + symlinkRelative -sfn $prefix/bin/avr-$(basename $file) $file done ### Cleanup ################################################# diff --git a/sys-devel/avr_gcc/avr_gcc-8.3.0.recipe b/sys-devel/avr_gcc/avr_gcc-8.3.0.recipe index 18817409a..e04ee1aa9 100644 --- a/sys-devel/avr_gcc/avr_gcc-8.3.0.recipe +++ b/sys-devel/avr_gcc/avr_gcc-8.3.0.recipe @@ -7,7 +7,7 @@ HOMEPAGE="https://gcc.gnu.org" SOURCE_URI="http://ftpmirror.gnu.org/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz" SOURCE_DIR="gcc-$portVersion" CHECKSUM_SHA256="64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c" -REVISION="1" +REVISION="2" LICENSE=" GNU GPL v2 GNU LGPL v2 @@ -23,25 +23,25 @@ targetU="avr" PROVIDES=" ${targetU}_gcc$secondaryArchSuffix = $portVersion compat >= 4 - cmd:${targetU}_c++$secondaryArchSuffix = $portVersion compat >= 4 - cmd:${targetU}_cc$secondaryArchSuffix = $portVersion compat >= 4 - cmd:${targetU}_cpp$secondaryArchSuffix = $portVersion compat >= 4 - cmd:${targetU}_g++$secondaryArchSuffix = $portVersion compat >= 4 - cmd:${targetU}_gcc$secondaryArchSuffix = $portVersion compat >= 4 - cmd:${targetU}_gcc_4.8.2$secondaryArchSuffix = $portVersion compat >= 4 - cmd:${targetU}_gcov$secondaryArchSuffix = $portVersion compat >= 4 + cmd:${targetU}_c++ = $portVersion compat >= 4 + cmd:${targetU}_cc = $portVersion compat >= 4 + cmd:${targetU}_cpp = $portVersion compat >= 4 + cmd:${targetU}_g++ = $portVersion compat >= 4 + cmd:${targetU}_gcc = $portVersion compat >= 4 + cmd:${targetU}_gcc_4.8.2 = $portVersion compat >= 4 + cmd:${targetU}_gcov = $portVersion compat >= 4 lib:${targetU}_libstdc++$secondaryArchSuffix = $portVersion compat >= 4 " REQUIRES=" haiku$secondaryArchSuffix - cmd:${targetU}_as$secondaryArchSuffix + cmd:${targetU}_as lib:libgmp$secondaryArchSuffix lib:libmpfr$secondaryArchSuffix lib:libmpc$secondaryArchSuffix " BUILD_REQUIRES=" - cmd:${targetU}_as$secondaryArchSuffix + cmd:${targetU}_as devel:libgmp$secondaryArchSuffix devel:libmpfr$secondaryArchSuffix devel:libmpc$secondaryArchSuffix @@ -110,9 +110,9 @@ INSTALL() echo "Creating required symlinks" # make all tools available via default paths - mkdir -p $binDir + mkdir -p $prefix/bin for f in c++ cc cpp g++ gcc gcov; do - symlinkRelative -sfn $installDir/bin/$targetArch-$f $binDir + symlinkRelative -sfn $installDir/bin/$targetArch-$f $prefix/bin done ### Cleanup ###############################################