core/binutils to 2.40-4

This commit is contained in:
Kevin Mihelich 2023-02-06 12:39:54 +00:00
parent 413ec21ea9
commit 3407fec324

View file

@ -12,8 +12,8 @@ noautobuild=1
pkgname=binutils
pkgver=2.40
_commit=bcea253f5fa194e57f9564e8461c718e228bd26e
pkgrel=2
_commit=65dbb94214516c915df5e0fe554ea165557e7ec7
pkgrel=4
pkgdesc='A set of programs to assemble and manipulate binary and object files'
arch=(x86_64)
url='https://www.gnu.org/software/binutils/'
@ -32,7 +32,7 @@ sha256sums=('SKIP'
validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
prepare() {
[[ ! -d binutils-gdb ]] && ln -s binutils-$pkgver binutils-gdb
[[ ! -d binutils-gdb ]] && ln -s binutils-${pkgver} binutils-gdb
mkdir -p binutils-build
cd binutils-gdb
@ -54,7 +54,7 @@ build() {
[[ $CARCH == "armv7h" ]] && CONFIGFLAG="--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf"
[[ $CARCH == "aarch64" ]] && CONFIGFLAG="--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu"
"$srcdir/binutils-gdb/configure" \
"${srcdir}"/binutils-gdb/configure \
--prefix=/usr \
--sysconfdir="${pkgdir}"/etc \
--with-lib-path=/usr/lib:/usr/local/lib \
@ -106,18 +106,27 @@ check() {
package() {
cd binutils-build
make prefix="$pkgdir/usr" tooldir="$pkgdir/usr" install
make prefix="${pkgdir}"/usr tooldir="${pkgdir}"/usr install
# install PIC version of libiberty
install -m644 libiberty/pic/libiberty.a "$pkgdir/usr/lib"
install -m644 libiberty/pic/libiberty.a "${pkgdir}"/usr/lib
# Remove unwanted files
rm -f "$pkgdir"/usr/share/man/man1/{dlltool,windres,windmc}*
rm -f "${pkgdir}"/usr/share/man/man1/{dlltool,windres,windmc}*
# No shared linking to these files outside binutils
rm -f "$pkgdir"/usr/lib/lib{bfd,opcodes}.so
echo 'INPUT( /usr/lib/libbfd.a -lsframe -liberty -lz -lzstd -ldl )' > "$pkgdir/usr/lib/libbfd.so"
echo 'INPUT( /usr/lib/libopcodes.a -lbfd )' > "$pkgdir/usr/lib/libopcodes.so"
rm -f "${pkgdir}"/usr/lib/lib{bfd,opcodes}.so
tee "${pkgdir}"/usr/lib/libbfd.so << EOS
/* GNU ld script */
INPUT( /usr/lib/libbfd.a -lsframe -liberty -lz -lzstd -ldl )
EOS
tee "${pkgdir}"/usr/lib/libopcodes.so << EOS
/* GNU ld script */
INPUT( /usr/lib/libopcodes.a -lbfd )
EOS
# install FSF All Permissive License
install -Dm644 -t "${pkgdir}"/usr/share/licenses/${pkgname}/ FSFAP