summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD60
2 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..27d960162da5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = mips-harvard-os161-binutils
+ pkgdesc = A set of programs to assemble and manipulate binary and object files for mips-harvard-os161 arquitecture. This is part of toolset for the course os161 from Harvard.
+ pkgver = 2.24+os161_2.1
+ pkgrel = 1
+ url = http://os161.eecs.harvard.edu/
+ arch = i686
+ arch = x86_64
+ groups = mips-harvard-os161-toolchain
+ license = GPL
+ depends = glibc>=2.24
+ depends = zlib
+ options = staticlibs
+ options = !distcc
+ options = !ccache
+ source = http://os161.eecs.harvard.edu/download/binutils-2.24+os161-2.1.tar.gz
+ md5sums = 89fb5251c8fac189551f30550e6c4d0b
+
+pkgname = mips-harvard-os161-binutils
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ec72e0c51078
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Geronimo Bareiro <gero dot bare at gmail dot com>
+
+_target="mips-harvard-os161"
+pkgname=${_target}-binutils
+_pkgver=2.24+os161-2.1
+pkgver=${_pkgver/os161-/os161_}
+pkgrel=1
+pkgdesc="A set of programs to assemble and manipulate binary and object files for ${_target} arquitecture. This is part of toolset for the course os161 from Harvard."
+arch=('i686' 'x86_64')
+url="http://os161.eecs.harvard.edu/"
+license=('GPL')
+groups=('mips-harvard-os161-toolchain')
+depends=('glibc>=2.24' 'zlib')
+options=('staticlibs' '!distcc' '!ccache')
+source=(http://os161.eecs.harvard.edu/download/binutils-${_pkgver}.tar.gz)
+md5sums=('89fb5251c8fac189551f30550e6c4d0b')
+
+prepare() {
+ cd binutils-${_pkgver}
+
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+
+ mkdir ${srcdir}/binutils-build
+}
+
+build() {
+ cd binutils-build
+
+ ../binutils-${_pkgver}/configure --prefix=/usr \
+ --program-prefix=${_target}- \
+ --with-lib-path=/usr/lib/binutils/${_target} \
+ --with-local-prefix=/usr/lib/${_target} \
+ --with-sysroot=/usr/${_target} \
+ --target=${_target} --host=${CHOST} --build=${CHOST} \
+ --disable-nls --nfp \
+ --disable-shared --disable-threads \
+ --disable-werror
+
+ make configure-host
+
+ make tooldir=/usr
+}
+
+check() {
+ cd binutils-build
+
+ # unset LDFLAGS as testsuite makes assumptions about which ones are active
+ # ignore failures in gold testsuite...
+ make -k LDFLAGS="" check || true
+}
+
+package() {
+ cd binutils-build
+ make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
+
+ # Remove unwanted files
+ rm -rf ${pkgdir}/usr/share
+ rm -f ${pkgdir}/usr/bin/{ar,as,ld,nm,objdump,ranlib,readelf,strip,objcopy}
+}
+