diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2018-02-08 02:32:28 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2018-02-08 02:32:28 +0100 |
commit | 5741f4d6d17c1da2bfa83f184ef7afdbbe73ce7d (patch) | |
tree | dd5e358da568ff870703f4eb7ce289bb99cd785f /pcr/riscv64-linux-gnu-binutils/PKGBUILD | |
parent | 445da8012c3bb40263d06e4a7311a2f8613727ff (diff) | |
download | abslibre-5741f4d6d17c1da2bfa83f184ef7afdbbe73ce7d.tar.gz abslibre-5741f4d6d17c1da2bfa83f184ef7afdbbe73ce7d.tar.bz2 abslibre-5741f4d6d17c1da2bfa83f184ef7afdbbe73ce7d.zip |
added pkgbuilds for riscv64-linux-gnu toolchain
Diffstat (limited to 'pcr/riscv64-linux-gnu-binutils/PKGBUILD')
-rw-r--r-- | pcr/riscv64-linux-gnu-binutils/PKGBUILD | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/pcr/riscv64-linux-gnu-binutils/PKGBUILD b/pcr/riscv64-linux-gnu-binutils/PKGBUILD new file mode 100644 index 000000000..abc12c0f8 --- /dev/null +++ b/pcr/riscv64-linux-gnu-binutils/PKGBUILD @@ -0,0 +1,69 @@ +# $Id$ +# Maintainer (Arch): Anatol Pomozov <anatol.pomozov@gmail.com> +# Contributor: Andreas Grapentin <andreas@grapentin.org> + +# parabola changes and rationale: +# - adapted from aarch64-linux-gnu-binutils + +_target=riscv64-linux-gnu +pkgname=$_target-binutils +_snapshot=20171231 +pkgver=2.29.v$_snapshot +pkgrel=1 +pkgdesc='A set of programs to assemble and manipulate binary and object files for the riscv64 target' +arch=(x86_64) +url='https://github.com/riscv/riscv-gnu-toolchain' +license=(GPL) +depends=(zlib) +makedepends=(git) +source=("$_target::git+https://github.com/riscv/riscv-gnu-toolchain#tag=v$_snapshot") +sha256sums=('SKIP') + +prepare() { + cd "$srcdir/$_target" + + # fix submodule repo paths + sed -i 's#\.\.#git://github.com/riscv#' .gitmodules + # update submodule + git submodule update --init riscv-binutils-gdb + + cd "$srcdir/$_target/riscv-binutils-gdb" + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure +} + +build() { + cd "$srcdir/$_target/riscv-binutils-gdb" + + ./configure --target=$_target \ + --with-sysroot=/usr/$_target \ + --prefix=/usr \ + --disable-multilib \ + --with-gnu-as \ + --with-gnu-ld \ + --disable-nls \ + --enable-ld=default \ + --enable-gold \ + --enable-plugins \ + --enable-deterministic-archives \ + --disable-gdb + + make +} + +check() { + cd "$srcdir/$_target/riscv-binutils-gdb" + + # unset LDFLAGS as testsuite makes assumptions about which ones are active + # do not abort on errors - manually check log files + make -k LDFLAGS="" check || true +} + +package() { + cd "$srcdir/$_target/riscv-binutils-gdb" + + make DESTDIR="$pkgdir" install + + # Remove file conflicting with host binutils and manpages for MS Windows tools + rm -r "$pkgdir"/usr/share/info + rm "$pkgdir"/usr/share/man/man1/$_target-{dlltool,nlmconv,windres,windmc}* +} |