summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Henrik Bruhn2021-05-21 19:34:29 +0200
committerJan-Henrik Bruhn2021-05-21 19:34:45 +0200
commit2a1f372a4d767278744170386cf5ac2adbb9cb31 (patch)
tree8957aa33d1a72806f166ad08130d2a07da492f7d
downloadaur-2a1f372a4d767278744170386cf5ac2adbb9cb31.tar.gz
Initial Commit
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD89
3 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7aad6b5db7de
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = avr-binutils-219
+ pkgdesc = A set of programs to assemble and manipulate binary and object files for the avr architecture
+ pkgver = 2.19.1a
+ pkgrel = 1
+ url = http://www.gnu.org/software/binutils/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = glibc>=2.12-5
+ depends = zlib
+ provides = binutils-avr=2.19.1a
+ provides = avr-binutils=2.19.1a
+ conflicts = avr-binutils
+ conflicts = binutils-avr
+ options = !libtool
+ options = !distcc
+ options = !ccache
+ source = http://ftp.gnu.org/gnu/binutils/binutils-2.19.1a.tar.bz2
+ md5sums = 023222f392e9546bcbb0b4c0960729be
+
+pkgname = avr-binutils-219
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..5cf4da41ae73
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+src
+pkg
+*.tar.xz
+*.tar.gz
+*.tar.zst
+*.tar.bz2
+*.log
+.psci_modules
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..114315f2755a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,89 @@
+# $Id$
+# Maintainer: Jan-Henrik Bruhn <aur@jhbruhn.de>
+# Contributor: Brad Fanella <bradfanella@archlinux.us>
+# Contributor: Corrado Primier <bardo@aur.archlinux.org>
+# Contributor: danst0 <danst0@west.de>
+
+_pkgname=avr-binutils
+pkgname=$_pkgname-219
+pkgver=2.19.1a
+pkgrel=1
+pkgdesc="A set of programs to assemble and manipulate binary and object files for the avr architecture"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/binutils/"
+license=('GPL')
+depends=('glibc>=2.12-5' 'zlib')
+provides=("binutils-avr=$pkgver" "$_pkgname=$pkgver")
+conflicts=("$_pkgname" 'binutils-avr')
+options=('!libtool' '!distcc' '!ccache')
+source=(http://ftp.gnu.org/gnu/${_pkgname/avr-}/${_pkgname/avr-}-${pkgver}.tar.bz2)
+md5sums=('023222f392e9546bcbb0b4c0960729be')
+
+prepare() {
+ cd "${srcdir}"/${_pkgname/avr-}-${pkgver/a}
+
+ sed -i 's/int do_wide;/static int do_wide;/g' binutils/readelf.c
+ sed -i 's/int do_wide;/static int do_wide;/g' binutils/dwarf.c
+ sed -i 's/bfd_boolean dwarf2_loc_directive_seen;/extern bfd_boolean dwarf2_loc_directive_seen;/g' gas/dwarf2dbg.h
+ sed -i 's/bfd_boolean dwarf2_loc_mark_labels;/extern bfd_boolean dwarf2_loc_mark_labels;/g' gas/dwarf2dbg.h
+ sed -i 's/\/\* Reads just the header part/histogram *histograms; unsigned num_histograms; \/*/g' gprof/hist.c
+ sed -i 's/histogram \*histograms;/extern histogram *histograms;/g' gprof/hist.h
+ sed -i 's/unsigned num_histograms;/extern unsigned num_histograms;/g' gprof/hist.h
+
+ mkdir build
+ cd build
+
+ CFLAGS="$CLFAGS -Wno-error=implicit-fallthrough -Wno-error=unused-value -Wno-error -fcommon"
+ CXXFLAGS="$CXXLFAGS -Wno-error=implicit-fallthrough -Wno-error=unused-value -Wno-error -fcommon"
+ LDFLAGS="$LDFLAGS -fcommon"
+ CC="gcc -L$(pwd)/bfd/.libs/ -Wno-error"
+ if [ "${CARCH}" = "x86_64" ]; then
+ ../configure --build=$(../config.guess) \
+ --disable-multilib \
+ --disable-nls \
+ --enable-64-bit-bfd \
+ --enable-install-libbfd \
+ --includedir=/usr/$(../config.guess)/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --disable-werror \
+ --target=avr
+ else
+ ../configure --build=$(../config.guess) \
+ --disable-nls \
+ --enable-install-libbfd \
+ --includedir=/usr/$(../config.guess)/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --disable-werror \
+ --target=avr
+ fi
+
+ # This checks the host environment and makes sure all the necessary tools are available to compile Binutils.
+ make configure-host
+
+ make tooldir=/usr
+}
+
+package() {
+ cd "${srcdir}"/${_pkgname/avr-}-${pkgver/a}
+
+ cd build
+ make DESTDIR="${pkgdir}" tooldir=/usr install
+
+ rm -f ${pkgdir}/usr/lib/libiberty.a
+
+ for bin in addr2line ar as c++filt gprof ld nm objcopy objdump ranlib readelf size strings strip ; do
+ rm -f ${pkgdir}/usr/bin/${bin} || return 1
+ done
+
+ for info in as bfd binutils configure gprof ld standards; do
+ mv ${pkgdir}/usr/share/info/${info}.info ${pkgdir}/usr/share/info/avr-${info}.info
+ done
+}
+
+