update and get everything working again

This commit is contained in:
Connor Olding 2023-09-07 16:17:51 -07:00
parent 627138ad99
commit 346880ece3
5 changed files with 24 additions and 31 deletions

View File

@ -9,16 +9,12 @@ if [ ! -e /cosmopolitan-bootstrap.done ]; then
&& export V=0 COLUMNS=80 TMPDIR=/tmp \
&& install -m0755 build/bootstrap/ape.elf /usr/bin/ape \
\
&& sed -i 's/skip=" 76" count=" 128"/skip=76 count=128 /' build/bootstrap/*.com \
&& shed build/config.mk 's/-march=native/-march=haswell -mno-pclmul -mtune=generic/' \
&& shed Makefile \
'/\bNET_HTTP\b/i\\tTHIRD_PARTY_LINENOISE\t\t\\' \
'/\bNET_HTTP\b/i\\tTOOL_ARGS\t\t\\' \
&& shed libc/elf/elf.h '/"libc\/elf\/struct\/ehdr.h"/i\\#include "libc/elf/struct/dyn.h"' \
&& shed third_party/awk/main.c '/pledge.*{/,/}/d' \
&& shed libc/calls/unveil.c \
'/^ if (landlock_abi_version == -1) {/i\
landlock_abi_version = landlock_create_ruleset(0, 0, LANDLOCK_CREATE_RULESET_VERSION);' \
\
&& { [ "$COSMO_FLAVOR" != def ] && mode="$COSMO_FLAVOR" || mode= ;} \
&& printf '%s="%s"\n' >env \

View File

@ -7,22 +7,21 @@ if [ ! -e /cosmopolitan-install.done ]; then
&& export mode \
\
&& { [ ! -d dist ] || rm -r dist ;} \
&& mkdir -p "dist/$flavor/public" \
&& mkdir -p "dist/$flavor" \
&& expand cp -int "dist/$flavor" \
a//ape-copy-self.o a//ape-no-modify-self.o a//ape.elf \
a//ape.lds a//ape.macho a//ape.o \
o//cosmopolitan.a o//libc/crt/crt.o o/cosmopolitan.h \
&& cp -int "dist/$flavor/public" "o/$mode/ape/public/ape.lds" \
\
&& install -m0755 "dist/$flavor/ape.elf" /usr/bin/ape \
&& install -m0755 -t /usr/bin tool/scripts/cosmocc tool/scripts/cosmoc++ \
&& install -m0755 -t /usr/bin bin/cosmocc bin/cosmoc++ \
&& find libc -name '*.h' >headers.txt \
&& expand tar zcf /tmp/headers.tar.gz -T headers.txt \
libc/integral T//gdtoa/gdtoa.h T//getopt/long.h \
T//linenoise/linenoise.h T//musl/crypt.h T//musl/fnmatch.h \
T//musl/lockf.h T//musl/passwd.h T//musl/rand48.h \
T//musl/tempnam.h T//regex/regex.h T//zlib/zconf.h \
T//zlib/zlib.h \
libc/integral T//gdtoa/gdtoa.h T//getopt/long1.h \
T//getopt/long2.h T//linenoise/linenoise.h T//musl/crypt.h \
T//musl/fnmatch.h T//musl/lockf.h T//musl/passwd.h \
T//musl/rand48.h T//musl/tempnam.h T//regex/regex.h \
T//zlib/zconf.h T//zlib/zlib.h \
\
&& { ! [ -d "$COSMO" ] || rm -r "$COSMO" ;} \
&& mkdir -p "$COSMO" /tmp/bin \
@ -45,6 +44,12 @@ if [ ! -e /cosmopolitan-install.done ]; then
&& dedupe /tmp/bin "$COSMO/bin/" \
&& cp "dist/$flavor/ape.elf" "$COSMO/bin/ape" \
&& cp /root/cosmopolitan/env "$COSMO/env" \
\
&& mkdir -p "$COSMO/lib" \
&& for lib in c dl gcc_s m pthread resolv rt dl z stdc++ \
;do : \
&& printf '\041\074\141\162\143\150\076\012' >"$COSMO/lib/lib$lib.a" \
;done \
\
&& rm -r /root/cosmopolitan/dist \
&& tar zxf "/tmp/headers.tar.gz" -C "$COSMO" \

View File

@ -21,6 +21,7 @@ if [ ! -e /cosmopolitan.done ]; then
&& skip() { mkdir -p "${1%/*}" && touch -d @2222222222 "$1" ;} \
&& skip "o/$mode/test/libc/calls/getgroups_test.com.runs" \
&& `#skip "o/$mode/test/libc/calls/getpriority_test.com.runs"` \
&& skip "o/$mode/test/libc/calls/open_test.com.runs" \
&& `#skip "o/$mode/test/libc/stdio/tmpfile_test.com.runs"` \
&& `#skip "o/$mode/third_party/python/Lib/test/test_ioctl.py.runs"` `# SIGSEGV` \
&& skip "o/$mode/third_party/python/Lib/test/test_tarfile.py.runs" \

View File

@ -10,8 +10,8 @@ unset SSH_CLIENT SSH_CONNECTION
export \
BUSYBOX_SHA256=b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314 \
BUSYBOX_VERSION=1.36.1 \
COSMO_COMMIT=929478c524eb3f4ae9f906daab56affb0315feb5 \
COSMO_SHA256=2bfc0a843327bfac060a5a5b072df7ab296ad37d8dd1590a607d3c0e8e7cb101 \
COSMO_COMMIT=032b1f3449f0103d5f58ac43a9479a2fd850fa49 \
COSMO_SHA256=fbedf752603f03b3eb2efc5e7d221ad60e8e0ac7281ab6f4a34eefa255c29d33 \
ENDLESSH_COMMIT=dfe44eb2c5b6fc3c48a39ed826fe0e4459cdf6ef \
ENDLESSH_SHA256=c8989988af0a8c848d1a4979962f008c504a12ed6fe6a12e032c37feaa0ae5f8 \
GMP_SHA256=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 \
@ -20,8 +20,8 @@ HEATSHRINK_COMMIT=7d419e1fa4830d0b919b9b6a91fe2fb786cf3280 \
HEATSHRINK_SHA256=b18a1b7ad6f51eac7ac1a81ca072703bd21d6d8727c05cd505843643705af65d \
KISSAT_COMMIT=0865f474689b4e38a1c327ee03da8a0051c44b9e \
KISSAT_SHA256=e0cfaa89710cd8b4d49b70b786a871331f483db78bbfbf329a7b826b8093c8cf \
KUROKO_COMMIT=c24a1ca633ef6c77bd22f63f71058841849d0ee1 \
KUROKO_SHA256=64e0ec28956378158175df87e061d131084a9d7b7ea7201267d6ba6fb9c66d9d \
KUROKO_COMMIT=d6486b590a075911abf18c854d57c2c3a71d2ca3 \
KUROKO_SHA256=4064a1eba35935011b4bc43639e4330b7903b56a11015b3556a30e0d0fb5ad1f \
LR_COMMIT=5af9b79e4ecd07a600ded1a801023536cde97f95 \
LR_SHA256=3901287cdcf09d0d8f77f8aaa19ca24e9a873d904e201ab8e7bf102426607dcc \
MUON_COMMIT=e9af35467ffea9edf567a71cc6c31787327de994 \
@ -30,8 +30,8 @@ SELFIE_COMMIT=22ed35605d46b95f23c8ceb6ec2e1b2fee93525d \
SELFIE_SHA256=8e73d7770fc9217e98f85685780d6a487c7896baf9a174982f00acec3615a6bf \
XE_COMMIT=8a2a4899769335bc14c62aef12cdf26f2f487f2a \
XE_SHA256=f1ac997912c9be92a74a67a766dde74d1f9b6b20e48d7c7e71598ad4b787b37d \
YICES_COMMIT=5a3e3f0fabf7d588c5adf1f791b26a590eac547f \
YICES_SHA256=46f6575418466b73b06d6f06011eea2824a0726787ff4ef441ec3bad25736062 \
YICES_COMMIT=6903281942d9ea67f09a1dd493167ce2bc466b87 \
YICES_SHA256=32a38b1c22adc4df7030e039f43bd5c51486136fcb41665554cace6525265114 \
;
if [ ! -e /notwa-util.done ]; then
@ -61,6 +61,9 @@ sed \
-e 's,/o/$MODE/,/,g' \
-e 's,/ape/,/dist/$MODE/,g' \
-e "s,\$MODE\\b,$MODE,g" \
-e "s,/opt/cosmos\\b,/opt/cosmo,g" \
-e "s,/o//tool/build/,/bin/,g" \
-e "s,.* must not contain hyphens .*,:," \
-i /usr/bin/cosmocc
cd /root && export PATH="$COSMO/bin:$COSMO/gcc/bin:$PATH" || exit $?
@ -80,7 +83,7 @@ unset CC CFLAGS MODE mode
&& for com in \
`# endlessh/endlessh.com` \
`# heatshrink/heatshrink.com` \
`# kissat/build/kissat.com` \
kissat/build/kissat.com \
kuroko/kuroko.com \
`#lr/lr.com` \
`#muon/build/muon.com` \

View File

@ -67,18 +67,6 @@
return 0;
} else {
struct addrinfo *result;
--- kuroko.orig/src/os.c
+++ kuroko/src/os.c
@@ -21,7 +21,9 @@
#include <kuroko/util.h>
/* Did you know this is actually specified to not exist in a header? */
+#ifndef COSMOPOLITAN_LIBC_RUNTIME_RUNTIME_H_
extern char ** environ;
+#endif
#define DO_KEY(key) krk_attachNamedObject(AS_DICT(result), #key, (KrkObj*)krk_copyString(buf. key, strlen(buf .key)))
#define S_KEY(key,val) krk_attachNamedObject(AS_DICT(result), #key, (KrkObj*)val);
--- kuroko.orig/src/threads.c
+++ kuroko/src/threads.c
@@ -77,7 +77,7 @@