aboutsummaryrefslogtreecommitdiff
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)
downloadalpine_aports-2a935e2ce69ccb69125bf9c154a54be19cbdb0a2.tar.bz2
alpine_aports-2a935e2ce69ccb69125bf9c154a54be19cbdb0a2.tar.xz
alpine_aports-2a935e2ce69ccb69125bf9c154a54be19cbdb0a2.zip
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 3db8238288..48381bce97 100644
--- a/community/binutils-cross-embedded/APKBUILD
+++ b/community/binutils-cross-embedded/APKBUILD
@@ -12,7 +12,7 @@ _targets="
12 " 12 "
13pkgname="$_pkgbase-cross-embedded" 13pkgname="$_pkgbase-cross-embedded"
14pkgver=2.35.1 14pkgver=2.35.1
15pkgrel=1 15pkgrel=2
16pkgdesc="Tools necessary to build programs for embedded targets" 16pkgdesc="Tools necessary to build programs for embedded targets"
17url="https://www.gnu.org/software/binutils/" 17url="https://www.gnu.org/software/binutils/"
18makedepends="gettext libtool autoconf automake bison texinfo zlib-dev" 18makedepends="gettext libtool autoconf automake bison texinfo zlib-dev"
@@ -22,7 +22,9 @@ for target in $_targets; do
22 targetnorm="${target//-/_}" 22 targetnorm="${target//-/_}"
23 subpackages="$_pkgbase-$target:$targetnorm $subpackages" 23 subpackages="$_pkgbase-$target:$targetnorm $subpackages"
24done 24done
25source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz" 25source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz
26 avr-ldscript-path.patch
27 "
26 28
27builddir="$srcdir/$_pkgbase-$pkgver" 29builddir="$srcdir/$_pkgbase-$pkgver"
28 30
@@ -35,6 +37,7 @@ build() {
35 --target=$target \ 37 --target=$target \
36 --with-sysroot=/usr/$target \ 38 --with-sysroot=/usr/$target \
37 --prefix=/usr/ \ 39 --prefix=/usr/ \
40 --libdir=/usr/$target/lib \
38 --infodir=/deleteme/info \ 41 --infodir=/deleteme/info \
39 --htmldir=/deleteme/html \ 42 --htmldir=/deleteme/html \
40 --pdfdir=/deleteme/pdf \ 43 --pdfdir=/deleteme/pdf \
@@ -110,4 +113,5 @@ riscv_none_elf() {
110 _install_subpkg 113 _install_subpkg
111} 114}
112 115
113sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz" 116sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz
1173dfcdfb1b3e4d2ab848e5d8af682e26a30806ce2d2f5819dbb1fbb2d005775b201b57efaecc9a54f7950b182cc0aaeb0ea79a4f6e6149473fe669bc9b3acebe0 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 0000000000..90a2e290b3
--- /dev/null
+++ b/community/binutils-cross-embedded/avr-ldscript-path.patch
@@ -0,0 +1,25 @@
1For some reason avr-ld keeps looking for the ldscripts in /usr/lib, rather than
2in /usr/avr/lib - while using /usr/$target/lib works fine for all other
3targets. This patch fixes it.
4--- a/ld/Makefile.am
5+++ b/ld/Makefile.am
6@@ -50,7 +50,7 @@
7 # We put the scripts in the directory $(scriptdir)/ldscripts.
8 # We can't put the scripts in $(datadir) because the SEARCH_DIR
9 # directives need to be different for native and cross linkers.
10-scriptdir = $(tooldir)/lib
11+scriptdir = $(libdir)
12
13 EMUL = @EMUL@
14 EMULATION_OFILES = @EMULATION_OFILES@
15--- a/ld/Makefile.in
16+++ b/ld/Makefile.in
17@@ -555,7 +555,7 @@
18 # We put the scripts in the directory $(scriptdir)/ldscripts.
19 # We can't put the scripts in $(datadir) because the SEARCH_DIR
20 # directives need to be different for native and cross linkers.
21-scriptdir = $(tooldir)/lib
22+scriptdir = $(libdir)
23 BASEDIR = $(srcdir)/..
24 BFDDIR = $(BASEDIR)/bfd
25 INCDIR = $(BASEDIR)/include