Unverified Commit 2c3484cb authored by Marian Buschsieweke's avatar Marian Buschsieweke
Browse files

community/binutils-cross-embedded: Fix AVR

- This drops a fix needed to work with community/gcc-avr
- It creates empty include folders in /usr/$target/include for each cross
  compilation target
    - This fixes compilation of testing/gcc-cross-embedded with AVR enabled
      (for some reason the compilation checks for existence of the include
       folder, even though no files are ever included.)
parent 40f45860
Pipeline #71477 passed with stages
in 15 minutes and 23 seconds
......@@ -23,9 +23,7 @@ for target in $_targets; do
targetnorm="${target//-/_}"
subpackages="$_pkgbase-$target:$targetnorm $subpackages"
done
source="https://ftp.gnu.org/gnu/$_pkgbase/$_pkgbase-$pkgver.tar.xz
avr-ldscript-path.patch
"
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz"
builddir="$srcdir/$_pkgbase-$pkgver"
......@@ -38,7 +36,6 @@ build() {
--target=$target \
--with-sysroot=/usr/$target \
--prefix=/usr/ \
--libdir=/usr/$target/lib \
--infodir=/deleteme/info \
--htmldir=/deleteme/html \
--pdfdir=/deleteme/pdf \
......@@ -80,6 +77,10 @@ _install_subpkg() {
for bin in ar as nm objcopy objdump ranlib strip readelf; do
rm -f "$subpkgdir"/usr/bin/"$bin"
done
# Hack: Building gcc-avr fails if include folder doesn't exist. (Why an
# empty folder fixes this is beyond me.)
mkdir -p "$subpkgdir"/usr/$target/include
}
arm_none_eabi() {
......@@ -118,5 +119,4 @@ aarch64_none_elf() {
_install_subpkg
}
sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz
3dfcdfb1b3e4d2ab848e5d8af682e26a30806ce2d2f5819dbb1fbb2d005775b201b57efaecc9a54f7950b182cc0aaeb0ea79a4f6e6149473fe669bc9b3acebe0 avr-ldscript-path.patch"
sha512sums="94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb binutils-2.35.1.tar.xz"
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment