Add binutils 2.38

This commit is contained in:
Dor Askayo 2022-09-04 11:12:21 +03:00
parent 5aae443d65
commit 4113d60b24
8 changed files with 151 additions and 6 deletions

View File

@ -785,6 +785,13 @@ GCC 4.7.4 is the last version written in C. This time we build both C and C++ ba
C++ backend has some dependency on ``gperf`` which is written in C++. Fortunately, it is
easy to patch it out and resulting ``g++`` compiler is capable of building ``gperf``.
binutils 2.38
=============
This version of binutils provides a more comprehensive set of programming tools for
creating and managing binary programs. It also includes modern versions of the ``ld``
linker, the ``as`` assembler and the ``ar`` program.
gperf 3.1
=========

View File

@ -26,6 +26,7 @@ b2eab85c4a22060cc18945f6cb24cdf928fee370fff3fe12482e866a1cace586 automake-1.6.3
42fe9a42c457193e7bebf31b71eb28bc71e179ed9f2c78be242a5f6b03bbbbfe automake-1.9.6_0.tar.bz2
e180c61e3922b0546a6a3ee498abeba6dfdd404215ca850628a5277e5ede26e7 bash-5.1_0.tar.bz2
a6190872c4daf1b55a1ad1f2fd2e34bd251f3808f750bb4a7920b66d672497a8 binutils-2.14_0.tar.bz2
7c7c66ed51b89748eb4762eef4f946e8382973118b7bc0339afa527611ba1d80 binutils-2.38_0.x86.xbps
f566a5cb99adc8f572659ebf4a778ff23acf62d90b13a9983f56488a493b15b2 bison-2.3_0.tar.bz2
87dae598915deabe95a4ee75ec6cfed3a6e6da1a655c3ad90ee60ec07a7d87fa bison-3.4.1_0.tar.bz2
ae452f08ad9f7ab01f2a9bd882170e71ee6200a06f044f4aadb446cc68700016 bison-3.4.1_1.tar.bz2
@ -47,25 +48,25 @@ f55c11b091361536774b436abe86b17f759cd7a66522cd20c7a2190da92db67a findutils-4.2.
33afd1c66c864b486df290e682883556787c61751b8c851deb2737f0b777ffd6 flex-2.5.33_0.tar.bz2
000147c1a33feff5c5b4cb10c2cf6c2b2f4ef92a90c9e659b25f1766a83d4afc flex-2.6.4_0.tar.bz2
92fe0ffd0971a40fd98c70b075d5bb12f2d8093ef8fb3333aac2b532bd53a591 gawk-3.0.4_0.tar.bz2
3ab628221001e94dedfe1415079651d1bbfa6815602a8661728f8b8049fc6e57 gc-8.0.4_0.x86.xbps
d25f1957e10458fe16065899cab818d97665459f7b5d13b7f2ef4225079b7800 gc-8.0.4_0.x86.xbps
07715a0c8bc13b80fc10ede20573f92e933b8d3dc6a5c8700f4289965ea8ec74 gcc-4.0.4_0.tar.bz2
e7c678c71c51cd6e8ce6eae029503a661169e6994ba0f988ac15634254d1fadb gcc-4.0.4_1.tar.bz2
53b03122b399b1c5c2427aa735e42d661157d9369c3023a3fe45e87001e2a973 gcc-4.7.4_0.x86.xbps
b5f6fe07a696751d2fc1d9cc3d96f09d89d6a637e1d8d0b250105b650e831600 gettext-0.21_0.x86.xbps
fe16fb6021f1f4650c98f77261145f37732be0aee06e957b0bdb3b01beb593a8 gmp-6.2.1_0.tar.bz2
11940cfe5ea1c11f427932faecf054e1463f8b674a3dd99ef1569b245a370035 gperf-3.1_0.x86.xbps
0038451c2dd38d7864be245f71af20ca1067cd2911d5612aedd4928d9e1d0f7d gperf-3.1_0.x86.xbps
390840f2bc9c2a3196c28e06f8650f408e33b5d4ffe5539e174682ed13960bc9 grep-2.4_0.tar.bz2
3d6a86dcfcc9cf9ad11f07cc2a2adaa8bfec0d593df1ee5f33d59f7c63b8ea32 guile-3.0.7_0.x86.xbps
1ba9c0639d6d1d326c17b6311c88762879ef4c5374b7c1ecd0761b5a3124c86f guile-3.0.7_0.x86.xbps
ec6b32cba3f49f860a3d9b97cea57931869c5849d8ca5ad0ea01dad45b9edb91 help2man-1.36.4_0.tar.bz2
2ef01fe7252be680382bee5df890ad3f6dae26744104ccdaa2d1236bc19ab44a kbd-1.15_0.tar.bz2
68c272b50a99e4d53cab57552337e7660020a47c06a0341efcdfa4f2441db187 kexec-tools-2.0.22_0.tar.bz2
4c0cc86a9855122a4b5c12bff6f6bbf524495910ec718ef339fbfe7076824950 libarchive-3.5.2_0.tar.bz2
95506b7151440ec7ed7af9769784f312cb4c37deaf7a6c66e2b6d36c403e4b3c libatomic_ops-7.6.10_0.x86.xbps
d242816dac83ea56c4be79d289b0b4e56b8257a9f9986ddbcfabc8dfaea3687a libffi-3.3_0.x86.xbps
e0600d72b7fb12653d39cf0b690d45fc7f30131d78342a371d4af327d8999812 libatomic_ops-7.6.10_0.x86.xbps
d8986237271dfa591334c9a671d1946749bbcee84ff7c2cc1c15ae21f111ffa0 libffi-3.3_0.x86.xbps
5001f8fdbba0db0ecf60263bfea97ed4b9174d06a447e98bee220548f973756a libtool-1.4_0.tar.bz2
94d0f9d2f8fbc2b00fe4c0f479e5590fa70b7d856f0a643ad006787d963f99ee libtool-2.2.4_0.tar.bz2
374214711d42681d030d6faceba3198243ec22301d94212f7162bd4873b7ba27 libtool-2.4.7_0.tar.bz2
482708d01357ee4de3f17c54047fe8ab6c502fc436069da63e3ef56c24d944b2 libunistring-0.9.10_0.x86.xbps
58c18a039b614e6d56611d198d3c3e93b71eed5741af95a3ceef17d607fcb33a libunistring-0.9.10_0.x86.xbps
1d07aaf7049be45853fd409340cdb52bb3a1b6dfa4dbc8b69358c1ee966cd67f linux-4.9.10_0.tar.bz2
61507b58074a3742191b606f9415f79406e5daa693ab4ba4a4543897696628ea linux-headers-5.10.41_0.tar.bz2
5cda10550198e613c426e45c5fffe0f7e8761296e7339e9e9a1f9da995b4865a m4-1.4.7_0.tar.bz2

View File

@ -186,6 +186,9 @@ class SysC(SysGeneral):
# gcc 4.7.4
self.get_file("https://mirrors.kernel.org/gnu/gcc/gcc-4.7.4/gcc-4.7.4.tar.bz2")
# binutils 2.38
self.get_file("https://mirrors.kernel.org/gnu/binutils/binutils-2.38.tar.xz")
# gperf 3.1
self.get_file("https://mirrors.kernel.org/gnu/gperf/gperf-3.1.tar.gz")

View File

@ -5,6 +5,7 @@ e8a6eb9d28ddcba8ffef3fa211653239e9bf239aba6a01a6b7cfc7ceaec69cbd autoconf-archi
af6ba39142220687c500f79b4aa2f181d9b24e4f8d8ec497cea4ba26c64bedaf automake-1.15.1.tar.xz
ff2bf7656c4d1c6fdda3b8bebb21f09153a736bcba169aaf65eab25fa113bf3a automake-1.16.3.tar.xz
cc012bc860406dcf42f64431bcd3d2fa7560c02915a601aba9cd597a39329baa bash-5.1.tar.gz
e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 binutils-2.38.tar.xz
b10d7e9e354be72aee4e4911cf19dd27b5c527d4e7200857365b5fcdeea0dffb bison-2.3.tar.bz2
27d05534699735dc69e86add5b808d6cb35900ad3fd63fa82e3eb644336abfa0 bison-3.4.2.tar.xz
6f7cfc0ac6717afb6ba1f41b0da43a713ba0dd97dec1227e32effc12d79f08c1 coreutils-8.32.tar.gz

View File

@ -0,0 +1,96 @@
# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
urls="https://mirrors.kernel.org/gnu/binutils/binutils-2.38.tar.xz"
src_prepare() {
default
# Remove unused generated files
rm etc/Makefile.in etc/configure
rm zlib/aclocal.m4 zlib/configure
# Regenerate files
for dir in bfd binutils gas gold gprof intl ld libctf libiberty opcodes; do
cd $dir
AUTOPOINT=true ACLOCAL=aclocal-1.15 AUTOMAKE=automake-1.15 autoreconf-2.69 -fi
cd ..
done
ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
# Rebuild bison files
touch -- */*.y
rm binutils/arparse.c binutils/arparse.h
rm binutils/defparse.c binutils/defparse.h
rm binutils/mcparse.c binutils/mcparse.h
rm binutils/rcparse.c binutils/rcparse.h
rm binutils/sysinfo.c binutils/sysinfo.h
rm gas/config/bfin-parse.c gas/config/bfin-parse.h
rm gas/config/loongarch-parse.c gas/config/loongarch-parse.h
rm gas/config/m68k-parse.c gas/config/rl78-parse.c
rm gas/config/rl78-parse.h gas/config/rx-parse.c
rm gas/config/rx-parse.h gas/itbl-parse.c
rm gas/itbl-parse.h gold/yyscript.c
rm gold/yyscript.h intl/plural.c
rm ld/deffilep.c ld/deffilep.h
rm ld/ldgram.c ld/ldgram.h
# Rebuild flex generated files
touch -- */*.l */*/*.l
rm binutils/arlex.c binutils/deflex.c binutils/syslex.c
rm gas/config/bfin-lex.c gas/config/loongarch-lex.c gas/itbl-lex.c
rm ld/ldlex.c
# Remove prebuilt texinfo files
find . -type f -name '*.info*' \
-not -wholename './binutils/sysroff.info' \
-delete
# Remove pregenerated opcodes files
rm opcodes/i386-init.h opcodes/i386-tbl.h
rm opcodes/ia64-asmtab.c
rm opcodes/z8k-opc.h
rm opcodes/aarch64-asm-2.c opcodes/aarch64-opc-2.c opcodes/aarch64-dis-2.c
# Regenerate MeP sections
./bfd/mep-relocs.pl
}
src_configure() {
for dir in intl libctf libiberty opcodes bfd binutils gas gprof ld; do
cd $dir
./configure \
--disable-nls \
--enable-install-libiberty \
--enable-deterministic-archives \
--with-system-zlib \
--build=i386-unknown-linux-gnu \
--host=i386-unknown-linux-gnu \
--target=i386-unknown-linux-gnu \
--program-prefix="" \
--with-sysroot="${PREFIX}" \
--prefix="${PREFIX}" \
--libdir="${PREFIX}/lib/musl" \
--srcdir=.
cd ..
done
}
src_compile() {
make -C bfd headers
for dir in libiberty bfd opcodes libctf binutils gas gprof ld; do
make -C $dir tooldir=${PREFIX} CFLAGS="-std=c99"
done
}
src_install() {
for dir in libiberty bfd opcodes libctf binutils gas gprof ld; do
make -C $dir tooldir=${PREFIX} DESTDIR="${DESTDIR}" install
done
}

View File

@ -0,0 +1,18 @@
SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
Add missing AC_CONFIG_MACRO_DIR.
Required by autoreconf to create aclocal.m4 correctly.
--- /libiberty/configure.ac 2022-01-22 14:14:09.000000000 +0200
+++ libiberty/configure.ac 2022-09-04 00:01:02.941738129 +0300
@@ -2,6 +2,7 @@
AC_INIT
AC_CONFIG_SRCDIR([xmalloc.c])
+AC_CONFIG_MACRO_DIR(../config)
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of

View File

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later
Ensure i386-init.h dependencies are satisfied.
--- opcodes/Makefile.am 2022-01-22 14:14:09.000000000 +0200
+++ opcodes/Makefile.am 2022-09-13 21:09:04.353324699 +0300
@@ -575,7 +575,7 @@ i386-gen.o: i386-gen.c i386-opc.h $(srcd
$(srcdir)/i386-tbl.h: $(srcdir)/i386-init.h
@echo $@
-$(srcdir)/i386-init.h: @MAINT@ i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl i386-opc.h
+$(srcdir)/i386-init.h: i386-gen$(EXEEXT_FOR_BUILD) i386-opc.tbl i386-reg.tbl i386-opc.h
$(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - \
< $(srcdir)/i386-opc.tbl \
| ./i386-gen$(EXEEXT_FOR_BUILD) --srcdir $(srcdir)

View File

@ -82,6 +82,8 @@ build texinfo-6.7
build gcc-4.7.4
build binutils-2.38
build gperf-3.1
build libunistring-0.9.10