new: lfs/binutils-2.43.1

This commit is contained in:
Yingjie Wang 2024-11-13 18:30:26 -05:00
parent e6605995cc
commit 3482ad2eaf

View File

@ -0,0 +1,44 @@
pkgname=binutils
pkgver=2.43.1
pkgdesc='A set of programs to assemble and manipulate binary and object files'
homepage='https://www.gnu.org/software/binutils/'
license=(GPL-2.0-or-later GPL-3.0-or-later LGPL-2.0-or-later LGPL-3.0-or-later GFDL-1.3 FSFAP)
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://sourceware.org/pub/binutils/releases/${sources[0]}")
md5sums=("9202d02925c30969d1917e4bad5a2320")
src_prepare() {
tar -xf ${DIST_DIR}/${pkgname}-${pkgver}/${sources[0]} --strip-components=1
mkdir -v build
cd build
}
src_build() {
../configure --prefix=/usr \
--sysconfdir="${pkgdir}"/etc \
--with-lib-path=/usr/lib:/usr/local/lib \
--enable-gold \
--enable-ld=default \
--enable-plugins \
--enable-shared \
--disable-werror \
--enable-64-bit-bfd \
--enable-new-dtags \
--with-system-zlib \
--enable-default-hash-style=gnu
make tooldir=/usr
}
src_check() {
make -k CFLAGS_FOR_TARGET="-O2 -g" \
CXXFLAGS="-O2 -no-pie -fno-PIC" \
CFLAGS="-O2 -no-pie" \
LDFLAGS="" \
check
}
src_install() {
make prefix="${pkgdir}"/usr tooldir="${pkgdir}"/usr install
rm -fv "${pkgdir}"/usr/lib/lib{bfd,ctf,ctf-nobfd,gprofng,opcodes,sframe}.a
}