From 07dcb910b96b3b67238d0f197d52da941ef02c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 11 Mar 2021 17:34:42 +0000 Subject: [PATCH 1/5] Fix occasional autoconf build failures. --- sysa/autoconf-2.13/autoconf-2.13.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysa/autoconf-2.13/autoconf-2.13.sh b/sysa/autoconf-2.13/autoconf-2.13.sh index b94c0ae..5bdf2ca 100755 --- a/sysa/autoconf-2.13/autoconf-2.13.sh +++ b/sysa/autoconf-2.13/autoconf-2.13.sh @@ -12,3 +12,7 @@ src_prepare() { src_configure() { ./configure --prefix=${PREFIX} --program-suffix=-2.13 } + +src_compile() { + make MAKEINFO=true +} From 3518f7cec01af61b53343acff0b4fc7eb172bad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 11 Mar 2021 18:12:52 +0000 Subject: [PATCH 2/5] Buil sed 4.0.9 with musl. --- SHA256SUMS.sources | 1 + parts.rst | 5 +++++ rootfs.sh | 3 +++ sysa/run.sh | 3 +++ sysa/sed-4.0.9/checksums | 1 + sysa/sed-4.0.9/mk/main.mk | 33 +++++++++++++++++++++++++++++++++ sysa/sed-4.0.9/sed-4.0.9.sh | 14 ++++++++++++++ 7 files changed, 60 insertions(+) create mode 100644 sysa/sed-4.0.9/checksums create mode 100644 sysa/sed-4.0.9/mk/main.mk create mode 100755 sysa/sed-4.0.9/sed-4.0.9.sh diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index 79bbfda..45f66ea 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -25,5 +25,6 @@ ecb5c6469d732bcf01d6ec1afe9e64f1668caba5bfdb103c28d7f537ba3cdb8a patch-2.5.9.ta 1184478b298978b164a383ed5661e3a117c48ab97d6d0ab7ef614cdbe918b9eb perl5.004_05.tar.gz 93f41cd87ab8ee83391cfa39a63b076adeb7c3501d2efa31b98d0ef037122bd1 perl5.005_03.tar.gz a5e66f6ebf701b0567f569f57cae82abf5ce57af70a2b45ae71323b61f49134e perl-5.6.2.tar.gz +c365874794187f8444e5d22998cd5888ffa47f36def4b77517a808dec27c0600 sed-4.0.9.tar.gz 404a8d72427a559c074e581bf8f7d5a73283faf249cd3faf6dc1c6faf97d07c7 sha-2-61555d.tar.gz c6c37e888b136ccefab903c51149f4b7bd659d69d4aea21245f61053a57aa60a tar-1.12.tar.gz diff --git a/parts.rst b/parts.rst index 9c61e01..b653097 100644 --- a/parts.rst +++ b/parts.rst @@ -251,6 +251,11 @@ tcc 0.9.27 (musl v2) Now that we have a ‘fixed’ ``musl``, we now recompile ``tcc`` as ``tcc`` uses floats extensively. +sed 4.0.9 +========= + +A slightly newer ``sed`` is built against musl. + .. _bzip2-1.0.8-1: bzip2 1.0.8 diff --git a/rootfs.sh b/rootfs.sh index ca23e94..34ad7e1 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -222,6 +222,9 @@ get_file https://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 # bash 3.2.57 get_file https://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz +# sed 4.0.9 +get_file ftp://ftp.gnu.org/gnu/sed/sed-4.0.9.tar.gz + # General cleanup find tmp -name .git -exec rm -rf \; diff --git a/sysa/run.sh b/sysa/run.sh index b74aca5..d6b6e3d 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -36,6 +36,9 @@ build musl-1.1.24 musl-1.1.24.sh checksums/pass2 # Rebuild tcc-musl using new musl build tcc-0.9.27 tcc-musl-pass2.sh checksums/tcc-musl-pass2 +# Rebuild sed using musl +build sed-4.0.9 + # Rebuild bzip2 using musl build bzip2-1.0.8 bzip2-1.0.8.sh checksums/bzip2-pass2 diff --git a/sysa/sed-4.0.9/checksums b/sysa/sed-4.0.9/checksums new file mode 100644 index 0000000..045e34d --- /dev/null +++ b/sysa/sed-4.0.9/checksums @@ -0,0 +1 @@ +de7d06a5c0b0a4b52307771f60dd711d0ae9ae0b14562ad6d26942785aaf0909 /after/bin/sed diff --git a/sysa/sed-4.0.9/mk/main.mk b/sysa/sed-4.0.9/mk/main.mk new file mode 100644 index 0000000..73ece13 --- /dev/null +++ b/sysa/sed-4.0.9/mk/main.mk @@ -0,0 +1,33 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +CC = tcc +AR = tcc -ar + +CPPFLAGS = -DENABLE_NLS=0 \ + -DHAVE_FCNTL_H \ + -DHAVE_ALLOCA_H \ + -DSED_FEATURE_VERSION=\"4.0\" \ + -DVERSION=\"4.0.9\" \ + -DPACKAGE=\"sed\" +CFLAGS = -I . -I lib + +.PHONY: all + +LIB_SRC = alloca getopt1 getopt utils regex obstack strverscmp mkstemp +LIB_OBJ = $(addprefix lib/, $(addsuffix .o, $(LIB_SRC))) + +SED_SRC = compile execute regexp fmt sed +SED_OBJ = $(addprefix sed/, $(addsuffix .o, $(SED_SRC))) + +all: sed/sed + +libsed.a: $(LIB_OBJ) + $(AR) cr $@ $^ + +sed/sed: $(SED_OBJ) libsed.a + $(CC) -o $@ $^ + +install: + install sed/sed $(PREFIX)/bin diff --git a/sysa/sed-4.0.9/sed-4.0.9.sh b/sysa/sed-4.0.9/sed-4.0.9.sh new file mode 100755 index 0000000..9bfded5 --- /dev/null +++ b/sysa/sed-4.0.9/sed-4.0.9.sh @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + default_src_prepare + + cp lib/regex_.h lib/regex.h + touch config.h +} + +src_install() { + default_src_install +} From 2927547595b1241d454d6d2474fdac4b1f51bbc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 12 Mar 2021 00:28:29 +0000 Subject: [PATCH 3/5] Add libtool 1.4. --- SHA256SUMS.sources | 1 + parts.rst | 10 ++++++++-- rootfs.sh | 3 +++ sysa/libtool-1.4/checksums/pass1 | 2 ++ sysa/libtool-1.4/pass1.sh | 23 +++++++++++++++++++++++ sysa/run.sh | 2 ++ 6 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 sysa/libtool-1.4/checksums/pass1 create mode 100755 sysa/libtool-1.4/pass1.sh diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources index 45f66ea..bdf57de 100644 --- a/SHA256SUMS.sources +++ b/SHA256SUMS.sources @@ -16,6 +16,7 @@ e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995 flex-2.6.4.tar a32032bab36208509466654df12f507600dfe0313feebbcd218c32a70bf72a16 grep-2.4.tar.gz 4d2ce9f314f39c9575f913503b0178d6fb2c92920db8e7b7b176b7bab7980fe6 gzip-1.2.4.tar 9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba heirloom-devtools-070527.tar.bz2 +8e8ce6175d435e7df8c9bbb0e5fd5357691cdc28c1a2d00fdd9b47b7643bec3a libtool-1.4.tar.gz 093c993767f563a11e41c1cf887f4e9065247129679d4c1e213d0544d16d8303 m4-1.4.7.tar.gz 64b30b41fde2ebf669e6af489883fb1df6a06ac30555a96cfa3c39ecce7267dd make-3.80.tar.gz 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3 musl-1.1.24.tar.gz diff --git a/parts.rst b/parts.rst index b653097..2d5f1b7 100644 --- a/parts.rst +++ b/parts.rst @@ -377,8 +377,8 @@ Version 2.52 is the newest version that runs on ``miniperl``. automake 1.4-p6 =============== -GNU Automake is a tool for automatically generating Makefile.in files. Together with -Autoconf they from GNU Autotools build system. +GNU Automake is a tool for automatically generating Makefile.in files. It is another +major part of GNU Autotools build system. ``automake`` again needs both ``automake`` and ``autoconf``. In order to bootstrap it we patch ``configure.in`` file to produce ``automake`` and skip ``Makefile`` effectively @@ -403,6 +403,12 @@ autoconf 2.12 Yet another old autoconf version that we will need for GNU Binutils. +libtool 1.4 +=========== + +GNU Libtool is the final part of GNU Autotools. It is a script used to hide away differences +when compiling shared libraries on different platforms. + binutils 2.14 ============= diff --git a/rootfs.sh b/rootfs.sh index 34ad7e1..f0e22fa 100755 --- a/rootfs.sh +++ b/rootfs.sh @@ -216,6 +216,9 @@ get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz # autoconf 2.12 get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.12.tar.gz +# libtool 1.4 +get_file https://ftp.gnu.org/gnu/libtool/libtool-1.4.tar.gz + # binutils 2.14 get_file https://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2 diff --git a/sysa/libtool-1.4/checksums/pass1 b/sysa/libtool-1.4/checksums/pass1 new file mode 100644 index 0000000..a641ecd --- /dev/null +++ b/sysa/libtool-1.4/checksums/pass1 @@ -0,0 +1,2 @@ +99cff07a501eb0062fc49db1baec30c83afc0c92f2f8478fc0e6ca7439d2c9b6 /after/lib/musl/libltdl.a +c247c7c1516ed35414c8b038535969a67ce4bbfd2abdfed85a89941bca09d55d /after/lib/musl/libltdl.la diff --git a/sysa/libtool-1.4/pass1.sh b/sysa/libtool-1.4/pass1.sh new file mode 100755 index 0000000..eeec759 --- /dev/null +++ b/sysa/libtool-1.4/pass1.sh @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + default_src_prepare + + AUTOCONF=autoconf-2.13 AUTOHEADER=autoheader-2.13 ACLOCAL=aclocal-1.4 AUTOMAKE=automake-1.4 ./bootstrap +} + +src_configure() { + CC=tcc LD=true AR="tcc -ar" ./configure \ + --prefix="${PREFIX}" \ + --libdir="${PREFIX}/lib/musl" \ + --disable-shared \ + --host=i386-unknown-linux \ + --target=i386-unknown-linux \ + --build=i386-unknown-linux +} + +src_compile() { + AR="tcc -ar" AR_FLAGS="cr" make +} diff --git a/sysa/run.sh b/sysa/run.sh index d6b6e3d..e535ba2 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -85,6 +85,8 @@ build autoconf-2.13 build autoconf-2.12 +build libtool-1.4 pass1.sh checksums/pass1 + build binutils-2.14 # Build musl with fewer patches From 4463eedc03cecc08e10f9d2d83f65bf2d8a88a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 12 Mar 2021 01:09:53 +0000 Subject: [PATCH 4/5] Rebuild libtool files in binutils. Fixes #58 --- sysa/binutils-2.14/binutils-2.14.sh | 5 +++++ sysa/binutils-2.14/checksums | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sysa/binutils-2.14/binutils-2.14.sh b/sysa/binutils-2.14/binutils-2.14.sh index 708ff86..84e7378 100755 --- a/sysa/binutils-2.14/binutils-2.14.sh +++ b/sysa/binutils-2.14/binutils-2.14.sh @@ -21,6 +21,11 @@ src_prepare() { cd .. done + # Rebuild libtool files + rm config.guess config.sub ltmain.sh + libtoolize + cp ${PREFIX}/share/aclocal/libtool.m4 aclocal.m4 + # automake errors out without this cd gas mv config/m68k-parse.y . diff --git a/sysa/binutils-2.14/checksums b/sysa/binutils-2.14/checksums index 6b90df2..ac52c5b 100644 --- a/sysa/binutils-2.14/checksums +++ b/sysa/binutils-2.14/checksums @@ -14,7 +14,7 @@ e49bba1ea6a61fb90f754e8de4692ed0810e7c68429f0b22fbf37670607a7807 /after/bin/od 82657d370bca61bf6a6a4cbfb621614582519f2e938be1a4d09c135344c7c889 /after/bin/strings fe6eaa5cf6e6621356fff3cd047c7cd0051490e895915027b6d4439159707f36 /after/bin/strip f5934b4f057018b7f14adc197460d8b238cff80294234d771a17a408d5794104 /after/lib/musl/libbfd.a -3c9ab37cff5f732bca1258879fabf3c6c734890de1d7aa6381a5945d38f31c86 /after/lib/musl/libbfd.la +cd472e56e7e9276e2d6eea4b0aecd068cdbbd7d767dd913e7d72e43457f6405a /after/lib/musl/libbfd.la 61a03b0d2eafa5ad50242a7ee8ce8664c2ef342bf727f46ceab8999b61a9a61b /after/lib/musl/libiberty.a 6530574bde4f5c57b194ae4229efb9784a97cc89cd45fc0d852e9afb5e103e4f /after/lib/musl/libopcodes.a -d3c307c7a2cd62a3fc39aa933f40bee94b94aff5db58a3652689ebfe0f616c82 /after/lib/musl/libopcodes.la +817032ae31517f4261ef997dc33a487a5801549c879dd4f4803ba7d80b3430a6 /after/lib/musl/libopcodes.la From 0b85b35da6dccee983a41681212d43e6a59e2cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Fri, 12 Mar 2021 01:36:35 +0000 Subject: [PATCH 5/5] Rebuild libtool. --- parts.rst | 5 +++++ sysa/libtool-1.4/checksums/pass2 | 2 ++ sysa/libtool-1.4/pass2.sh | 19 +++++++++++++++++++ sysa/run.sh | 2 ++ 4 files changed, 28 insertions(+) create mode 100644 sysa/libtool-1.4/checksums/pass2 create mode 100755 sysa/libtool-1.4/pass2.sh diff --git a/parts.rst b/parts.rst index 2d5f1b7..254b951 100644 --- a/parts.rst +++ b/parts.rst @@ -419,6 +419,11 @@ In particular we can now use full featured ``ar`` instead of ``tcc -ar``, the GNU linker ``ld``, which allows us building shared libraries, and the GNU assembler ``as``. +libtool 1.4 +=========== + +Rebuild libtool, so that it uses GNU binutils when creating shared libraries. + musl 1.1.24 (v3) ================ diff --git a/sysa/libtool-1.4/checksums/pass2 b/sysa/libtool-1.4/checksums/pass2 new file mode 100644 index 0000000..92ab87c --- /dev/null +++ b/sysa/libtool-1.4/checksums/pass2 @@ -0,0 +1,2 @@ +23a6e91bff3d5bac9b0317b60bd1c999f94846f62085bf4d227dfa8499120d22 /after/lib/musl/libltdl.a +c247c7c1516ed35414c8b038535969a67ce4bbfd2abdfed85a89941bca09d55d /after/lib/musl/libltdl.la diff --git a/sysa/libtool-1.4/pass2.sh b/sysa/libtool-1.4/pass2.sh new file mode 100755 index 0000000..d7ed680 --- /dev/null +++ b/sysa/libtool-1.4/pass2.sh @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021 Andrius Štikonas +# +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + default_src_prepare + + AUTOCONF=autoconf-2.13 AUTOHEADER=autoheader-2.13 ACLOCAL=aclocal-1.4 AUTOMAKE=automake-1.4 ./bootstrap +} + +src_configure() { + CC=tcc ./configure \ + --prefix="${PREFIX}" \ + --libdir="${PREFIX}/lib/musl" \ + --disable-shared \ + --host=i386-unknown-linux \ + --target=i386-unknown-linux \ + --build=i386-unknown-linux +} diff --git a/sysa/run.sh b/sysa/run.sh index e535ba2..9f0707d 100755 --- a/sysa/run.sh +++ b/sysa/run.sh @@ -89,6 +89,8 @@ build libtool-1.4 pass1.sh checksums/pass1 build binutils-2.14 +build libtool-1.4 pass2.sh checksums/pass2 + # Build musl with fewer patches build musl-1.1.24 binutils-rebuild.sh checksums/pass3 patches-pass3 populate_device_nodes