mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
bootstrap.c: add -pthread if the compiler is gnu
otherwise we get undefined symbol errors on pthread stuff
This commit is contained in:
parent
0dbaa8d3ae
commit
557cb64691
1 changed files with 10 additions and 1 deletions
11
bootstrap.c
11
bootstrap.c
|
|
@ -175,7 +175,16 @@ int main(int argc, char **argv) {
|
||||||
const char *child_argv[] = {
|
const char *child_argv[] = {
|
||||||
cc, "-o", "zig2", "zig2.c", "compiler_rt.c",
|
cc, "-o", "zig2", "zig2.c", "compiler_rt.c",
|
||||||
"-std=c99", "-O2", "-fno-stack-protector",
|
"-std=c99", "-O2", "-fno-stack-protector",
|
||||||
"-Wl,-z,stack-size=0x10000000", "-Istage1", NULL,
|
"-Istage1",
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
"-Wl,-stack_size,0x10000000",
|
||||||
|
#else
|
||||||
|
"-Wl,-z,stack-size=0x10000000",
|
||||||
|
#endif
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
"-pthread",
|
||||||
|
#endif
|
||||||
|
NULL,
|
||||||
};
|
};
|
||||||
print_and_run(child_argv);
|
print_and_run(child_argv);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue