Rebuild tcc against new musl.

This commit is contained in:
Andrius Štikonas 2021-03-03 00:54:17 +00:00
parent f3cea25b87
commit 7a4ca8e634
5 changed files with 61 additions and 4 deletions

View File

@ -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.

View File

@ -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."

View File

@ -0,0 +1,2 @@
f8023d637f64e1e739b5f381a000eafb0f2e500dc7967ebd90642d4a13c755f8 /after/bin/tcc-musl
a650b13efc65073fb851e9db89728089d8845c401f85faaa09801874ab058089 /after/lib/tcc/libtcc1.a

View File

@ -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() {

View File

@ -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}
}