aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarian Buschsieweke <marian.buschsieweke@ovgu.de>2020-10-10 22:48:02 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-10-11 18:54:22 +0000
commit2a935e2ce69ccb69125bf9c154a54be19cbdb0a2 (patch)
tree5c2d2942defb8d3d26607d14fdf0f41f2e39c45c
parent052f2968100f5a1c4ebb97caef35e3ea9f90682b (diff)
community/binutils-cross-embedded: Fix bug on avr
For some reason ld-avr expects the ldscripts folder in /usr/lib, rather than in /usr/avr/lib. This commit adds a patch to fix the issue.
-rw-r--r--community/binutils-cross-embedded/APKBUILD10
-rw-r--r--community/binutils-cross-embedded/avr-ldscript-path.patch25
2 files changed, 32 insertions, 3 deletions
diff --git a/community/binutils-cross-embedded/APKBUILD b/community/binutils-cross-embedded/APKBUILD
index 3db82382887..48381bce979 100644
--- a/community/binutils-cross-embedded/APKBUILD
+++ b/community/binutils-cross-embedded/APKBUILD
@@ -12,7 +12,7 @@ _targets="
"
pkgname="$_pkgbase-cross-embedded"
pkgver=2.35.1
-pkgrel=1
+pkgrel=2
pkgdesc="Tools necessary to build programs for embedded targets"
url="https://www.gnu.org/software/binutils/"
makedepends="gettext libtool autoconf automake bison texinfo zlib-dev"
@@ -22,7 +22,9 @@ for target in $_targets; do
targetnorm="${target//-/_}"
subpackages="$_pkgbase-$target:$targetnorm $subpackages"
done
-source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz"
+source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz
+ avr-ldscript-path.patch
+ "
builddir="$srcdir/$_pkgbase-$pkgver"
@@ -35,6 +37,7 @@ build() {
--target=$target \
--with-sysroot=/usr/$target \
--prefix=/usr/ \
+ --libdir=/usr/$target/lib \
--infodir=/deleteme/info \
--htmldir=/deleteme/html \
--pdfdir=/deleteme/pdf \
@@ -110,4 +113,5 @@ riscv_none_elf() {
_install_subpkg
}
-sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz"
+sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz
+3dfcdfb1b3e4d2ab848e5d8af682e26a30806ce2d2f5819dbb1fbb2d005775b201b57efaecc9a54f7950b182cc0aaeb0ea79a4f6e6149473fe669bc9b3acebe0 avr-ldscript-path.patch"
diff --git a/community/binutils-cross-embedded/avr-ldscript-path.patch b/community/binutils-cross-embedded/avr-ldscript-path.patch
new file mode 100644
index 00000000000..90a2e290b34
--- /dev/null
+++ b/community/binutils-cross-embedded/avr-ldscript-path.patch
@@ -0,0 +1,25 @@
+For some reason avr-ld keeps looking for the ldscripts in /usr/lib, rather than
+in /usr/avr/lib - while using /usr/$target/lib works fine for all other
+targets. This patch fixes it.
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -50,7 +50,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -555,7 +555,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include