From 1663cb2940e1798670cae89748c45a1e112a64c5 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sun, 4 Sep 2022 14:00:45 +0300 Subject: [PATCH 1/4] Use --add-missing in manual invocation of automake This is needed when using newer versions of libtool. No change in package hash. --- sysc/gcc-4.7.4/gcc-4.7.4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysc/gcc-4.7.4/gcc-4.7.4.sh b/sysc/gcc-4.7.4/gcc-4.7.4.sh index 005263a..8fd0142 100755 --- a/sysc/gcc-4.7.4/gcc-4.7.4.sh +++ b/sysc/gcc-4.7.4/gcc-4.7.4.sh @@ -56,7 +56,7 @@ src_prepare() { for dir in $(find . -mindepth 2 -maxdepth 2 -name Makefile.am | sed 's#/Makefile.am##' | tr "\n" " " | sed -e 's/ $/\n/' -e 's/^boehm-gc //'); do pushd "$dir" rm Makefile.in - AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 automake-1.11 + AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 automake-1.11 --add-missing popd done From e9d53f1e6e2f5b01b020569892cc818694fffec4 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sun, 4 Sep 2022 11:11:28 +0300 Subject: [PATCH 2/4] Skip the libgo directory in GCC 4.7.4 This should avoid configuration errors caused by combining an older automake that doesn't support Go with a newer libtool that does. No change in package hash. --- sysc/gcc-4.7.4/gcc-4.7.4.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sysc/gcc-4.7.4/gcc-4.7.4.sh b/sysc/gcc-4.7.4/gcc-4.7.4.sh index 8fd0142..5250b6e 100755 --- a/sysc/gcc-4.7.4/gcc-4.7.4.sh +++ b/sysc/gcc-4.7.4/gcc-4.7.4.sh @@ -16,6 +16,9 @@ src_prepare() { # but it is not essential for building gcc. rm configure Makefile.in fixincludes/fixincl.x + # Remove unused generated files + rm libgo/aclocal.m4 libgo/configure libgo/Makefile.in + # Regenerate aclocal.m4 files # grep "generated automatically by aclocal" */aclocal.m4 -l | sed -e 's#/aclocal.m4##' | tr "\n" " " | sed -e 's/ $/\n/' for dir in intl libcpp libdecnumber; do @@ -32,19 +35,21 @@ src_prepare() { rm aclocal.m4 AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 aclocal-1.11 --acdir=../gcc cd .. - for dir in boehm-gc libffi libgfortran libgo libgomp libitm libjava libmudflap libobjc libquadmath libssp lto-plugin zlib; do + for dir in boehm-gc libffi libgfortran libgomp libitm libjava libmudflap libobjc libquadmath libssp lto-plugin zlib; do cd $dir rm aclocal.m4 AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 aclocal-1.11 cd .. done + cd libstdc++-v3 ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 autoreconf-2.64 -fi cd .. + # Regenerate configure scripts # Find all folders with configure script and rebuild them. At the moment we exclude boehm-gc folder due to # an error but we don't use that directory anyway (it's only needed for Objective C) - for dir in $(find . -mindepth 2 -maxdepth 2 -name configure.ac | sed 's#/configure.ac##' | tr "\n" " " | sed -e 's/ $/\n/' -e 's/^boehm-gc //'); do + for dir in $(find . -mindepth 2 -maxdepth 2 -name configure.ac | sed 's#/configure.ac##' | grep -v -x './libgo' | tr "\n" " " | sed -e 's/ $/\n/' -e 's/^boehm-gc //'); do pushd "$dir" rm configure autoconf-2.64 || autoconf-2.64 @@ -53,7 +58,7 @@ src_prepare() { # Regenerate Makefile.in # Find all folders with Makefile.am and rebuild them. At the moment we exclude boehm-gc folder. - for dir in $(find . -mindepth 2 -maxdepth 2 -name Makefile.am | sed 's#/Makefile.am##' | tr "\n" " " | sed -e 's/ $/\n/' -e 's/^boehm-gc //'); do + for dir in $(find . -mindepth 2 -maxdepth 2 -name Makefile.am | sed 's#/Makefile.am##' | grep -v -x './libgo' | tr "\n" " " | sed -e 's/ $/\n/' -e 's/^boehm-gc //'); do pushd "$dir" rm Makefile.in AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 automake-1.11 --add-missing From 5aae443d65a99ab52e1885567da2a0ba7732f7dc Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sun, 4 Sep 2022 11:06:28 +0300 Subject: [PATCH 3/4] Add libtool 2.4.7 Instead of using the pre-generated "bootstrap" script, execute the relevant bootstrap operations manually. This doesn't actually change the build output; the final package hash remains identical. --- parts.rst | 7 ++ sysa/SHA256SUMS.pkgs | 23 ++--- sysc.py | 4 + sysc/SHA256SUMS.sources | 2 + sysc/libtool-2.4.7/bootstrap-helper.sh | 100 ++++++++++++++++++++++ sysc/libtool-2.4.7/import-gnulib.sh | 34 ++++++++ sysc/libtool-2.4.7/libtool-2.4.7.sh | 51 +++++++++++ sysc/libtool-2.4.7/patches/hostname.patch | 17 ++++ sysc/run2.sh | 2 + 9 files changed, 229 insertions(+), 11 deletions(-) create mode 100755 sysc/libtool-2.4.7/bootstrap-helper.sh create mode 100755 sysc/libtool-2.4.7/import-gnulib.sh create mode 100755 sysc/libtool-2.4.7/libtool-2.4.7.sh create mode 100644 sysc/libtool-2.4.7/patches/hostname.patch diff --git a/parts.rst b/parts.rst index 04f66d4..c85ec14 100644 --- a/parts.rst +++ b/parts.rst @@ -1,4 +1,5 @@ .. sectnum:: +.. SPDX-FileCopyrightText: 2022 Dor Askayo .. SPDX-FileCopyrightText: 2021 Andrius Štikonas .. SPDX-FileCopyrightText: 2021 Paul Dersey .. SPDX-FileCopyrightText: 2021 fosslinux @@ -609,6 +610,12 @@ automake 1.11.2 GNU Automake from 1.11 series. This is not the latest point release as newer ones need Autoconf 2.68. +libtool 2.4.7 +============= + +A modern version of libtool with better compatiblitiy with newer versions of GNU +Autotools. + autoconf 2.69 ============= diff --git a/sysa/SHA256SUMS.pkgs b/sysa/SHA256SUMS.pkgs index 6140874..48a7f37 100644 --- a/sysa/SHA256SUMS.pkgs +++ b/sysa/SHA256SUMS.pkgs @@ -37,7 +37,7 @@ c4d59e759f7349b96f74e62d867e419f3d85fbb81eaf5f79f996abf48f0d3170 coreutils-5.0_ 776ef3e13870fba6fc9cec64eaf40fb658abecc99c65724968013f8f8a177802 coreutils-6.10_0.tar.bz2 b8992f675350658b106c3066cac0ee31440020bc9d6128bfc2fdf1fde60efd74 coreutils-8.32_0.tar.bz2 28a1e93ed14f7fa4d3c8ca41e9b78e29ba685fbc8b6bf7ba3b6933770d68eedb curl-7.83.0_0.tar.bz2 -99a101a3a1de8e5ed3f590cda6b1a72d68cd2e935b85e8b9b862ab26f66c7ee1 curl-7.83.0_1.tar.bz2 +7587f57c2dbfd67c568dbf91774676a8e250eadc93764bc74b902f61253e97c4 curl-7.83.0_1.tar.bz2 a6f8f4db6bf449ed8771efefabb88833f1fc5f314d565b7714c9c8b4ba34b20c dhcpcd-9.4.1_0.tar.bz2 ca91a67d5d0c0ee46d064d9bf7c26efcafe712a9f86866991028478df3b34f21 diffutils-2.7_0.tar.bz2 de6d9df33107ae63b8e0f30902fe9d00e42f78f44a60b256bb0b3c82ff75bd45 dist-3.5-236_0.tar.bz2 @@ -47,31 +47,32 @@ 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 -95a787e432b40497b39909aa533a2b19c1b05a87bc3a289b338e4fec44e94f96 gc-8.0.4_0.x86.xbps +3ab628221001e94dedfe1415079651d1bbfa6815602a8661728f8b8049fc6e57 gc-8.0.4_0.x86.xbps 07715a0c8bc13b80fc10ede20573f92e933b8d3dc6a5c8700f4289965ea8ec74 gcc-4.0.4_0.tar.bz2 e7c678c71c51cd6e8ce6eae029503a661169e6994ba0f988ac15634254d1fadb gcc-4.0.4_1.tar.bz2 -03aa62a03becd1688dd6ccb28da4b924d928796807af86b83aa2d01bab1c9f65 gcc-4.7.4_0.x86.xbps +53b03122b399b1c5c2427aa735e42d661157d9369c3023a3fe45e87001e2a973 gcc-4.7.4_0.x86.xbps b5f6fe07a696751d2fc1d9cc3d96f09d89d6a637e1d8d0b250105b650e831600 gettext-0.21_0.x86.xbps -ed8b1b36fa558f594b3e4b5a958f1c31d97990abf84788f67ce5be7a593c4b9d gmp-6.2.1_0.tar.bz2 +fe16fb6021f1f4650c98f77261145f37732be0aee06e957b0bdb3b01beb593a8 gmp-6.2.1_0.tar.bz2 11940cfe5ea1c11f427932faecf054e1463f8b674a3dd99ef1569b245a370035 gperf-3.1_0.x86.xbps 390840f2bc9c2a3196c28e06f8650f408e33b5d4ffe5539e174682ed13960bc9 grep-2.4_0.tar.bz2 -4c5ac95c3ca934d5cac5e05e13473a16ee1a616190217795438019f1e4fcc254 guile-3.0.7_0.x86.xbps +3d6a86dcfcc9cf9ad11f07cc2a2adaa8bfec0d593df1ee5f33d59f7c63b8ea32 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 -a4aa859bdb70b5c0c9b726fe8f1a34c08b5afc1fe1bc8d0d2be136c7f8b36d85 libarchive-3.5.2_0.tar.bz2 -a80d0ff829ab285e92d966b3664e390ce60b420eb22b1288211432fed880b4fe libatomic_ops-7.6.10_0.x86.xbps -b70fe8d9479ca4a3ad6fdbafbaf52a172c6a4a47ae8cf080beb9d25b97a7b205 libffi-3.3_0.x86.xbps +4c0cc86a9855122a4b5c12bff6f6bbf524495910ec718ef339fbfe7076824950 libarchive-3.5.2_0.tar.bz2 +95506b7151440ec7ed7af9769784f312cb4c37deaf7a6c66e2b6d36c403e4b3c libatomic_ops-7.6.10_0.x86.xbps +d242816dac83ea56c4be79d289b0b4e56b8257a9f9986ddbcfabc8dfaea3687a libffi-3.3_0.x86.xbps 5001f8fdbba0db0ecf60263bfea97ed4b9174d06a447e98bee220548f973756a libtool-1.4_0.tar.bz2 94d0f9d2f8fbc2b00fe4c0f479e5590fa70b7d856f0a643ad006787d963f99ee libtool-2.2.4_0.tar.bz2 -9bf0aea34d1413640667645ef06947ec2c24d3fa4e4e10825a7560c6d2e3343b libunistring-0.9.10_0.x86.xbps +374214711d42681d030d6faceba3198243ec22301d94212f7162bd4873b7ba27 libtool-2.4.7_0.tar.bz2 +482708d01357ee4de3f17c54047fe8ab6c502fc436069da63e3ef56c24d944b2 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 c4fc071e0911a01efae11b8735c8e69a8963d9a545befffd01486de7589b201a make-3.82_0.tar.bz2 47470be468d66a85e71cbecbbf22038260c6e91408105ba0684c3ee61b39085f make-4.2.1_0.tar.bz2 -0f88b1715bde14c5d65ffeff54903fae5a11cd02d0e95cad9629c76d42e8d739 mpc-1.2.1_0.tar.bz2 -9ca09072cdee6ce6822840b9a5b66cea3e68150ce4875b2c7e760169601ab6de mpfr-4.1.0_0.tar.bz2 +3205490c472448de2f67aee7ff3190bb9ac493eca6fc5c8ce79b145d8b23268a mpc-1.2.1_0.tar.bz2 +ffeadd2b9d9e72edb5b15750b50a6c0c47bb90a1cb14ba66732aa733e0209e50 mpfr-4.1.0_0.tar.bz2 5a36e7d798f43088d6a72fede0bd0f389a42d9e958013cd6c8df16ce2e090e1f musl-1.1.24_0.tar.bz2 7f3251ee05aaa38e9803db41104acbfa399873a31591411c3580d181a6461d0c musl-1.1.24_1.tar.bz2 9f3d2b47634860cfd5f03fa3346ef9a60a6dab57164ee974578dbb7f4a45e16b musl-1.1.24_2.tar.bz2 diff --git a/sysc.py b/sysc.py index 7be61e4..d29a1db 100755 --- a/sysc.py +++ b/sysc.py @@ -89,6 +89,10 @@ class SysC(SysGeneral): # automake 1.11.2 self.get_file("https://mirrors.kernel.org/gnu/automake/automake-1.11.2.tar.bz2") + # libtool 2.4.7 + self.get_file(["https://mirrors.kernel.org/gnu/libtool/libtool-2.4.7.tar.xz", + "https://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-a521820.tar.gz"]) + # autoconf 2.69 self.get_file("https://mirrors.kernel.org/gnu/autoconf/autoconf-2.69.tar.xz") diff --git a/sysc/SHA256SUMS.sources b/sysc/SHA256SUMS.sources index 7d406cb..20c6637 100644 --- a/sysc/SHA256SUMS.sources +++ b/sysc/SHA256SUMS.sources @@ -20,6 +20,7 @@ df807e694deea2dcba0c43af318394f3e3fcd52658c3b71b61dad0ce0c0cfb77 gnulib-30820c. 8cced51f89a950472473856f86e88f5daf97a2347756125ccdc8ee907deec570 gnulib-672663a.tar.gz 2d911c2f2ed97b347d6d360b742abdc98aa626d4f8f847ee682c7cde12e90871 gnulib-7daa86f.tar.gz f9aad85de1f41d57c9368d304020ffbf354a5e56db1297f022c3d12181134e56 gnulib-901694b9.tar.gz +719b399fe09a8f6ca14ba8c4a9a60ce9f93f4892effb50961ef3d8cd1a33ff65 gnulib-a521820.tar.gz 0190f28cb155fedd22bf8558c3e8705eed9eacfb7ae29e7508d025a68eb90899 gnulib-b28236b.tar.gz 1aeea67b7b3883ebcf2b90bc01f4182d7de073a052dabd3749f20c5aa4ad3e27 gnulib-b81ec69.tar.gz 12cfa21abf618a274017d6b18e95fc6582519d7c08e2403e5c5772ccdd5b85f4 gnulib-d279bc.tar.gz @@ -30,6 +31,7 @@ f57d86c70620271bfceb7a9be0c81744a033f08adc7ceba832c9917ab3e691b7 guile-3.0.7.ta f0b19ff39c3c9a5898a219497ababbadab99d8178acc980155c7e1271089b5a0 libarchive-3.5.2.tar.xz 587edf60817f56daf1e1ab38a4b3c729b8e846ff67b4f62a6157183708f099af libatomic_ops-7.6.10.tar.gz 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056 libffi-3.3.tar.gz +4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d libtool-2.4.7.tar.xz eb8fb2c3e4b6e2d336608377050892b54c3c983b646c561836550863003c05d7 libunistring-0.9.10.tar.xz e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7 make-4.2.1.tar.gz 17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 mpc-1.2.1.tar.gz diff --git a/sysc/libtool-2.4.7/bootstrap-helper.sh b/sysc/libtool-2.4.7/bootstrap-helper.sh new file mode 100755 index 0000000..1d1a2f0 --- /dev/null +++ b/sysc/libtool-2.4.7/bootstrap-helper.sh @@ -0,0 +1,100 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2022 Dor Askayo +# SPDX-FileCopyrightText: 2010-2019, 2021 Bootstrap Authors +# SPDX-FileCopyrightText: 2010-2019, 2021-2022 Free Software Foundation, Inc. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +EXIT_FALURE=1 + +####################################### +# Extracted from the output of: # +# ./bootstrap --verbose --force # +####################################### + +MAKE='make' +SED='/usr/bin/sed' + +build_aux='build-aux' +ltdl_dir='libltdl' +macro_dir='m4' + +package_name='GNU Libtool' +package='libtool' +package_bugreport='bug-libtool@gnu.org' +package_url='http://www.gnu.org/s/libtool/' +package_version='2.4.7' + +############################# +# Inspired by "bootstrap" # +############################# + +func_show_eval () +{ + eval "$1" + _G_status=$? + if test 0 -ne "$_G_status"; then + exit $_G_status + fi +} + +################################## +# Copied from "bootstrap.conf" # +################################## + +# libtool_build_prerequisites +# --------------------------- +# Libtool generates some files that are required before any autotools +# can be run successfully. +libtool_build_prerequisites () +{ + $debug_cmd + + $require_build_aux + $require_ltdl_dir + $require_macro_dir + $require_package + $require_package_bugreport + $require_package_name + $require_package_url + $require_package_version + + # Whip up a dirty Makefile: + makes='Makefile.am libltdl/ltdl.mk' + rm -f Makefile + { + echo "aux_dir = $build_aux" + echo "ltdl_dir = $ltdl_dir" + echo "macro_dir = $macro_dir" + + # The following allow us to tie bootstrap-deps output verbosity + # into the bootstrap --verbose option: + echo 'AM_V_GEN = $(am__v_GEN_$(V))' + echo 'am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))' + echo 'am__v_GEN_0 = @echo " GEN " $@;' + echo 'AM_V_at = $(am__v_at_$(V))' + echo 'am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))' + echo 'am__v_at_0 = @' + + $SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes + } > Makefile + + # Building distributed files from configure is bad for automake, so we + # generate them here, and have Makefile rules to keep them up to date. + func_show_eval "$MAKE V=1 bootstrap-deps \ + AM_DEFAULT_VERBOSITY=0 `$opt_verbose && echo V=1` \ + PACKAGE='$package' PACKAGE_BUGREPORT='$package_bugreport' \ + PACKAGE_NAME='$package_name' PACKAGE_URL='$package_url' \ + SED='$SED' srcdir=. VERSION='$package_version'" + status=$? + + rm -f Makefile + test 0 -eq "$status" ||exit $EXIT_FAILURE +} + +################### +# Run functions # +################### + +libtool_build_prerequisites diff --git a/sysc/libtool-2.4.7/import-gnulib.sh b/sysc/libtool-2.4.7/import-gnulib.sh new file mode 100755 index 0000000..34976e0 --- /dev/null +++ b/sysc/libtool-2.4.7/import-gnulib.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2022 Dor Askayo +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -e + +../gnulib-a521820/gnulib-tool \ + --no-changelog \ + --avoid=dummy \ + --libtool \ + --macro-prefix=GL \ + --with-tests \ + --tests-base=gnulib-tests \ + --aux-dir=build-aux \ + --m4-base=m4 \ + --local-dir=gl \ + --local-dir=gl-mod/bootstrap \ + --symlink \ + --import announce-gen \ + bootstrap \ + do-release-commit-and-tag \ + extract-trace \ + gendocs \ + git-version-gen \ + gitlog-to-changelog \ + gnu-web-doc-update \ + gnupload \ + inline-source \ + maintainer-makefile \ + options-parser \ + readme-release \ + update-copyright diff --git a/sysc/libtool-2.4.7/libtool-2.4.7.sh b/sysc/libtool-2.4.7/libtool-2.4.7.sh new file mode 100755 index 0000000..e413a67 --- /dev/null +++ b/sysc/libtool-2.4.7/libtool-2.4.7.sh @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: 2022 Dor Askayo +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# SPDX-FileCopyrightText: 2022 fosslinux +# +# SPDX-License-Identifier: GPL-3.0-or-later + +urls="http://mirrors.kernel.org/gnu/libtool/libtool-2.4.7.tar.xz + http://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-a521820.tar.gz" + +src_prepare() { + default + + rm -f build-aux/ltmain.sh + rm -f doc/*.info + rm -f bootstrap + + ../../import-gnulib.sh + + LIBTOOLIZE=true AUTOPOINT=true ../../bootstrap-helper.sh + + LIBTOOLIZE=true AUTOPOINT=true AUTOMAKE=automake-1.11 ACLOCAL=aclocal-1.11 AUTOCONF=autoconf-2.64 AUTOHEADER=autoheader-2.64 autoreconf-2.64 -fi + LIBTOOLIZE=true AUTOPOINT=true AUTOMAKE=automake-1.11 ACLOCAL=aclocal-1.11 AUTOCONF=autoconf-2.64 AUTOHEADER=autoheader-2.64 autoreconf-2.64 -fi libltdl +} + +src_configure() { + ./configure \ + --prefix="${PREFIX}" \ + --libdir="${PREFIX}/lib/musl" \ + --disable-shared \ + --host=i386-unknown-linux \ + --target=i386-unknown-linux \ + --build=i386-unknown-linux \ + ac_path_EGREP="egrep" \ + ac_path_FGREP="fgrep" \ + ac_path_GREP="grep" \ + ac_path_SED="sed" +} + +src_compile() { + make AUTOM4TE=autom4te-2.64 MAKEINFO=true +} + +src_install() { + make install MAKEINFO=true DESTDIR="${DESTDIR}" + + sed -i -e "s/{EGREP=.*/{EGREP='egrep'}/" \ + -e "s/{FGREP=.*/{FREGP='fgrep'}/" \ + -e "s/{GREP=.*/{GREP='grep'}/" \ + -e "s/{SED=.*/{SED='sed'}/" \ + "${DESTDIR}/usr/bin/libtool" +} diff --git a/sysc/libtool-2.4.7/patches/hostname.patch b/sysc/libtool-2.4.7/patches/hostname.patch new file mode 100644 index 0000000..24858e9 --- /dev/null +++ b/sysc/libtool-2.4.7/patches/hostname.patch @@ -0,0 +1,17 @@ +SPDX-FileCopyrightText: 2022 Dor Askayo +SPDX-FileCopyrightText: 2022 fosslinux + +SPDX-License-Identifier: GPL-2.0-only + +Remove hostname from libtool script. + +--- m4/libtool.m4 2022-03-17 04:43:39.000000000 +0200 ++++ m4/libtool.m4 2022-09-03 20:04:29.687049292 +0300 +@@ -730,7 +730,6 @@ + cat <<_LT_EOF >> "$cfgfile" + #! $SHELL + # Generated automatically by $as_me ($PACKAGE) $VERSION +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + + # Provide generalized library-building support services. diff --git a/sysc/run2.sh b/sysc/run2.sh index 79c8a4c..d30e81f 100755 --- a/sysc/run2.sh +++ b/sysc/run2.sh @@ -23,6 +23,8 @@ build xz-5.0.5 build automake-1.11.2 +build libtool-2.4.7 + build autoconf-2.69 build automake-1.15.1 From 4113d60b24f59bf3ef3b62f389f3194510e9d54a Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sun, 4 Sep 2022 11:12:21 +0300 Subject: [PATCH 4/4] Add binutils 2.38 --- parts.rst | 7 ++ sysa/SHA256SUMS.pkgs | 13 +-- sysc.py | 3 + sysc/SHA256SUMS.sources | 1 + sysc/binutils-2.38/binutils-2.38.sh | 96 +++++++++++++++++++ ...d-missing-config-directory-reference.patch | 18 ++++ ...i386-init-dependencies-are-satisfied.patch | 17 ++++ sysc/run2.sh | 2 + 8 files changed, 151 insertions(+), 6 deletions(-) create mode 100755 sysc/binutils-2.38/binutils-2.38.sh create mode 100644 sysc/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch create mode 100644 sysc/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch diff --git a/parts.rst b/parts.rst index c85ec14..3d9f0df 100644 --- a/parts.rst +++ b/parts.rst @@ -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 ========= diff --git a/sysa/SHA256SUMS.pkgs b/sysa/SHA256SUMS.pkgs index 48a7f37..1086cd9 100644 --- a/sysa/SHA256SUMS.pkgs +++ b/sysa/SHA256SUMS.pkgs @@ -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 diff --git a/sysc.py b/sysc.py index d29a1db..1113aaf 100755 --- a/sysc.py +++ b/sysc.py @@ -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") diff --git a/sysc/SHA256SUMS.sources b/sysc/SHA256SUMS.sources index 20c6637..8aa4ee3 100644 --- a/sysc/SHA256SUMS.sources +++ b/sysc/SHA256SUMS.sources @@ -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 diff --git a/sysc/binutils-2.38/binutils-2.38.sh b/sysc/binutils-2.38/binutils-2.38.sh new file mode 100755 index 0000000..3470e05 --- /dev/null +++ b/sysc/binutils-2.38/binutils-2.38.sh @@ -0,0 +1,96 @@ +# SPDX-FileCopyrightText: 2022 Dor Askayo +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# SPDX-FileCopyrightText: 2021 Paul Dersey +# +# 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 +} diff --git a/sysc/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch b/sysc/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch new file mode 100644 index 0000000..dd5b0da --- /dev/null +++ b/sysc/binutils-2.38/patches/libiberty-add-missing-config-directory-reference.patch @@ -0,0 +1,18 @@ +SPDX-FileCopyrightText: 2022 Dor Askayo + +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 diff --git a/sysc/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch b/sysc/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch new file mode 100644 index 0000000..030a2a3 --- /dev/null +++ b/sysc/binutils-2.38/patches/opcodes-ensure-i386-init-dependencies-are-satisfied.patch @@ -0,0 +1,17 @@ +SPDX-FileCopyrightText: 2022 Dor Askayo + +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) diff --git a/sysc/run2.sh b/sysc/run2.sh index d30e81f..584e954 100755 --- a/sysc/run2.sh +++ b/sysc/run2.sh @@ -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