Rebuild musl with fewer patches.

This commit is contained in:
Andrius Štikonas 2021-03-03 00:05:33 +00:00
parent 5ef1baeccf
commit f3cea25b87
8 changed files with 55 additions and 1 deletions

View File

@ -407,3 +407,10 @@ managing binary programs, object files, libraries, profile data, and assembly so
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
===========
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.

View File

@ -22,7 +22,7 @@ build () {
cd "$pkg" || (echo "Cannot cd into ${pkg}!"; kill $$)
echo "${pkg}: beginning build using script ${script_name}"
base_dir="${PWD}"
patch_dir="${base_dir}/patches"
patch_dir="${base_dir}/${4:-patches}"
mk_dir="${base_dir}/mk"
files_dir="${base_dir}/files"

View File

@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default_src_prepare
# tcc does not support complex types
rm -rf src/complex
}
src_configure() {
CC=tcc ./configure \
--host=i386 \
--disable-shared \
--prefix=/after \
--libdir=/after/lib/musl/ \
--includedir=/after/include/musl
# configure script creates this file
test -f /dev/null && rm /dev/null
}
src_compile() {
make CROSS_COMPILE= CFLAGS="-DSYSCALL_NO_TLS" AS_CMD='as -o $@ $<'
}

View File

@ -0,0 +1,14 @@
a50500329680bed4dcc5ec3891fd50f65af9cae7de0b8e8fe925c37f1c6bb16b /after/lib/musl/Scrt1.o
457fff81b3188b82621f3ae49847ebc60128017fcbdba012245169af76cf122a /after/lib/musl/crt1.o
73f64b61e6e9ae83726ab4cc909a7b549b06b6df2b087aedddbcd39cb7146f69 /after/lib/musl/crti.o
f5e325819d86fb381574692b8f9ea24f88f44f185a75adfe461705ecf2619c6e /after/lib/musl/crtn.o
a18d576a501a596ffe67df13eeededeca0d61da42100b9b5687be3d479379641 /after/lib/musl/libc.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/libcrypt.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/libdl.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/libm.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/libpthread.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/libresolv.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/librt.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/libutil.a
f0a17a43c74d2fe5474fa2fd29c8f14799e777d7d75a2cc4d11c20a6e7b161c5 /after/lib/musl/libxnet.a
b60b59a94f10f039977cea2cea6f15b55b402b25df2e1b2a4e83fa84ccf2fd43 /after/lib/musl/rcrt1.o

View File

@ -0,0 +1 @@
../patches/set_thread_area.patch

View File

@ -0,0 +1 @@
../patches/tcc_static.patch

View File

@ -0,0 +1 @@
../patches/va_list.patch

View File

@ -84,4 +84,8 @@ build autoconf-2.12
build binutils-2.14
# Build musl with fewer patches
build musl-1.1.24 binutils-rebuild.sh checksums/pass3 patches-pass3
populate_device_nodes
echo "Bootstrapping completed."