copy crt1 and crtglue to root in build.c

This commit is contained in:
nakst 2022-01-16 14:45:29 +00:00
parent c79524e94e
commit cd44120589
1 changed files with 5 additions and 1 deletions

View File

@ -159,16 +159,20 @@ void BuildAPIDependencies() {
ParseDependencies("bin/dependency_files/api_header.d", "API Header", false);
}
CallSystem("ports/musl/build.sh " TARGET_NAME);
FILE *f = fopen("bin/Object Files/crt1.o", "rb");
if (f) {
fclose(f);
} else {
CallSystem("mkdir -p root/Applications/POSIX/lib");
CallSystem(TOOLCHAIN_PREFIX "-gcc -c desktop/crt1.c -o bin/Object\\ Files/crt1.o");
CallSystem("cp bin/Object\\ Files/crt1.o root/Applications/POSIX/lib");
CallSystem(TOOLCHAIN_PREFIX "-gcc -c desktop/crtglue.c -o bin/Object\\ Files/crtglue.o");
CallSystem("cp bin/Object\\ Files/crtglue.o root/Applications/POSIX/lib");
}
CallSystem("ports/musl/build.sh " TARGET_NAME);
CallSystem("ports/freetype/build.sh " TARGET_NAME);
CallSystem("ports/harfbuzz/build.sh " TARGET_NAME);