jinx: rework a bunch of patches and recipes

This commit is contained in:
Matheus
2022-10-25 20:23:11 -03:00
parent 9dd308599b
commit 352b71cba4
28 changed files with 148 additions and 141 deletions
+23
View File
@@ -0,0 +1,23 @@
name=autoconf-archive
revision=1
from_source=autoconf-archive
imagedeps="gcc"
configure() {
${source_dir}/configure --prefix=${prefix}
}
build() {
make -j${parallelism}
}
install() {
make install DESTDIR="${dest_dir}"
}
@@ -109,3 +109,14 @@ diff -ruN gcc-12.1.0/libstdc++-v3/crossconfig.m4 gcc-12.1.0-patched/libstdc++-v3
avr*-*-*)
AC_DEFINE(HAVE_ACOSF)
AC_DEFINE(HAVE_ASINF)
--- gcc-12.1.0/libgcc/libgcov.h 2022-05-06 04:30:59.000000000 -0300
+++ gcc-12.1.0-patched/libgcc/libgcov.h 2022-09-15 17:13:09.406451175 -0300
@@ -25,6 +25,8 @@
#ifndef GCC_LIBGCOV_H
#define GCC_LIBGCOV_H
+#include <stdint.h>
+
/* work around the poisoned malloc/calloc in system.h. */
#ifndef xmalloc
#define xmalloc malloc
-11
View File
@@ -1,11 +0,0 @@
--- gcc-12.1.0/libgcc/libgcov.h 2022-05-06 04:30:59.000000000 -0300
+++ gcc-12.1.0-patched/libgcc/libgcov.h 2022-09-15 17:13:09.406451175 -0300
@@ -25,6 +25,8 @@
#ifndef GCC_LIBGCOV_H
#define GCC_LIBGCOV_H
+#include <stdint.h>
+
/* work around the poisoned malloc/calloc in system.h. */
#ifndef xmalloc
#define xmalloc malloc
-12
View File
@@ -1,12 +0,0 @@
diff -ruN gmp-workdir/configfsf.sub gmp/configfsf.sub
--- gmp-workdir/configfsf.sub 2022-10-10 16:39:29.213128211 -0300
+++ gmp/configfsf.sub 2022-10-10 16:41:00.269794143 -0300
@@ -1690,7 +1690,7 @@
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ gnu* | android* | astral* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
-13
View File
@@ -1,13 +0,0 @@
diff -ruN --no-dereference mlibc-3.0.0-rc1/abis/linux/in.h mlibc/abis/linux/in.h
--- mlibc-3.0.0-rc1/abis/linux/in.h 2022-08-01 15:24:41.000000000 -0300
+++ mlibc/abis/linux/in.h 2022-10-24 16:40:48.153224040 -0300
@@ -67,6 +67,9 @@
#define IPPORT_RESERVED 1024
+#define IP_MULTICAST_TTL 33
+#define IPV6_MULTICAST_HOPS 18
+
#define IPPROTO_IP 0
#define IPPROTO_HOPOPTS 0
#define IPPROTO_ICMP 1
@@ -1,6 +1,66 @@
diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/crt-x86_64/crt0.S mlibc/sysdeps/astral/crt-x86_64/crt0.S
--- mlibc-3.0.0-rc1/sysdeps/astral/crt-x86_64/crt0.S 1969-12-31 21:00:00.000000000 -0300
+++ mlibc/sysdeps/astral/crt-x86_64/crt0.S 2022-10-14 19:09:55.156479915 -0300
diff --git mlibc-clean/abis/linux/in.h mlibc-workdir/abis/linux/in.h
index 3618abf..b1c02c7 100644
--- mlibc-clean/abis/linux/in.h
+++ mlibc-workdir/abis/linux/in.h
@@ -67,6 +67,9 @@ struct ipv6_mreq {
#define IPPORT_RESERVED 1024
+#define IP_MULTICAST_TTL 33
+#define IPV6_MULTICAST_HOPS 18
+
#define IPPROTO_IP 0
#define IPPROTO_HOPOPTS 0
#define IPPROTO_ICMP 1
diff --git mlibc-clean/meson.build mlibc-workdir/meson.build
index 1605b31..b436ca5 100644
--- mlibc-clean/meson.build
+++ mlibc-workdir/meson.build
@@ -135,6 +135,10 @@ elif host_machine.system() == 'dripos'
rtdl_include_dirs += include_directories('sysdeps/dripos/include')
libc_include_dirs += include_directories('sysdeps/dripos/include')
subdir('sysdeps/dripos')
+elif host_machine.system() == 'astral'
+ rtdl_include_dirs += include_directories('sysdeps/astral/include')
+ libc_include_dirs += include_directories('sysdeps/astral/include')
+ subdir('sysdeps/astral')
else
error('No sysdeps defined for OS: ' + host_machine.system())
endif
diff --git mlibc-clean/options/ansi/generic/string-stubs.cpp mlibc-workdir/options/ansi/generic/string-stubs.cpp
index 80f1afd..0f1b4ba 100644
--- mlibc-clean/options/ansi/generic/string-stubs.cpp
+++ mlibc-workdir/options/ansi/generic/string-stubs.cpp
@@ -400,7 +400,6 @@ char *strerror(int e) {
case ENOPROTOOPT: s = "Protocol not available (ENOPROTOOPT)"; break;
case ENOTEMPTY: s = "Directory not empty (ENOTEMPTY)"; break;
case ENOTRECOVERABLE: s = "Sate not recoverable (ENOTRECOVERABLE)"; break;
- case ENOTSUP: s = "Operation not supported (ENOTSUP)"; break;
case ENOTTY: s = "Inappropriate ioctl for device (ENOTTY)"; break;
case EOVERFLOW: s = "Value too large for defined datatype (EOVERFLOW)"; break;
#ifndef __linux__
diff --git mlibc-clean/options/glibc/generic/execinfo.cpp mlibc-workdir/options/glibc/generic/execinfo.cpp
index 3474615..e034881 100644
--- mlibc-clean/options/glibc/generic/execinfo.cpp
+++ mlibc-workdir/options/glibc/generic/execinfo.cpp
@@ -1,9 +1,10 @@
#include <execinfo.h>
#include <bits/ensure.h>
+#include <mlibc/debug.hpp>
int backtrace(void **, int) {
- __ensure(!"Not implemented");
- __builtin_unreachable();
+ mlibc::infoLogger() << "libc: backtrace() is not implemented!\n" << frg::endlog;
+ return 0;
}
char **backtrace_symbols(void *const *, int) {
diff --git mlibc-workdir/sysdeps/astral/crt-x86_64/crt0.S mlibc-workdir/sysdeps/astral/crt-x86_64/crt0.S
new file mode 100644
index 0000000..0a0a4a0
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/crt-x86_64/crt0.S
@@ -0,0 +1,7 @@
+
+.section .text
@@ -9,9 +69,11 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/crt-x86_64/crt0.S mlib
+ mov $main, %rdi
+ call __mlibc_entry
+
diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/astral.cpp mlibc/sysdeps/astral/generic/astral.cpp
--- mlibc-3.0.0-rc1/sysdeps/astral/generic/astral.cpp 1969-12-31 21:00:00.000000000 -0300
+++ mlibc/sysdeps/astral/generic/astral.cpp 2022-10-14 19:09:55.156479915 -0300
diff --git mlibc-workdir/sysdeps/astral/generic/astral.cpp mlibc-workdir/sysdeps/astral/generic/astral.cpp
new file mode 100644
index 0000000..2410961
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/generic/astral.cpp
@@ -0,0 +1,6 @@
+#include <astral/syscall.h>
+
@@ -19,9 +81,11 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/astral.cpp mli
+ long ret;
+ return syscall(SYSCALL_ARCH_CTL, &ret, func, (uint64_t)arg);
+}
diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/entry.cpp mlibc/sysdeps/astral/generic/entry.cpp
--- mlibc-3.0.0-rc1/sysdeps/astral/generic/entry.cpp 1969-12-31 21:00:00.000000000 -0300
+++ mlibc/sysdeps/astral/generic/entry.cpp 2022-10-14 19:09:55.156479915 -0300
diff --git mlibc-workdir/sysdeps/astral/generic/entry.cpp mlibc-workdir/sysdeps/astral/generic/entry.cpp
new file mode 100644
index 0000000..ee7a794
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/generic/entry.cpp
@@ -0,0 +1,34 @@
+
+#include <stdint.h>
@@ -57,9 +121,11 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/entry.cpp mlib
+ exit(result);
+}
+
diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp mlibc/sysdeps/astral/generic/generic.cpp
--- mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp 1969-12-31 21:00:00.000000000 -0300
+++ mlibc/sysdeps/astral/generic/generic.cpp 2022-10-24 14:39:15.416615410 -0300
diff --git mlibc-workdir/sysdeps/astral/generic/generic.cpp mlibc-workdir/sysdeps/astral/generic/generic.cpp
new file mode 100644
index 0000000..60d06e0
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/generic/generic.cpp
@@ -0,0 +1,513 @@
+#include <bits/ensure.h>
+#include <mlibc/debug.hpp>
@@ -574,9 +640,11 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp ml
+
+} // namespace mlibc
+
diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/archctl.h mlibc/sysdeps/astral/include/astral/archctl.h
--- mlibc-3.0.0-rc1/sysdeps/astral/include/astral/archctl.h 1969-12-31 21:00:00.000000000 -0300
+++ mlibc/sysdeps/astral/include/astral/archctl.h 2022-10-14 19:09:55.156479915 -0300
diff --git mlibc-workdir/sysdeps/astral/include/astral/archctl.h mlibc-workdir/sysdeps/astral/include/astral/archctl.h
new file mode 100644
index 0000000..f181400
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/include/astral/archctl.h
@@ -0,0 +1,11 @@
+#ifndef _ASTRAL_SYSCALL_ARCHCTL_INCLUDE
+#define _ASTRAL_SYSCALL_ARCHCTL_INCLUDE
@@ -589,9 +657,11 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/archctl
+int arch_ctl(int func, void* arg);
+
+#endif
diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall.h mlibc/sysdeps/astral/include/astral/syscall.h
--- mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall.h 1969-12-31 21:00:00.000000000 -0300
+++ mlibc/sysdeps/astral/include/astral/syscall.h 2022-10-24 14:23:23.999956413 -0300
diff --git mlibc-workdir/sysdeps/astral/include/astral/syscall.h mlibc-workdir/sysdeps/astral/include/astral/syscall.h
new file mode 100644
index 0000000..d930887
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/include/astral/syscall.h
@@ -0,0 +1,69 @@
+#ifndef _SYSCALL_H_INCLUDE
+#define _SYSCALL_H_INCLUDE
@@ -662,9 +732,11 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall
+}
+
+#endif
diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/meson.build mlibc/sysdeps/astral/meson.build
--- mlibc-3.0.0-rc1/sysdeps/astral/meson.build 1969-12-31 21:00:00.000000000 -0300
+++ mlibc/sysdeps/astral/meson.build 2022-10-20 13:32:44.079544558 -0300
diff --git mlibc-workdir/sysdeps/astral/meson.build mlibc-workdir/sysdeps/astral/meson.build
new file mode 100644
index 0000000..8f0c60b
--- /dev/null
+++ mlibc-workdir/sysdeps/astral/meson.build
@@ -0,0 +1,65 @@
+
+rtdl_sources += files(
-13
View File
@@ -1,13 +0,0 @@
--- mlibc-2.3.0/meson.build 2022-06-20 06:58:47.000000000 -0300
+++ mlibc-2.3.0-patched/meson.build 2022-09-14 17:04:01.893118263 -0300
@@ -142,6 +142,10 @@
rtdl_include_dirs += include_directories('sysdeps/dripos/include')
libc_include_dirs += include_directories('sysdeps/dripos/include')
subdir('sysdeps/dripos')
+elif host_machine.system() == 'astral'
+ rtdl_include_dirs += include_directories('sysdeps/astral/include')
+ libc_include_dirs += include_directories('sysdeps/astral/include')
+ subdir('sysdeps/astral')
else
error('No sysdeps defined for OS: ' + host_machine.system())
endif
-27
View File
@@ -1,27 +0,0 @@
diff -ruN --no-dereference mlibc-3.0.0-rc1/options/ansi/generic/string-stubs.cpp mlibc/options/ansi/generic/string-stubs.cpp
--- mlibc-3.0.0-rc1/options/ansi/generic/string-stubs.cpp 2022-08-01 15:24:41.000000000 -0300
+++ mlibc/options/ansi/generic/string-stubs.cpp 2022-10-14 19:09:55.153146583 -0300
@@ -400,7 +400,6 @@
case ENOPROTOOPT: s = "Protocol not available (ENOPROTOOPT)"; break;
case ENOTEMPTY: s = "Directory not empty (ENOTEMPTY)"; break;
case ENOTRECOVERABLE: s = "Sate not recoverable (ENOTRECOVERABLE)"; break;
- case ENOTSUP: s = "Operation not supported (ENOTSUP)"; break;
case ENOTTY: s = "Inappropriate ioctl for device (ENOTTY)"; break;
case EOVERFLOW: s = "Value too large for defined datatype (EOVERFLOW)"; break;
#ifndef __linux__
diff -ruN --no-dereference mlibc-3.0.0-rc1/options/glibc/generic/execinfo.cpp mlibc/options/glibc/generic/execinfo.cpp
--- mlibc-3.0.0-rc1/options/glibc/generic/execinfo.cpp 2022-08-01 15:24:41.000000000 -0300
+++ mlibc/options/glibc/generic/execinfo.cpp 2022-10-20 20:57:28.068361171 -0300
@@ -1,9 +1,10 @@
#include <execinfo.h>
#include <bits/ensure.h>
+#include <mlibc/debug.hpp>
int backtrace(void **, int) {
- __ensure(!"Not implemented");
- __builtin_unreachable();
+ mlibc::infoLogger() << "libc: backtrace() is not implemented!\n" << frg::endlog;
+ return 0;
}
char **backtrace_symbols(void *const *, int) {
-12
View File
@@ -1,12 +0,0 @@
diff -ruN mpc-workdir/build-aux/config.sub mpc/build-aux/config.sub
--- mpc-workdir/build-aux/config.sub 2022-10-10 16:41:29.463127241 -0300
+++ mpc/build-aux/config.sub 2022-10-10 16:42:52.139793243 -0300
@@ -1338,7 +1338,7 @@
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
# sysv* is not here because it comes later, after sysvr4.
- gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ gnu* | astral* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | kopensolaris* | plan9* \
-12
View File
@@ -1,12 +0,0 @@
diff -ruN mpfr-workdir/config.sub mpfr/config.sub
--- mpfr-workdir/config.sub 2022-10-10 16:44:45.379792331 -0300
+++ mpfr/config.sub 2022-10-10 16:45:13.056458775 -0300
@@ -1363,7 +1363,7 @@
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ -gnu* | -astral* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
-12
View File
@@ -1,12 +0,0 @@
diff -ruN nano-clean/config.sub nano/config.sub
--- nano-clean/config.sub 2022-10-14 15:55:43.969908662 -0300
+++ nano/config.sub 2022-10-14 16:21:27.313230016 -0300
@@ -1718,7 +1718,7 @@
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ gnu* | android* | astral* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+1 -1
View File
@@ -1,7 +1,7 @@
name=coreutils
revision=1
from_source=coreutils
imagedeps="base-devel"
imagedeps="base-devel gperf"
hostdeps="gcc-cross binutils-cross"
deps="mlibc"
+8
View File
@@ -0,0 +1,8 @@
name=autoconf-archive
version=2022.09.03
source_method=tarball
tarball_url="https://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-${version}.tar.xz"
tarball_sha512=157b5b6a979d5ec5bfab6ddf34422da620fec1e95f4c901821abbb7361544af77747b4a449029b84750d75679d6130a591e98da8772de2c121ecdea163f0340b
regenerate() {
true
}
+2 -1
View File
@@ -3,6 +3,7 @@ version=9.1
source_method=tarball
tarball_url="https://ftp.gnu.org/gnu/coreutils/coreutils-${version}.tar.xz"
tarball_sha512=a6ee2c549140b189e8c1b35e119d4289ec27244ec0ed9da0ac55202f365a7e33778b1dc7c4e64d1669599ff81a8297fe4f5adbcc8a3a2f75c919a43cd4b9bdfa
hostdeps="autoconf automake pkgconfig libtool"
regenerate() {
true
autoreconf -fvi
}
+2 -1
View File
@@ -3,6 +3,7 @@ version=6.2.1
source_method=tarball
tarball_url="https://gmplib.org/download/gmp/gmp-${version}.tar.xz"
tarball_sha512=c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84
hostdeps="autoconf automake libtool pkgconfig"
regenerate() {
true
autoreconf -vfi
}
+2 -1
View File
@@ -3,6 +3,7 @@ version=1.2.1
source_method=tarball
tarball_url="https://ftp.gnu.org/gnu/mpc/mpc-${version}.tar.gz"
tarball_sha512=3279f813ab37f47fdcc800e4ac5f306417d07f539593ca715876e43e04896e1d5bceccfb288ef2908a3f24b760747d0dbd0392a24b9b341bc3e12082e5c836ee
hostdeps="autoconf automake libtool pkgconfig"
regenerate() {
true
autoreconf -fvi
}
+2 -1
View File
@@ -3,6 +3,7 @@ version=4.1.0
source_method=tarball
tarball_url="https://www.mpfr.org/mpfr-current/mpfr-${version}.tar.xz"
tarball_sha512=1bd1c349741a6529dfa53af4f0da8d49254b164ece8a46928cdb13a99460285622d57fe6f68cef19c6727b3f9daa25ddb3d7d65c201c8f387e421c7f7bee6273
hostdeps="autoconf automake libtool pkgconfig autoconf-archive"
regenerate() {
true
autoreconf -vfi
}
+2 -1
View File
@@ -3,6 +3,7 @@ version=6.4
source_method=tarball
tarball_url="https://ftp.gnu.org/gnu/nano/nano-${version}.tar.gz"
tarball_sha512=340317fa2e068c5b10ea40c30298e972b406c5b81a987ec0a1fea73a516a09b02b6dcf96ed503236710a04889860369de5c462d555aaa9dbba9ff3a3735fde35
hostdeps="autoconf automake libtool pkgconfig"
regenerate() {
true
autoreconf -vfi
}
+1 -1
View File
@@ -4,5 +4,5 @@ source_method=tarball
tarball_url="https://www.nasm.us/pub/nasm/releasebuilds/${version}/nasm-${version}.tar.xz"
tarball_sha512=512f90a2584f1c5811429274b97c64a2cedf37b9fdeffb1bcd0ea64afd9ecc19a2d7877ca8f1e05393aa324153fc9f39ea51dacbf8d25a7d5a2d7728c925dba7
regenerate() {
true
true
}
+1 -1
View File
@@ -4,5 +4,5 @@ source_method=tarball
tarball_url="https://ftp.gnu.org/gnu/ncurses/ncurses-${version}.tar.gz"
tarball_sha512=5373f228cba6b7869210384a607a2d7faecfcbfef6dbfcd7c513f4e84fbd8bcad53ac7db2e7e84b95582248c1039dcfc7c4db205a618f7da22a166db482f0105
regenerate() {
true
true
}