commit: 7a4ca8e634fad3b36e7e97525c29f9a2eb0836ed
parent f3cea25b87c917c72680a1f9d433f238015019f7
Author: Andrius Štikonas <andrius@stikonas.eu>
Date: Wed, 3 Mar 2021 00:54:17 +0000
Rebuild tcc against new musl.
Diffstat:
5 files changed, 61 insertions(+), 4 deletions(-)
diff --git a/parts.rst b/parts.rst
@@ -408,9 +408,14 @@ 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``.
-musl 1.1.24
-===========
+musl 1.1.24 (v3)
+================
We rebuild musl for the third time. This time we use GNU ar rather than ``tcc -ar``,
so we can drop weak symbols patch. Also, we can use GNU as to build assembly source files,
so those assembly files that tcc failed to compile no longer have to be patched.
+
+tcc 0.9.27 (musl v3)
+====================
+
+We rebuild tcc against new musl and without a patch to ignore duplicate symbols.
diff --git a/sysa/run.sh b/sysa/run.sh
@@ -88,4 +88,7 @@ build binutils-2.14
build musl-1.1.24 binutils-rebuild.sh checksums/pass3 patches-pass3
populate_device_nodes
+# Rebuild tcc-musl using new musl
+build tcc-0.9.27 tcc-musl-pass3.sh checksums/tcc-musl-pass3
+
echo "Bootstrapping completed."
diff --git a/sysa/tcc-0.9.27/checksums/tcc-musl-pass3 b/sysa/tcc-0.9.27/checksums/tcc-musl-pass3
@@ -0,0 +1,2 @@
+f8023d637f64e1e739b5f381a000eafb0f2e500dc7967ebd90642d4a13c755f8 /after/bin/tcc-musl
+a650b13efc65073fb851e9db89728089d8845c401f85faaa09801874ab058089 /after/lib/tcc/libtcc1.a
diff --git a/sysa/tcc-0.9.27/tcc-musl-pass2.sh b/sysa/tcc-0.9.27/tcc-musl-pass2.sh
@@ -37,8 +37,8 @@ src_compile() {
tcc.c
# libtcc1.a
- ${TCC} -c -D HAVE_CONFIG_H=1 lib/libtcc1.c
- ${TCC} -ar cr libtcc1.a libtcc1.o
+ tcc-musl -c -D HAVE_CONFIG_H=1 lib/libtcc1.c
+ tcc-musl -ar cr libtcc1.a libtcc1.o
}
src_install() {
diff --git a/sysa/tcc-0.9.27/tcc-musl-pass3.sh b/sysa/tcc-0.9.27/tcc-musl-pass3.sh
@@ -0,0 +1,47 @@
+# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
+# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+src_unpack() {
+ cp -r ../src/tcc-0.9.27 .
+}
+
+src_prepare() {
+ :
+}
+
+src_compile() {
+ export prefix=/after
+ export libdir=${prefix}/lib/musl
+ export incdir=${prefix}/include/musl
+ export bindir=${prefix}/bin
+
+ mkdir -p ${libdir}/tcc
+
+ tcc-musl \
+ -v \
+ -static \
+ -o tcc-musl \
+ -D TCC_TARGET_I386=1 \
+ -D CONFIG_TCCDIR=\"${libdir}/tcc\" \
+ -D CONFIG_TCC_CRTPREFIX=\"${libdir}\" \
+ -D CONFIG_TCC_ELFINTERP=\"/musl/loader\" \
+ -D CONFIG_TCC_LIBPATHS=\"${libdir}:${libdir}/tcc\" \
+ -D CONFIG_TCC_SYSINCLUDEPATHS=\"${incdir}\" \
+ -D TCC_LIBGCC=\"${libdir}/libc.a\" \
+ -D CONFIG_TCC_STATIC=1 \
+ -D CONFIG_USE_LIBGCC=1 \
+ -D TCC_VERSION=\"0.9.27\" \
+ -D ONE_SOURCE=1 \
+ tcc.c
+
+ # libtcc1.a
+ tcc-musl -c -D HAVE_CONFIG_H=1 lib/libtcc1.c
+ ar cr libtcc1.a libtcc1.o
+}
+
+src_install() {
+ install tcc-musl ${bindir}
+ install -m 644 libtcc1.a ${libdir}
+}