nixpkgs/pkgs/development/compilers/ponyc/fix-darwin-build.patch
2023-09-18 14:38:25 +02:00

22 lines
749 B
Diff

diff --git a/src/libponyc/codegen/genexe.c b/src/libponyc/codegen/genexe.c
index 42a68251..b37958ab 100644
--- a/src/libponyc/codegen/genexe.c
+++ b/src/libponyc/codegen/genexe.c
@@ -296,13 +296,13 @@ static bool link_exe(compile_t* c, ast_t* program,
snprintf(ld_cmd, ld_len,
#if defined(PLATFORM_IS_ARM)
- "%s -execute -arch %.*s "
+ "%s -execute "
#else
- "%s -execute -no_pie -arch %.*s "
+ "%s -execute -no_pie "
#endif
"-o %s %s %s %s "
- "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem %s",
- linker, (int)arch_len, c->opt->triple, file_exe, file_o,
+ "-L@libSystem@/lib -lSystem %s",
+ linker, file_exe, file_o,
lib_args, ponyrt, sanitizer_arg
);