summaryrefslogtreecommitdiff
path: root/repo/system/binutils.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-01-16 01:23:51 +0000
committerdavidovski <david@davidovski.xyz>2022-01-16 01:23:51 +0000
commitcb447620084a20be80d116c81c2e9ec110be7118 (patch)
tree9fc0d714abbb5c6326b60616a5fd27ec9f984895 /repo/system/binutils.xibuild
parent153011e9129c6055ef21c48caf65a23e74a91418 (diff)
restructured repo system
Diffstat (limited to 'repo/system/binutils.xibuild')
-rw-r--r--repo/system/binutils.xibuild38
1 files changed, 38 insertions, 0 deletions
diff --git a/repo/system/binutils.xibuild b/repo/system/binutils.xibuild
new file mode 100644
index 0000000..874257c
--- /dev/null
+++ b/repo/system/binutils.xibuild
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+DEPS=(glib zlib elfutils)
+
+SOURCE=https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz
+DESC="tools for handling object files"
+
+build () {
+ curl https://www.linuxfromscratch.org/patches/lfs/development/binutils-2.37-upstream_fix-1.patch > binutils-2.37-upstream_fix-1.patch
+ patch -Np1 -i binutils-2.37-upstream_fix-1.patch
+
+ # An error in the building system causes the shipped man pages to be empty. Workaround the issue and remove the shipped man pages, so the man pages will be regenerated correctly:
+
+ sed -i '63d' etc/texi2pod.pl
+ find -name \*.1 -delete
+
+ mkdir -v build
+ cd build
+ ../configure --prefix=/usr \
+ --enable-gold \
+ --enable-ld=default \
+ --enable-install-libiberty \
+ --enable-plugins \
+ --enable-shared \
+ --disable-werror \
+ --enable-64-bit-bfd \
+ --with-system-zlib
+
+ make tooldir=/usr
+ make -k check || true
+}
+
+package() {
+ make -j1 DESTDIR=$PKG_DEST -j1 install
+ cp ../include/libiberty.h $PKG_DEST/usr/include
+ rm -fv $PKG_DEST/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a
+
+}