mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 16:52:28 +00:00
parent
2134ffe005
commit
3573814e45
3 changed files with 8 additions and 3 deletions
|
@ -22,10 +22,11 @@ If you're doing your development work on Linux or BSD then you need just
|
||||||
five files to get started:
|
five files to get started:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
wget https://justine.lol/cosmopolitan/cosmopolitan-amalgamation-0.2.zip
|
wget https://justine.lol/cosmopolitan/cosmopolitan.zip
|
||||||
unzip cosmopolitan-amalgamation-0.2.zip
|
unzip cosmopolitan.zip
|
||||||
printf 'main() { printf("hello world\\n"); }\n' >hello.c
|
printf 'main() { printf("hello world\\n"); }\n' >hello.c
|
||||||
gcc -g -O -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \
|
gcc -g -Og -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone \
|
||||||
|
-fno-omit-frame-pointer -pg -mnop-mcount \
|
||||||
-o hello.com.dbg hello.c -fuse-ld=bfd -Wl,-T,ape.lds \
|
-o hello.com.dbg hello.c -fuse-ld=bfd -Wl,-T,ape.lds \
|
||||||
-include cosmopolitan.h crt.o ape.o cosmopolitan.a
|
-include cosmopolitan.h crt.o ape.o cosmopolitan.a
|
||||||
objcopy -S -O binary hello.com.dbg hello.com
|
objcopy -S -O binary hello.com.dbg hello.com
|
||||||
|
|
|
@ -2,6 +2,7 @@ int main(int argc, char *argv[]) {
|
||||||
int rc;
|
int rc;
|
||||||
char *s;
|
char *s;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
showcrashreports();
|
||||||
s = strdup(argv[0]);
|
s = strdup(argv[0]);
|
||||||
s[0] = 'Z';
|
s[0] = 'Z';
|
||||||
f = fopen("/dev/null", "w");
|
f = fopen("/dev/null", "w");
|
||||||
|
|
|
@ -29,6 +29,7 @@ o/$(MODE)/test/libc/release/smoke.com.dbg: \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
-nostdinc \
|
-nostdinc \
|
||||||
-mno-red-zone \
|
-mno-red-zone \
|
||||||
|
-fno-omit-frame-pointer \
|
||||||
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
||||||
-include o/cosmopolitan.h \
|
-include o/cosmopolitan.h \
|
||||||
test/libc/release/smoke.c \
|
test/libc/release/smoke.c \
|
||||||
|
@ -56,6 +57,7 @@ o/$(MODE)/test/libc/release/smokecxx.com.dbg: \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
-nostdinc \
|
-nostdinc \
|
||||||
-mno-red-zone \
|
-mno-red-zone \
|
||||||
|
-fno-omit-frame-pointer \
|
||||||
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
||||||
-include o/cosmopolitan.h \
|
-include o/cosmopolitan.h \
|
||||||
test/libc/release/smokecxx.cc \
|
test/libc/release/smokecxx.cc \
|
||||||
|
@ -80,6 +82,7 @@ o/$(MODE)/test/libc/release/smokeansi.com.dbg: \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
-nostdinc \
|
-nostdinc \
|
||||||
-mno-red-zone \
|
-mno-red-zone \
|
||||||
|
-fno-omit-frame-pointer \
|
||||||
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
-Wl,-T,o/$(MODE)/ape/ape.lds \
|
||||||
-include o/cosmopolitan.h \
|
-include o/cosmopolitan.h \
|
||||||
test/libc/release/smoke.c \
|
test/libc/release/smoke.c \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue