From 81adce8f58d6a85efa04f404b11b085fc3b1e7d9 Mon Sep 17 00:00:00 2001 From: Dmitry Ledentsov Date: Wed, 11 Oct 2023 14:49:26 +0200 Subject: [PATCH 1/3] Add -ld_classic linker option to mac builds --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 990e404b9c..8c20113f3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -263,6 +263,7 @@ endif() if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SCHEDULER_SCALING_PTHREADS") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + add_link_options(-ld_classic) endif() if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "DragonFly") From 79a5cc1bf7d0f3f14eabafcf0972aa307ccb0bb9 Mon Sep 17 00:00:00 2001 From: Dmitry Ledentsov Date: Wed, 11 Oct 2023 14:54:38 +0200 Subject: [PATCH 2/3] Add -ld_classic linker option to Mac Pony Builds --- src/libponyc/codegen/genexe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libponyc/codegen/genexe.c b/src/libponyc/codegen/genexe.c index 8b3af7805b..870214e66f 100644 --- a/src/libponyc/codegen/genexe.c +++ b/src/libponyc/codegen/genexe.c @@ -295,6 +295,7 @@ static bool link_exe(compile_t* c, ast_t* program, snprintf(ld_cmd, ld_len, "%s -execute -arch %.*s " "-o %s %s %s %s " + "-ld_classic " "-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem %s", linker, (int)arch_len, c->opt->triple, file_exe, file_o, lib_args, ponyrt, sanitizer_arg From ef7f6d1946524604b5cf3e82e0fdb0db3e979e14 Mon Sep 17 00:00:00 2001 From: Dmitry Ledentsov Date: Wed, 11 Oct 2023 16:16:00 +0200 Subject: [PATCH 3/3] Revert "Add -ld_classic linker option to mac builds" This reverts commit 81adce8f58d6a85efa04f404b11b085fc3b1e7d9. --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c20113f3a..990e404b9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -263,7 +263,6 @@ endif() if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SCHEDULER_SCALING_PTHREADS") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - add_link_options(-ld_classic) endif() if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "DragonFly")