Upgrade to cosmocc v3.5.7

This commit is contained in:
Justine Tunney 2024-07-20 11:21:26 -07:00
parent 29ce25c767
commit d3f87f4c64
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
19 changed files with 26 additions and 22 deletions

View file

@ -101,19 +101,20 @@ XARGS ?= xargs -P4 -rs8000
DOT ?= dot
CLANG = clang
TMPDIR = o/tmp
AR = build/bootstrap/ar
CP = build/bootstrap/cp
RM = build/bootstrap/rm -f
GZIP = build/bootstrap/gzip
ECHO = build/bootstrap/echo
CHMOD = build/bootstrap/chmod
TOUCH = build/bootstrap/touch
PKG = build/bootstrap/package
MKDEPS = build/bootstrap/mkdeps
ZIPOBJ = build/bootstrap/zipobj
ZIPCOPY = build/bootstrap/zipcopy
PECHECK = build/bootstrap/pecheck
FIXUPOBJ = build/bootstrap/fixupobj
AR = $(BOOTSTRAP)/ar.ape
CP = $(BOOTSTRAP)/cp.ape
RM = $(BOOTSTRAP)/rm.ape -f
GZIP = $(BOOTSTRAP)/gzip.ape
ECHO = $(BOOTSTRAP)/echo.ape
CHMOD = $(BOOTSTRAP)/chmod.ape
TOUCH = $(BOOTSTRAP)/touch.ape
PKG = $(BOOTSTRAP)/package.ape
MKDEPS = $(BOOTSTRAP)/mkdeps
ZIPOBJ = $(BOOTSTRAP)/zipobj
ZIPCOPY = $(BOOTSTRAP)/zipcopy
PECHECK = $(BOOTSTRAP)/pecheck
FIXUPOBJ = $(BOOTSTRAP)/fixupobj
OBJBINCOPY = $(BOOTSTRAP)/objbincopy
MKDIR = build/bootstrap/mkdir -p
COMPILE = build/bootstrap/compile -V9 -M2048m -P8192 $(QUOTA)
@ -149,9 +150,10 @@ export MODE
export SOURCE_DATE_EPOCH
export TMPDIR
COSMOCC = .cosmocc/3.3.5
COSMOCC = .cosmocc/3.5.7
BOOTSTRAP = $(COSMOCC)/bin
TOOLCHAIN = $(COSMOCC)/bin/$(ARCH)-linux-cosmo-
DOWNLOAD := $(shell build/download-cosmocc.sh $(COSMOCC) 3.3.5 db78fd8d3f8706e9dff4be72bf71d37a3f12062f212f407e1c33bc4af3780dd0)
DOWNLOAD := $(shell build/download-cosmocc.sh $(COSMOCC) 3.5.7 596876951b62ad2530c63afc40edd805d751fcb2416e544d249af04ad00bb4ed)
AS = $(TOOLCHAIN)as
CC = $(TOOLCHAIN)gcc

View file

@ -218,10 +218,10 @@ o/$(MODE)/ape/loader-xnu-clang.asm: ape/loader.c
@$(COMPILE) -AOBJECTIFY.c $(CLANG) -DSUPPORT_VECTOR=8 -S -g0 $(APE_LOADER_FLAGS)
o/$(MODE)/ape/ape.elf: o/$(MODE)/ape/ape.elf.dbg
@$(COMPILE) -AOBJBINCOPY -w build/bootstrap/objbincopy -f -o $@ $<
@$(COMPILE) -AOBJBINCOPY -w $(OBJBINCOPY) -f -o $@ $<
o/$(MODE)/ape/ape.macho: o/$(MODE)/ape/ape.elf.dbg
@$(COMPILE) -AOBJBINCOPY -w build/bootstrap/objbincopy -fm -o $@ $<
@$(COMPILE) -AOBJBINCOPY -w $(OBJBINCOPY) -fm -o $@ $<
APE_LOADER_LDFLAGS = \
-static \

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -31,7 +31,7 @@ if [ ! -f /proc/sys/fs/binfmt_misc/status ]; then
exit 0
fi
if ! build/bootstrap/echo.com -n; then
if ! build/bootstrap/echo -n; then
cat <<'EOF' >&2
ERROR

View file

@ -85,7 +85,7 @@ o/$(MODE)/test/libc/mem/prog/life.elf: \
o/$(MODE)/tool/build/assimilate \
o/$(MODE)/test/libc/mem/prog/life
@$(COMPILE) -wACP -T$@ \
build/bootstrap/cp \
$(CP) \
o/$(MODE)/test/libc/mem/prog/life \
o/$(MODE)/test/libc/mem/prog/life.elf
@$(COMPILE) -wAASSIMILATE -T$@ \
@ -116,7 +116,7 @@ o/$(MODE)/test/libc/mem/prog/sock.elf: \
o/$(MODE)/tool/build/assimilate \
o/$(MODE)/test/libc/mem/prog/sock
@$(COMPILE) -wACP -T$@ \
build/bootstrap/cp \
$(CP) \
o/$(MODE)/test/libc/mem/prog/sock \
o/$(MODE)/test/libc/mem/prog/sock.elf
@$(COMPILE) -wAASSIMILATE -T$@ \

View file

@ -88,6 +88,7 @@ make -j64 m=$ARM64 \
o/$ARM64/tool/build/package.dbg \
o/$ARM64/tool/build/rm.dbg \
o/$ARM64/tool/build/touch.dbg \
o/$ARM64/tool/build/mkdir.dbg \
o/$ARM64/tool/build/sha256sum.dbg \
o/$ARM64/tool/build/resymbol.dbg \
o/$ARM64/third_party/make/make.dbg \
@ -174,7 +175,8 @@ cp -f o/$AMD64/ape/ape.macho "$OUTDIR/bin/ape-x86_64.macho"
cp -f o/$ARM64/ape/ape.elf "$OUTDIR/bin/ape-aarch64.elf"
for x in assimilate march-native mktemper fixupobj zipcopy apelink pecheck mkdeps zipobj \
ar chmod cocmd cp echo gzip objbincopy package rm touch sha256sum resymbol; do
ar chmod cocmd cp echo gzip objbincopy package rm touch mkdir compile sha256sum \
resymbol; do
ape $APELINK \
-l o/$AMD64/ape/ape.elf \
-l o/$ARM64/ape/ape.elf \
@ -184,7 +186,7 @@ for x in assimilate march-native mktemper fixupobj zipcopy apelink pecheck mkdep
o/$ARM64/tool/build/$x.dbg
done
for x in ar chmod cp echo gzip package rm touch sha256sum; do
for x in ar chmod cp echo gzip package rm touch mkdir compile sha256sum; do
mv "$OUTDIR/bin/$x" "$OUTDIR/bin/$x.ape"
done