authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-11-12 17:29:21-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-11-12 17:30:24-07:00
log557cb646918fd58e6a71e7be9fb49434e2930c18
tree492e52859bd3628bf0d77cd2ee7968d57f375e09
parent0dbaa8d3ae8f2892b60751d5a3c528ddb3b4fc3b

bootstrap.c: add -pthread if the compiler is gnu

otherwise we get undefined symbol errors on pthread stuff

1 files changed, 10 insertions(+), 1 deletions(-)

bootstrap.c+10-1
......@@ -175,7 +175,16 @@ int main(int argc, char **argv) {
175175 const char *child_argv[] = {
176176 cc, "-o", "zig2", "zig2.c", "compiler_rt.c",
177177 "-std=c99", "-O2", "-fno-stack-protector",
178 "-Wl,-z,stack-size=0x10000000", "-Istage1", NULL,
178 "-Istage1",
179#if defined(__APPLE__)
180 "-Wl,-stack_size,0x10000000",
181#else
182 "-Wl,-z,stack-size=0x10000000",
183#endif
184#if defined(__GNUC__)
185 "-pthread",
186#endif
187 NULL,
179188 };
180189 print_and_run(child_argv);
181190 }