Merge pull request #268839 from emilytrau/minimal-mes-0.25

minimal-bootstrap.mes: 0.24.2 -> 0.25
This commit is contained in:
Emily Trau 2023-11-30 09:00:58 +11:00 committed by GitHub
commit dc55b556b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1069 additions and 40 deletions

View file

@ -163,7 +163,7 @@ lib.makeScope
ln-boot = callPackage ./ln-boot { };
mes = lib.recurseIntoAttrs (callPackage ./mes { });
mes = callPackage ./mes { };
mes-libc = callPackage ./mes/libc.nix { };
musl11 = callPackage ./musl/1.1.nix {

View file

@ -2,22 +2,21 @@
, fetchurl
, callPackage
, kaem
, m2libc
, mescc-tools
}:
# Maintenance note:
# Build steps have been adapted from build-aux/bootstrap.sh.in
# as well as the live-bootstrap project
# https://github.com/fosslinux/live-bootstrap/blob/1bc4296091c51f53a5598050c8956d16e945b0f5/sysa/mes-0.24.2/mes-0.24.2.kaem
# https://github.com/fosslinux/live-bootstrap/blob/737bf61a26152fb82510a2797f0d712de918aa78/sysa/mes-0.25/mes-0.25.kaem
let
pname = "mes";
version = "0.24.2";
version = "0.25";
src = fetchurl {
url = "mirror://gnu/mes/mes-${version}.tar.gz";
sha256 = "0vp8v88zszh1imm3dvdfi3m8cywshdj7xcrsq4cgmss69s2y1nkx";
hash = "sha256-MlJQs1Z+2SA7pwFhyDWvAQeec+vtl7S1u3fKUAuCiUA=";
};
nyacc = callPackage ./nyacc.nix { inherit nyacc; };
@ -68,11 +67,6 @@ let
cp mes/module/srfi/srfi-9-struct.mes mes/module/srfi/srfi-9.mes
cp mes/module/srfi/srfi-9/gnu-struct.mes mes/module/srfi/srfi-9/gnu.mes
# Fixes to support newer M2-Planet
catm x86_defs.M1 ${m2libc}/x86/x86_defs.M1 lib/m2/x86/x86_defs.M1
cp x86_defs.M1 lib/m2/x86/x86_defs.M1
rm x86_defs.M1
# Remove environment impurities
__GUILE_LOAD_PATH="\"''${MES_PREFIX}/mes/module:''${MES_PREFIX}/module:${nyacc.guilePath}\""
boot0_scm=mes/module/mes/boot-0.scm
@ -109,9 +103,7 @@ let
cp ''${mescc_in} ''${bin}/bin/mescc.scm
# Build mes-m2
mes_cpu=x86
stage0_cpu=x86
kaem --verbose --strict --file kaem.run
kaem --verbose --strict --file kaem.x86
cp bin/mes-m2 ''${bin}/bin/mes-m2
chmod 555 ''${bin}/bin/mes-m2
'';
@ -232,6 +224,6 @@ let
${lib.concatMapStringsSep " " (getRes ".o") (map compile mes_SOURCES)}
'';
in {
inherit srcPost srcPrefix nyacc;
inherit src srcPost srcPrefix nyacc;
inherit compiler libs;
}

View file

@ -19,10 +19,9 @@ COMPILERS="mescc gcc"
format() {
echo -n "[ "
# Terrible hack to convert a newline-delimited string to space-delimited
echo $* | xargs printf '"%s" '
echo -n "]"
echo "["
echo $* | xargs printf ' "%s"\n'
echo " ]"
}
gen_sources() {
@ -38,12 +37,12 @@ gen_sources() {
cat <<EOF
$mes_cpu.$mes_kernel.$compiler = {
libc_mini_SOURCES = $(format $libc_mini_SOURCES);
libmescc_SOURCES = $(format $libmescc_SOURCES);
libtcc1_SOURCES = $(format $libtcc1_SOURCES);
libc_SOURCES = $(format $libc_SOURCES);
libc_tcc_SOURCES = $(format $libc_tcc_SOURCES);
libc_gnu_SOURCES = $(format $libc_gnu_SOURCES);
mes_SOURCES = $(format $mes_SOURCES);
libmescc_SOURCES = $(format $libmescc_SOURCES);
libtcc1_SOURCES = $(format $libtcc1_SOURCES);
libc_SOURCES = $(format $libc_SOURCES);
libc_tcc_SOURCES = $(format $libc_tcc_SOURCES);
libc_gnu_SOURCES = $(format $libc_gnu_SOURCES);
mes_SOURCES = $(format $mes_SOURCES);
};
EOF
}

View file

@ -6,8 +6,8 @@
let
pname = "nyacc";
# NYACC is a tightly coupled dependency of mes. This version is known to work
# with mes 0.24.2.
# https://git.savannah.gnu.org/cgit/mes.git/tree/INSTALL?h=v0.24.2&id=7562330ec746f09b4060d3081e3377fb7083897d#n31
# with mes 0.25.
# https://git.savannah.gnu.org/cgit/mes.git/tree/INSTALL?h=v0.25#n31
version = "1.00.2";
src = fetchurl {

File diff suppressed because one or more lines are too long