Regenerate musl 1.1 using musl-chartable-tools

This commit is contained in:
fosslinux 2025-02-03 15:55:04 +11:00
parent bd4051d110
commit 838051151c
5 changed files with 99 additions and 0 deletions

View file

@ -0,0 +1,21 @@
SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: MIT
(as per https://github.com/richfelker/musl-chartable-tools/issues/3)
For musl-chartable-tools.
For the earliest build where we use this, cut is bugged (always says out of
memory). We replace the cut command with equivalent sed commands.
--- musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/iconv/Makefile 2024-12-21 12:45:54.752170920 +1100
+++ musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/iconv/Makefile 2024-12-21 12:49:07.040155495 +1100
@@ -12,7 +12,7 @@
legacychars.h: arrayify $(CHARMAPS)
cat $(CHARMAPS) \
| grep -v '^0x.. 0x00..' | grep ^0x[0123456789ABCDEFabcdef] \
- | cut -d' ' -f2 | tr a-z A-Z | sort -u \
+ | sed 's/[^\t]*\t//' | sed 's/\t.*//' | tr a-z A-Z | sort -u \
| ./arrayify > $@
mkcodepage: mkcodepage.c legacychars.h

View file

@ -0,0 +1,53 @@
SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: MIT
diff --color -ru include/wchar.h include/wchar.h
--- musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wchar.h 2024-12-21 11:29:46.207537390 +1100
+++ musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wchar.h 2024-12-21 12:03:00.494377416 +1100
@@ -175,10 +175,7 @@
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
int wcwidth (wchar_t);
int wcswidth (const wchar_t *, size_t);
-int iswalnum(wint_t);
-int iswalpha(wint_t);
int iswblank(wint_t);
-int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
@@ -187,9 +184,6 @@
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
-int iswctype(wint_t, wctype_t);
-wint_t towlower(wint_t);
-wint_t towupper(wint_t);
wctype_t wctype(const char *);
#ifndef __cplusplus
diff --color -ru include/wctype.h include/wctype.h
--- musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wctype.h 2024-12-21 11:29:46.207537390 +1100
+++ musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85/include/wctype.h 2024-12-21 12:07:48.030354351 +1100
@@ -24,10 +24,7 @@
#undef iswdigit
-int iswalnum(wint_t);
-int iswalpha(wint_t);
int iswblank(wint_t);
-int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
@@ -36,10 +33,6 @@
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
-int iswctype(wint_t, wctype_t);
-wint_t towctrans(wint_t, wctrans_t);
-wint_t towlower(wint_t);
-wint_t towupper(wint_t);
wctrans_t wctrans(const char *);
wctype_t wctype(const char *);

View file

@ -5,6 +5,18 @@
src_prepare() {
default
# regenerate headers in src/ctype and src/iconv
cd ../musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85
patch -Np1 -i ../../files/cut.patch
cd ctype
CC=tcc make
cp alpha.h punct.h nonspacing.h wide.h ../../musl-1.1.24/src/ctype/
cd ../iconv
CC=tcc make
cp legacychars.h codepages.h jis0208.h gb18030.h hkscs.h ksc.h revjis.h \
../../musl-1.1.24/src/locale/
cd ../../musl-1.1.24
# tcc does not support complex types
rm -rf src/complex

View file

@ -5,6 +5,18 @@
src_prepare() {
default
# regenerate headers in src/ctype and src/iconv
cd ../musl-chartable-tools-44d780e03e78efcb3168ceab068170206dc92e85
patch -Np1 -i ../../files/cut.patch
cd ctype
CC=tcc make
cp alpha.h punct.h nonspacing.h wide.h ../../musl-1.1.24/src/ctype/
cd ../iconv
CC=tcc make
cp legacychars.h codepages.h jis0208.h gb18030.h hkscs.h ksc.h revjis.h \
../../musl-1.1.24/src/locale/
cd ../../musl-1.1.24
# tcc does not support complex types
rm -rf src/complex
}

View file

@ -1 +1,2 @@
https://musl.libc.org/releases/musl-1.1.24.tar.gz 1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
git://github.com/richfelker/musl-chartable-tools~44d780e03e78efcb3168ceab068170206dc92e85 https://github.com/richfelker/musl-chartable-tools/archive/44d780e03e78efcb3168ceab068170206dc92e85.tar.gz 952eae3ee6da3cbc5c29faa2ac728b882d5d43e744bca31daae98c66739ea121