summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Renner Berthing2017-09-10 13:57:10 +0200
committerEmil Renner Berthing2017-09-10 13:57:10 +0200
commitb63ffc9c4fdaf73e82e55c7c8b174d8380efe69b (patch)
tree3d3f0644a4bdba51aba9855d0a2f96890b41c38d
downloadaur-b63ffc9c4fdaf73e82e55c7c8b174d8380efe69b.tar.gz
initial commit
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD59
2 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..be7b03b82ab
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = riscv64-unknown-elf-binutils
+ pkgdesc = Assemble and manipulate binary and object files for 32bit and 64bit RISC-V
+ pkgver = 2.29
+ pkgrel = 1
+ url = http://www.gnu.org/software/binutils/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = zlib
+ source = https://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.xz
+ sha1sums = 47817089b3867baf307365004c51677174a27000
+
+pkgname = riscv64-unknown-elf-binutils
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f222217424c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Emil Renner Berthing <aur@esmil.dk>
+
+_target=riscv64-unknown-elf
+pkgname=$_target-binutils
+pkgver=2.29
+pkgrel=1
+pkgdesc='Assemble and manipulate binary and object files for 32bit and 64bit RISC-V'
+arch=('i686' 'x86_64')
+url='http://www.gnu.org/software/binutils/'
+license=('GPL')
+depends=('zlib')
+source=("https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz")
+sha1sums=('47817089b3867baf307365004c51677174a27000')
+
+prepare() {
+ cd binutils-$pkgver
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+}
+
+build() {
+ cd binutils-$pkgver
+
+ unset CPPFLAGS
+
+ ./configure \
+ --target=$_target \
+ --prefix=/usr \
+ --with-sysroot=/usr/$_target \
+ --with-gnu-as \
+ --with-gnu-ld \
+ --with-system-zlib \
+ --disable-nls \
+ --enable-multilib \
+ --enable-ld=default \
+ --enable-gold \
+ --enable-plugins \
+ --enable-deterministic-archives
+
+ make
+}
+
+check() {
+ cd binutils-$pkgver
+
+ # unset LDFLAGS as testsuite makes assumptions about which ones are active
+ # do not abort on errors - manually check log files
+ make LDFLAGS="" -k check
+}
+
+package() {
+ cd binutils-$pkgver
+
+ make DESTDIR="$pkgdir" install
+
+ # Remove info documents that conflict with host version
+ rm -r "$pkgdir"/usr/share/info
+}
+
+# vim: set ts=2 sw=2 et: