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 DOT ?= dot
CLANG = clang CLANG = clang
TMPDIR = o/tmp TMPDIR = o/tmp
AR = build/bootstrap/ar AR = $(BOOTSTRAP)/ar.ape
CP = build/bootstrap/cp CP = $(BOOTSTRAP)/cp.ape
RM = build/bootstrap/rm -f RM = $(BOOTSTRAP)/rm.ape -f
GZIP = build/bootstrap/gzip GZIP = $(BOOTSTRAP)/gzip.ape
ECHO = build/bootstrap/echo ECHO = $(BOOTSTRAP)/echo.ape
CHMOD = build/bootstrap/chmod CHMOD = $(BOOTSTRAP)/chmod.ape
TOUCH = build/bootstrap/touch TOUCH = $(BOOTSTRAP)/touch.ape
PKG = build/bootstrap/package PKG = $(BOOTSTRAP)/package.ape
MKDEPS = build/bootstrap/mkdeps MKDEPS = $(BOOTSTRAP)/mkdeps
ZIPOBJ = build/bootstrap/zipobj ZIPOBJ = $(BOOTSTRAP)/zipobj
ZIPCOPY = build/bootstrap/zipcopy ZIPCOPY = $(BOOTSTRAP)/zipcopy
PECHECK = build/bootstrap/pecheck PECHECK = $(BOOTSTRAP)/pecheck
FIXUPOBJ = build/bootstrap/fixupobj FIXUPOBJ = $(BOOTSTRAP)/fixupobj
OBJBINCOPY = $(BOOTSTRAP)/objbincopy
MKDIR = build/bootstrap/mkdir -p MKDIR = build/bootstrap/mkdir -p
COMPILE = build/bootstrap/compile -V9 -M2048m -P8192 $(QUOTA) COMPILE = build/bootstrap/compile -V9 -M2048m -P8192 $(QUOTA)
@ -149,9 +150,10 @@ export MODE
export SOURCE_DATE_EPOCH export SOURCE_DATE_EPOCH
export TMPDIR export TMPDIR
COSMOCC = .cosmocc/3.3.5 COSMOCC = .cosmocc/3.5.7
BOOTSTRAP = $(COSMOCC)/bin
TOOLCHAIN = $(COSMOCC)/bin/$(ARCH)-linux-cosmo- 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 AS = $(TOOLCHAIN)as
CC = $(TOOLCHAIN)gcc 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) @$(COMPILE) -AOBJECTIFY.c $(CLANG) -DSUPPORT_VECTOR=8 -S -g0 $(APE_LOADER_FLAGS)
o/$(MODE)/ape/ape.elf: o/$(MODE)/ape/ape.elf.dbg 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 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 = \ APE_LOADER_LDFLAGS = \
-static \ -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 exit 0
fi fi
if ! build/bootstrap/echo.com -n; then if ! build/bootstrap/echo -n; then
cat <<'EOF' >&2 cat <<'EOF' >&2
ERROR ERROR

View file

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

View file

@ -88,6 +88,7 @@ make -j64 m=$ARM64 \
o/$ARM64/tool/build/package.dbg \ o/$ARM64/tool/build/package.dbg \
o/$ARM64/tool/build/rm.dbg \ o/$ARM64/tool/build/rm.dbg \
o/$ARM64/tool/build/touch.dbg \ o/$ARM64/tool/build/touch.dbg \
o/$ARM64/tool/build/mkdir.dbg \
o/$ARM64/tool/build/sha256sum.dbg \ o/$ARM64/tool/build/sha256sum.dbg \
o/$ARM64/tool/build/resymbol.dbg \ o/$ARM64/tool/build/resymbol.dbg \
o/$ARM64/third_party/make/make.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" 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 \ 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 \ ape $APELINK \
-l o/$AMD64/ape/ape.elf \ -l o/$AMD64/ape/ape.elf \
-l o/$ARM64/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 o/$ARM64/tool/build/$x.dbg
done 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" mv "$OUTDIR/bin/$x" "$OUTDIR/bin/$x.ape"
done done