commit: 01257b3b0c2ad2566940b338e374f9630a600346
parent c00fa39838634e2775b2568cd4da7ed21d3a7f10
Author: Andrius Štikonas <andrius@stikonas.eu>
Date: Sat, 15 Feb 2025 22:50:02 +0000
Merge pull request #508 from fosslinux/binutils-regen
Binutils regenerations
Diffstat:
7 files changed, 273 insertions(+), 148 deletions(-)
diff --git a/steps/SHA256SUMS.pkgs b/steps/SHA256SUMS.pkgs
@@ -22,9 +22,9 @@ e8ff13753943e43972a8cf1672819f001718ed38e5497cf7b554c21a507ba22b automake-1.7.8
c5807850a377e4bb9aa4121d9781d145bdd80327626a9419630a75ce2c8d9c71 automake-1.9.6_0.tar.bz2
65427597c185f4a034525217cb108e004c8d2e2dfc824223d2b680e9db338d1c bash-5.2.15_0.tar.bz2
7db49c9b024821d82d15afc0db2b1af8d89700101495a9cbadf471813ba5fa55 bc-1.07.1_0.tar.bz2
-5d777f774df7fb0153aa73b501c7fe1a57f152a3aa2c86e83a04e68b5df4f696 binutils-2.30_0.tar.bz2
+3be27e61642ea7d3d4d50a396ab0316ee66b3c469cd38a0a7600e92a9d5022d2 binutils-2.30_0.tar.bz2
43bed356bf52b3d52ef62b63adbeb3bbd1e763e93d0ffd3edb5c75354842f171 binutils-2.41_0.tar.bz2
-7808e5290bf530cd7068e91642def059bc3341b628630d1fb2600590477187db binutils-2.41_1.tar.bz2
+33e192d498f8fb3015a6b5407f06946f1e1dfd575911377c4201bd4611c72a3f binutils-2.41_1.tar.bz2
fa047f6dd4595be1bf8a9cc6ff492357f02fefa3bf1ad965c8c50c8e79a52478 bison-2.3_0.tar.bz2
81554c867db75101422797d227dd76c8a12c87246393126542ff92a0b97db6c1 bison-3.4.1_0.tar.bz2
f7437edc081071cc3ecd3384abf4c63f33183858b8cae6b4ac3105c66f88b3b6 bison-3.4.1_1.tar.bz2
@@ -55,7 +55,7 @@ ab8b5b92de4780b085d8bc7e98ee72ad5ba9c07b26690c579c559b5cc21817eb gc-8.0.4_0.tar
073c34853a2a7d221028d77029105d91a81fc82c2000bc171880270ad69fb4ea gcc-13.3.0_0.tar.bz2
64052d4b2ad1ac405455767b3ac09b77c31d90c38b1d69bfc0922902bd943a2d gcc-4.0.4_0.tar.bz2
da88bb5900f33c1caca9180784e47367e64ec9f258182a147d84168540de1450 gcc-4.0.4_1.tar.bz2
-cbbc193d4bef0b9ac9e4ba0111009297da66bc65de12c9f07b14d3f0d3be9688 gcc-4.7.4_0.tar.bz2
+325206b9d09cba81929a13a9ef23058bca3f37a0a82341de15780952e6ea9538 gcc-4.7.4_0.tar.bz2
6b5236819c5963d33dffa022142df70644dbc1960adcb4456017112cf9b79f5b gettext-0.21_0.tar.bz2
309282ba840f80b5e10897b1221f3ff3329b9e05b982c788d03652f411974524 gmp-6.2.1_0.tar.bz2
e89c5a38c49f2beb959e51732ff29bcf3652945e4f1c2bf70d39310c22b0c58f gperf-3.1_0.tar.bz2
diff --git a/steps/binutils-2.30/pass1.sh b/steps/binutils-2.30/pass1.sh
@@ -1,73 +1,123 @@
# 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-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+# SPDX-FileCopyrightText: 2023,2025 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
-
src_prepare() {
default
# Remove unused generated files
rm etc/Makefile.in etc/configure
- # Regenerate files
- for dir in bfd binutils gas gprof intl ld libiberty opcodes zlib; do
- (
- cd $dir
- AUTOPOINT=true ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf-2.64 -fi
- )
- done
-
- ACLOCAL=aclocal-1.11 autoreconf-2.64 -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/bfin-parse.c gas/bfin-parse.h
- rm gas/m68k-parse.c gas/rl78-parse.c
- rm gas/rl78-parse.h gas/rx-parse.c
- rm gas/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
+ rm binutils/arparse.c binutils/arparse.h binutils/defparse.c \
+ binutils/defparse.h binutils/mcparse.c binutils/mcparse.h \
+ binutils/nlmheader.c binutils/rcparse.c binutils/rcparse.h \
+ binutils/sysinfo.c binutils/sysinfo.h gas/bfin-parse.c \
+ gas/bfin-parse.h gas/m68k-parse.c gas/rl78-parse.c gas/rl78-parse.h \
+ gas/rx-parse.c gas/rx-parse.h gas/itbl-parse.c gas/itbl-parse.h \
+ gold/yyscript.c gold/yyscript.h intl/plural.c ld/deffilep.c \
+ ld/deffilep.h 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/bfin-lex.c gas/itbl-lex.c
- rm ld/ldlex.c
+ rm binutils/arlex.c binutils/deflex.c binutils/syslex.c gas/bfin-lex.c \
+ gas/itbl-lex.c ld/ldlex.c
- # Remove prebuilt texinfo files
+ # Remove prebuilt documentation
rm bfd/doc/bfd.info binutils/doc/binutils.info
rm gas/doc/as.info gprof/gprof.info ld/ld.info
+ rm */*.1 */*/*.1 */*/*.man
+ rm libiberty/functions.texi
+
+ # Remove gettext translation files
+ rm */po/*.gmo
# 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
+ rm opcodes/i386-init.h opcodes/i386-tbl.h opcodes/ia64-asmtab.c \
+ opcodes/z8k-opc.h opcodes/aarch64-asm-2.c opcodes/aarch64-opc-2.c \
+ opcodes/aarch64-dis-2.c
rm $(grep -l 'MACHINE GENERATED' opcodes/*.c opcodes/*.h)
+ rm include/opcode/riscv-opc.h
+
+ # Generated headers and blobs
+ rm bfd/go32stub.h bfd/libbfd.h bfd/bfd-in2.h bfd/libcoff.h \
+ ld/emultempl/spu_icache.o_c ld/emultempl/spu_ovl.o_c \
+ gprof/fsf_callg_bl.c gprof/bsd_callg_bl.c gprof/flat_bl.c
+
+ # Generated testdata (xz-style attack vector)
+ rm gas/testsuite/gas/sh/arch/*.s \
+ gas/testsuite/gas/sh/arch/arch_expected.txt \
+ ld/testsuite/ld-sh/arch/*.s \
+ ld/testsuite/ld-sh/arch/arch_expected.txt \
+ ld/testsuite/ld-versados/*.ro \
+ gas/testsuite/gas/xstormy16/allinsn.sh \
+ gas/testsuite/gas/tic4x/opcodes.s \
+ binutils/testsuite/binutils-all/x86-64/pr22451.o.bz2
+
+ # Clean out zlib/
+ rm zlib/contrib/masmx86/*.obj \
+ zlib/contrib/infback9/inffix9.h \
+ zlib/contrib/blast/test.pk \
+ zlib/contrib/puff/zeros.raw \
+ zlib/contrib/dotzlib/DotZLib.chm \
+ zlib/crc32.h zlib/inffixed.h
+
+ # Regenerate crc table in libiberty/crc32.c
+ cd libiberty
+ sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
+ tcc -o crcgen crcgen.c
+ sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
+ ./crcgen >> crc32.c.new
+ sed '1,/^};$/d' crc32.c >> crc32.c.new
+ mv crc32.c.new crc32.c
+ cd ..
+
+ # bfd-in2.h is required to run autoreconf, but we don't have it yet
+ cd bfd
+ cp configure.ac configure.ac.bak
+ sed -i "s/bfd-in3.h:bfd-in2.h //" configure.ac
+ AUTOPOINT=true ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf-2.64 -fi
+ CC=tcc LD=true ./configure
+ make headers
+ mv configure.ac.bak configure.ac
+ make distclean
+ cd ..
+
+ # Regenerate files
+ for dir in bfd binutils gas gprof gold intl ld libiberty opcodes zlib; do
+ cd $dir
+ AUTOPOINT=true ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf-2.64 -fi
+ cd ..
+ done
+ rm Makefile.in # autogen
+ ACLOCAL=aclocal-1.11 autoreconf-2.64 -fi
+
+ # Rebuild dependencies in libiberty/Makefile.in
+ cd libiberty
+ CC=tcc ./configure --enable-maintainer-mode
+ make maint-deps
+ make distclean
+ cd ..
# Regenerate MeP sections
./bfd/mep-relocs.pl
-
- # Manpages
- rm */*.1 */*/*.1 */*/*.man
}
src_configure() {
for dir in intl libiberty opcodes bfd binutils gas gprof ld zlib; do
- (
cd $dir
- LD="true" AR="tcc -ar" CC="tcc" ./configure \
+ # BUILDFIXED=1 is specifically for zlib, to avoid needing to
+ # regenerate inffixed.h. Instead, it generates the information from
+ # it at runtime.
+ # Similarly, DYANMIC_CRC_TABLE=1 for crc32.h.
+ LD="true" AR="tcc -ar" CC="tcc" \
+ CFLAGS="-DBUILDFIXED=1 -DDYNAMIC_CRC_TABLE=1" \
+ ./configure \
--disable-nls \
--enable-deterministic-archives \
--enable-64-bit-bfd \
@@ -81,7 +131,7 @@ src_configure() {
--srcdir=. \
--enable-compressed-debug-sections=all \
lt_cv_sys_max_cmd_len=32768
- )
+ cd ..
done
}
@@ -98,10 +148,8 @@ src_install() {
done
# Create triplet symlinks
- (
- cd "${DESTDIR}${PREFIX}/bin"
- for f in *; do
- ln -s "${PREFIX}/bin/${f}" "i386-unknown-linux-musl-${f}"
- done
- )
+ cd "${DESTDIR}${PREFIX}/bin"
+ for f in *; do
+ ln -s "${PREFIX}/bin/${f}" "i386-unknown-linux-musl-${f}"
+ done
}
diff --git a/steps/binutils-2.41/pass1.sh b/steps/binutils-2.41/pass1.sh
@@ -1,7 +1,7 @@
# 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-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+# SPDX-FileCopyrightText: 2023,2025 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -11,66 +11,104 @@ src_prepare() {
# Remove unused generated files
rm etc/Makefile.in etc/configure
- rm zlib/aclocal.m4 zlib/configure
- # Remove gprofng
- rm -r gprofng
-
- # Regenerate autoconf
- for dir in bfd binutils gas gold gprof intl ld libctf libiberty libsframe 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
-
- # Regenerate directories with Makefile.am only
- pushd gold
- automake-1.15 -fai testsuite/Makefile
- popd
+ # Remove unused parts
+ rm -r gprofng zlib
# 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
+ rm binutils/arparse.c binutils/arparse.h binutils/defparse.c \
+ binutils/defparse.h binutils/mcparse.c binutils/mcparse.h \
+ binutils/rcparse.c binutils/rcparse.h binutils/sysinfo.c \
+ binutils/sysinfo.h gas/config/bfin-parse.c gas/config/bfin-parse.h \
+ gas/config/loongarch-parse.c gas/config/loongarch-parse.h \
+ gas/config/m68k-parse.c gas/config/rl78-parse.c \
+ gas/config/rl78-parse.h gas/config/rx-parse.c gas/config/rx-parse.h \
+ gas/itbl-parse.c gas/itbl-parse.h gold/yyscript.c gold/yyscript.h \
+ intl/plural.c ld/deffilep.c ld/deffilep.h 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
+ rm binutils/arlex.c binutils/deflex.c binutils/syslex.c \
+ gas/config/bfin-lex.c gas/config/loongarch-lex.c gas/itbl-lex.c \
+ ld/ldlex.c
- # Remove prebuilt texinfo files
+ # Remove prebuilt docs
find . -type f -name '*.info*' \
-not -wholename './binutils/sysroff.info' \
-delete
+ find . -type f \( -name '*.1' -or -name '*.man' \) -delete
+ rm libiberty/functions.texi
+
+ # Remove gettext translation files
+ find . -type f -name '*.gmo' -delete
# Remove pregenerated opcodes files
- rm opcodes/i386-init.h opcodes/i386-tbl.h opcodes/i386-mnem.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
+ rm opcodes/i386-init.h opcodes/i386-tbl.h opcodes/i386-mnem.h \
+ opcodes/ia64-asmtab.c opcodes/z8k-opc.h opcodes/aarch64-asm-2.c \
+ opcodes/aarch64-opc-2.c opcodes/aarch64-dis-2.c \
+ opcodes/msp430-decode.c opcodes/rl78-decode.c opcodes/rx-decode.c
rm $(grep -l 'MACHINE GENERATED' opcodes/*.c opcodes/*.h)
- rm libiberty/functions.texi
+ # Various other blobs/generated headers
+ rm ld/emultempl/*.o_c
+ rm gprof/bsd_callg_bl.c gprof/flat_bl.c gprof/fsf_callg_bl.c
+ rm bfd/libcoff.h bfd/libbfd.h bfd/go32stub.h bfd/bfd-in2.h
+
+ # Generated testsuite stuff (xz-style attack)
+ rm libsframe/testsuite/libsframe.decode/DATA* \
+ ld/testsuite/ld-x86-64/*.obj.bz2 ld/testsuite/ld-sh/arch/*.s \
+ ld/testsuite/ld-sh/arch/arch_expected.txt \
+ ld/testsuite/ld-i386/pr27193a.o.bz2 \
+ gas/testsuite/gas/xstormy16/allinsn.sh \
+ gas/testsuite/gas/tic4x/opcodes.s gas/testsuite/gas/sh/arch/*.s \
+ gas/testsuite/gas/sh/arch/arch_expected.txt \
+ binutils/testsuite/binutils-all/x86-64/pr22451.o.bz2 \
+ binutils/testsuite/binutils-all/x86-64/pr26808.dwp.bz2 \
+ binutils/testsuite/binutils-all/x86-64/pr27708.exe.bz2 \
+ binutils/testsuite/binutils-all/nfp/*.nffw \
+ binutils/testsuite/binutils-all/pr26112.o.bz2 \
+ binutils/testsuite/binutils-all/pr26160.dwp.bz2
+
+ # Regenerate crc table in libiberty/crc32.c
+ cd libiberty
+ sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
+ gcc -o crcgen crcgen.c
+ sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
+ ./crcgen >> crc32.c.new
+ sed '1,/^};$/d' crc32.c >> crc32.c.new
+ mv crc32.c.new crc32.c
+ cd ..
+
+ # bfd-in2.h is required to run autoreconf, but we don't have it yet
+ cd bfd
+ cp configure.ac configure.ac.bak
+ sed -i "s/bfd-in3.h:bfd-in2.h //" configure.ac
+ AUTOPOINT=true ACLOCAL=aclocal-1.15 AUTOMAKE=automake-1.15 autoreconf-2.69 -fi
+ ./configure
+ make headers
+ mv configure.ac.bak configure.ac
+ make distclean
+ cd ..
+
+ # Regenerate autoconf
+ for dir in bfd binutils gas gold gprof intl ld libctf libiberty libsframe opcodes; do
+ cd $dir
+ AUTOPOINT=true ACLOCAL=aclocal-1.15 AUTOMAKE=automake-1.15 autoreconf-2.69 -fi
+ cd ..
+ done
+ rm Makefile.in # autogen
+ ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
+
+ # Rebuild dependencies in libiberty/Makefile.in
+ cd libiberty
+ ./configure --enable-maintainer-mode
+ make maint-deps
+ make distclean
+ cd ..
# Regenerate MeP sections
./bfd/mep-relocs.pl
-
- # Manpages
- find . -type f \( -name '*.1' -or -name '*.man' \) -delete
}
src_configure() {
diff --git a/steps/binutils-2.41/pass2.sh b/steps/binutils-2.41/pass2.sh
@@ -1,7 +1,7 @@
# 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-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
+# SPDX-FileCopyrightText: 2023,2025 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -10,28 +10,9 @@ src_prepare() {
# Remove unused generated files
rm etc/Makefile.in etc/configure
- rm zlib/aclocal.m4 zlib/configure
- # Regenerate top-level (autogen + autotools)
- autogen Makefile.def
- ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
-
- # Regenerate autoconf
- for dir in bfd binutils gas gold gprof intl ld libctf libiberty libsframe opcodes; do
- cd $dir
- ACLOCAL=aclocal-1.15 AUTOMAKE=automake-1.15 autoreconf-2.69 -fi
- cd ..
- done
-
- # Regenerate directories with Makefile.am only
- pushd gold
- automake-1.15 -fai testsuite/Makefile
- popd
- pushd gprofng
- automake-1.15 -fai doc/Makefile
- automake-1.15 -fai gp-display-html/Makefile
- automake-1.15 -fai src/Makefile
- popd
+ # Remove unused parts
+ rm -r zlib
# intl/ Makefile is a bit broken because of new gettext
sed -i 's/@USE_INCLUDED_LIBINTL@/no/' intl/Makefile.in
@@ -42,46 +23,104 @@ src_prepare() {
# 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
+ rm binutils/arparse.c binutils/arparse.h binutils/defparse.c \
+ binutils/defparse.h binutils/mcparse.c binutils/mcparse.h \
+ binutils/rcparse.c binutils/rcparse.h binutils/sysinfo.c \
+ binutils/sysinfo.h gas/config/bfin-parse.c gas/config/bfin-parse.h \
+ gas/config/loongarch-parse.c gas/config/loongarch-parse.h \
+ gas/config/m68k-parse.c gas/config/rl78-parse.c \
+ gas/config/rl78-parse.h gas/config/rx-parse.c gas/config/rx-parse.h \
+ gas/itbl-parse.c gas/itbl-parse.h gold/yyscript.c gold/yyscript.h \
+ intl/plural.c ld/deffilep.c ld/deffilep.h 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
+ rm binutils/arlex.c binutils/deflex.c binutils/syslex.c \
+ gas/config/bfin-lex.c gas/config/loongarch-lex.c gas/itbl-lex.c \
+ ld/ldlex.c
- # Remove prebuilt texinfo files
+ # Remove prebuilt docs
find . -type f -name '*.info*' \
-not -wholename './binutils/sysroff.info' \
-delete
+ find . -type f \( -name '*.1' -or -name '*.man' \) -delete
+ rm libiberty/functions.texi
+
+ # Remove gettext translation files
+ find . -type f -name '*.gmo' -delete
# Remove pregenerated opcodes files
- rm opcodes/i386-init.h opcodes/i386-tbl.h opcodes/i386-mnem.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
+ rm opcodes/i386-init.h opcodes/i386-tbl.h opcodes/i386-mnem.h \
+ opcodes/ia64-asmtab.c opcodes/z8k-opc.h opcodes/aarch64-asm-2.c \
+ opcodes/aarch64-opc-2.c opcodes/aarch64-dis-2.c \
+ opcodes/msp430-decode.c opcodes/rl78-decode.c opcodes/rx-decode.c
rm $(grep -l 'MACHINE GENERATED' opcodes/*.c opcodes/*.h)
- rm libiberty/functions.texi
+ # Various other blobs/generated headers
+ rm ld/emultempl/*.o_c
+ rm gprof/bsd_callg_bl.c gprof/flat_bl.c gprof/fsf_callg_bl.c
+ rm bfd/libcoff.h bfd/libbfd.h bfd/go32stub.h bfd/bfd-in2.h
+
+ # Generated testsuite stuff (xz-style attack)
+ rm libsframe/testsuite/libsframe.decode/DATA* \
+ ld/testsuite/ld-x86-64/*.obj.bz2 ld/testsuite/ld-sh/arch/*.s \
+ ld/testsuite/ld-sh/arch/arch_expected.txt \
+ ld/testsuite/ld-i386/pr27193a.o.bz2 \
+ gas/testsuite/gas/xstormy16/allinsn.sh \
+ gas/testsuite/gas/tic4x/opcodes.s gas/testsuite/gas/sh/arch/*.s \
+ gas/testsuite/gas/sh/arch/arch_expected.txt \
+ binutils/testsuite/binutils-all/x86-64/pr22451.o.bz2 \
+ binutils/testsuite/binutils-all/x86-64/pr26808.dwp.bz2 \
+ binutils/testsuite/binutils-all/x86-64/pr27708.exe.bz2 \
+ binutils/testsuite/binutils-all/nfp/*.nffw \
+ binutils/testsuite/binutils-all/pr26112.o.bz2 \
+ binutils/testsuite/binutils-all/pr26160.dwp.bz2
+
+ # Regenerate crc table in libiberty/crc32.c
+ cd libiberty
+ sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
+ gcc -o crcgen crcgen.c
+ sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
+ ./crcgen >> crc32.c.new
+ sed '1,/^};$/d' crc32.c >> crc32.c.new
+ mv crc32.c.new crc32.c
+ cd ..
+
+ # bfd-in2.h is required to run autoreconf, but we don't have it yet
+ cd bfd
+ cp configure.ac configure.ac.bak
+ sed -i "s/bfd-in3.h:bfd-in2.h //" configure.ac
+ AUTOPOINT=true ACLOCAL=aclocal-1.15 AUTOMAKE=automake-1.15 autoreconf-2.69 -fi
+ ./configure
+ make headers
+ mv configure.ac.bak configure.ac
+ make distclean
+ cd ..
+
+ # Regenerate top-level (autogen + autotools)
+ autogen Makefile.def
+ ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
+
+ # Regenerate autoconf
+ for dir in bfd binutils gas gold gprof intl ld libctf libiberty libsframe opcodes; do
+ cd $dir
+ ACLOCAL=aclocal-1.15 AUTOMAKE=automake-1.15 autoreconf-2.69 -fi
+ cd ..
+ done
+ cd gprofng
+ # there is no libtool in gprofng, and libtoolize fails
+ LIBTOOLIZE=true ACLOCAL=aclocal-1.15 AUTOMAKE=automake-1.15 autoreconf-2.69 -fi
+ cd ..
+
+ # Rebuild dependencies in libiberty/Makefile.in
+ cd libiberty
+ ./configure --enable-maintainer-mode
+ make maint-deps
+ make distclean
+ cd ..
# Regenerate MeP sections
./bfd/mep-relocs.pl
-
- # Manpages
- find . -type f \( -name '*.1' -or -name '*.man' \) -delete
}
src_configure() {
diff --git a/steps/gcc-10.5.0/pass1.sh b/steps/gcc-10.5.0/pass1.sh
@@ -134,11 +134,11 @@ src_prepare() {
# Regenerate crc table in libiberty/crc32.c
pushd libiberty
- sed -n -e '38,65p' crc32.c > crcgen.c
+ sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
gcc -o crcgen crcgen.c
- head -n 69 crc32.c > crc32.c.new
+ sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
./crcgen >> crc32.c.new
- tail -n +138 crc32.c >> crc32.c.new
+ sed '1,/^};$/d' crc32.c >> crc32.c.new
mv crc32.c.new crc32.c
popd
diff --git a/steps/gcc-13.3.0/pass1.sh b/steps/gcc-13.3.0/pass1.sh
@@ -170,11 +170,11 @@ src_prepare() {
# Regenerate crc table in libiberty/crc32.c
pushd libiberty
- sed -n -e '38,65p' crc32.c > crcgen.c
+ sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
gcc -o crcgen crcgen.c
- head -n 69 crc32.c > crc32.c.new
+ sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
./crcgen >> crc32.c.new
- tail -n +138 crc32.c >> crc32.c.new
+ sed '1,/^};$/d' crc32.c >> crc32.c.new
mv crc32.c.new crc32.c
popd
diff --git a/steps/gcc-4.7.4/pass1.sh b/steps/gcc-4.7.4/pass1.sh
@@ -146,11 +146,11 @@ src_prepare() {
# Regenerate crc table in libiberty/crc32.c
pushd libiberty
- sed -n -e '39,66p' crc32.c > crcgen.c
+ sed -n '/^ #include <stdio.h>/,/^ \}$/p' crc32.c > crcgen.c
gcc -o crcgen crcgen.c
- head -n 70 crc32.c > crc32.c.new
+ sed '/crc_v3\.txt/{n; q}' crc32.c > crc32.c.new
./crcgen >> crc32.c.new
- tail -n +139 crc32.c >> crc32.c.new
+ sed '1,/^};$/d' crc32.c >> crc32.c.new
mv crc32.c.new crc32.c
popd