Update zig, and go notes

This commit is contained in:
Wildan Mubarok 2025-09-07 18:18:18 +00:00
parent 63643dbf63
commit c37ddfdfe3
2 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
#TODO: Can be built, but ends in breakpoint trap
#TODO compiling, not tested further
[source]
git = "https://github.com/willnode/go"
branch = "go-1.25-redox"

View File

@ -1,4 +1,4 @@
#TODO requires openat functions and posix_getdents to compile
#TODO compiling, not tested further
[source]
git = "https://github.com/willnode/zig"
branch = "zig-0.15-redox"
@ -8,14 +8,15 @@ template = "custom"
script = """
DYNAMIC_INIT
rsync -av --delete "${COOKBOOK_SOURCE}"/* ./
export ZIG_BOOTSTRAP_CFLAGS="$CFLAGS"
export ZIG_BOOTSTRAP_LDFLAGS="$LDFLAGS"
export ZIG_BOOTSTRAP_TARGET_CC="${TARGET}-gcc"
export ZIG_HOST_TARGET_CFLAGS="$CFLAGS"
export ZIG_HOST_TARGET_LDFLAGS="$LDFLAGS"
export ZIG_HOST_TARGET_CC="${TARGET}-gcc"
export ZIG_HOST_TARGET_TRIPLE="${TARGET%%-*}-redox"
unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF RUSTFLAGS STRIP
cc bootstrap.c -o ./bootstrap
./bootstrap
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -v "zig2" "${COOKBOOK_STAGE}/usr/bin/zig"
mkdir -p "${COOKBOOK_STAGE}"/usr/bin
cp ./zig2 "${COOKBOOK_STAGE}"/usr/bin/zig
"""