mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 00:32:29 +00:00
Fix Clang support
The amalgamated release is now confirmed to be working with Clang, including its integrated assembler. Fixes #41
This commit is contained in:
parent
e06c90fafc
commit
d7733579d3
103 changed files with 384 additions and 359 deletions
|
@ -1,8 +1,8 @@
|
|||
int main() {
|
||||
int main(int argc, char *argv[]) {
|
||||
int rc;
|
||||
FILE *f;
|
||||
f = fopen("/dev/null", "w");
|
||||
fprintf(f, "hello world\n");
|
||||
fprintf(f, "hello world %d\n", argc);
|
||||
fclose(f);
|
||||
rc = system("exit 42");
|
||||
CHECK_NE(-1, rc);
|
||||
|
|
|
@ -93,6 +93,31 @@ o/$(MODE)/test/libc/release/smokeansi.com.dbg: \
|
|||
o/$(MODE)/ape/ape.o \
|
||||
o/$(MODE)/cosmopolitan.a
|
||||
|
||||
o/$(MODE)/test/libc/release/smokeclang.com.dbg: \
|
||||
test/libc/release/smoke.c \
|
||||
o/cosmopolitan.h \
|
||||
o/$(MODE)/ape/ape.lds \
|
||||
o/$(MODE)/libc/crt/crt.o \
|
||||
o/$(MODE)/ape/ape.o \
|
||||
o/$(MODE)/cosmopolitan.a
|
||||
@ACTION=CLANG build/compile clang \
|
||||
-o $@ \
|
||||
-Os \
|
||||
-static \
|
||||
-no-pie \
|
||||
-fno-pie \
|
||||
-nostdlib \
|
||||
-nostdinc \
|
||||
-mno-red-zone \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,-z,max-page-size=0x1000 \
|
||||
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
||||
-include o/cosmopolitan.h \
|
||||
test/libc/release/smoke.c \
|
||||
o/$(MODE)/libc/crt/crt.o \
|
||||
o/$(MODE)/ape/ape.o \
|
||||
o/$(MODE)/cosmopolitan.a
|
||||
|
||||
.PHONY: o/$(MODE)/test/libc/release
|
||||
o/$(MODE)/test/libc/release: \
|
||||
o/$(MODE)/test/libc/release/smoke.com \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue