diff --git a/1470.patch b/1470.patch new file mode 100644 index 000000000..a79a40c81 --- /dev/null +++ b/1470.patch @@ -0,0 +1,87 @@ +From e8ac303a29cfc9950306a4d22f9eaed5a9196bd2 Mon Sep 17 00:00:00 2001 +From: Paulo Medeiros +Date: Sun, 14 Jan 2024 00:51:07 -0100 +Subject: [PATCH] Implement Semaphore CarbonCore Stubs and change + MPCriticalRegionID + +--- + .../include/CarbonCore/Multiprocessing.h | 9 ++++-- + .../src/CarbonCore/Multiprocessing.cpp | 31 +++++++++++++++++++ + 2 files changed, 38 insertions(+), 2 deletions(-) + +diff --git a/src/frameworks/CoreServices/include/CarbonCore/Multiprocessing.h b/src/frameworks/CoreServices/include/CarbonCore/Multiprocessing.h +index 887718b80b..b74ffbab97 100644 +--- a/src/frameworks/CoreServices/include/CarbonCore/Multiprocessing.h ++++ b/src/frameworks/CoreServices/include/CarbonCore/Multiprocessing.h +@@ -13,7 +13,9 @@ enum { + kDurationMicrosecond = -1 + }; + +-typedef void* MPCriticalRegionID; ++typedef struct OpaqueMPCriticalRegionID *MPCriticalRegionID; ++typedef struct OpaqueMPSemaphoreID *MPSemaphoreID; ++typedef ItemCount MPSemaphoreCount; + + Boolean _MPIsFullyInitialized(); + OSStatus MPDelayUntil(AbsoluteTime* time); +@@ -23,7 +25,10 @@ OSStatus MPCreateCriticalRegion(MPCriticalRegionID* criticalRegion); + OSStatus MPDeleteCriticalRegion(MPCriticalRegionID criticalRegion); + OSStatus MPEnterCriticalRegion(MPCriticalRegionID criticalRegion, Duration timeout); + OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion); +- ++OSStatus MPCreateSemaphore(MPSemaphoreCount maximumValue, MPSemaphoreCount initialValue, MPSemaphoreID *semaphore); ++OSStatus MPDeleteSemaphore(MPSemaphoreID semaphore); ++OSStatus MPSignalSemaphore(MPSemaphoreID semaphore); ++OSStatus MPWaitOnSemaphore(MPSemaphoreID semaphore, Duration timeout); + // other functions are missing... + + #ifdef __cplusplus +diff --git a/src/frameworks/CoreServices/src/CarbonCore/Multiprocessing.cpp b/src/frameworks/CoreServices/src/CarbonCore/Multiprocessing.cpp +index a161ba3db3..0527755093 100644 +--- a/src/frameworks/CoreServices/src/CarbonCore/Multiprocessing.cpp ++++ b/src/frameworks/CoreServices/src/CarbonCore/Multiprocessing.cpp +@@ -21,8 +21,15 @@ along with Darling. If not, see . + #include + #include + #include ++#include ++#include + #include + ++static int verbose = 0; ++__attribute__((constructor)) static void initme(void) { ++ verbose = getenv("STUB_VERBOSE") != NULL; ++} ++ + Boolean _MPIsFullyInitialized() + { + return true; +@@ -109,3 +116,27 @@ OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion) + else + return paramErr; + } ++ ++OSStatus MPCreateSemaphore(MPSemaphoreCount maximumValue, MPSemaphoreCount initialValue, MPSemaphoreID *semaphore) ++{ ++ if (verbose) puts("STUB: MPCreateSemaphore called"); ++ return noErr; ++} ++ ++OSStatus MPDeleteSemaphore(MPSemaphoreID semaphore) ++{ ++ if (verbose) puts("STUB: MPDeleteSemaphore called"); ++ return noErr; ++} ++ ++OSStatus MPSignalSemaphore(MPSemaphoreID semaphore) ++{ ++ if (verbose) puts("STUB: MPSignalSemaphore called"); ++ return noErr; ++} ++ ++OSStatus MPWaitOnSemaphore(MPSemaphoreID semaphore, Duration timeout) ++{ ++ if (verbose) puts("STUB: MPWaitOnSemaphore called"); ++ return noErr; ++} +\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 86424af6f..cb3eb819f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,7 +159,7 @@ string(TOLOWER "${ENABLE_METAL}" BUILD_METAL) if(BUILD_METAL STREQUAL "auto") # check if Vulkan and LLVM are available - find_program(LLVM_CONFIG_PROGRAM llvm-config) + find_program(LLVM_CONFIG_PROGRAM llvm-config-14) find_package(Vulkan) if(LLVM_CONFIG_PROGRAM AND Vulkan_FOUND) diff --git a/src/external/SmartCardServices b/src/external/SmartCardServices index 9418e8589..ea21e3267 160000 --- a/src/external/SmartCardServices +++ b/src/external/SmartCardServices @@ -1 +1 @@ -Subproject commit 9418e858915669a54d0a62c22768215f936a6974 +Subproject commit ea21e32674c69426bba9a2804d92e753a51c03c5 diff --git a/src/external/TextEdit b/src/external/TextEdit index 2ba12c73b..99ec72a94 160000 --- a/src/external/TextEdit +++ b/src/external/TextEdit @@ -1 +1 @@ -Subproject commit 2ba12c73b7b1af4b660be9a96d00163af0294d2e +Subproject commit 99ec72a94dab166eefa264e9802ebd0d80aca845 diff --git a/src/external/cocotron b/src/external/cocotron index e01bcde59..e34886234 160000 --- a/src/external/cocotron +++ b/src/external/cocotron @@ -1 +1 @@ -Subproject commit e01bcde5946fab5f19271f54029d754f35b9e9d9 +Subproject commit e34886234930c9260f56b4ae096fd0a0fdbc42b4 diff --git a/src/external/foundation b/src/external/foundation index ffedc7bda..c952468e1 160000 --- a/src/external/foundation +++ b/src/external/foundation @@ -1 +1 @@ -Subproject commit ffedc7bda02b9bddfdb5e7b1baf78e68e2b57b3c +Subproject commit c952468e11a5e3c41b1213d4f64649f0b09e8dd0 diff --git a/src/external/libressl-2.2.9 b/src/external/libressl-2.2.9 index c5e9edb9d..52dbcfd52 160000 --- a/src/external/libressl-2.2.9 +++ b/src/external/libressl-2.2.9 @@ -1 +1 @@ -Subproject commit c5e9edb9d82ccf5fde5d8ae32b162fec8fe11318 +Subproject commit 52dbcfd522c14edc7bac5eb10c226477c83d550d diff --git a/src/external/libressl-2.5.5 b/src/external/libressl-2.5.5 index 1f663b5bd..52dbcfd52 160000 --- a/src/external/libressl-2.5.5 +++ b/src/external/libressl-2.5.5 @@ -1 +1 @@ -Subproject commit 1f663b5bdc9082178717c080e4728fe3e7084de4 +Subproject commit 52dbcfd522c14edc7bac5eb10c226477c83d550d diff --git a/src/external/libressl-2.6.5 b/src/external/libressl-2.6.5 index 30826df38..52dbcfd52 160000 --- a/src/external/libressl-2.6.5 +++ b/src/external/libressl-2.6.5 @@ -1 +1 @@ -Subproject commit 30826df38d7c0f416158a94e0112c928188e0327 +Subproject commit 52dbcfd522c14edc7bac5eb10c226477c83d550d diff --git a/src/external/libressl-2.8.3 b/src/external/libressl-2.8.3 index 2a56b36b7..52dbcfd52 160000 --- a/src/external/libressl-2.8.3 +++ b/src/external/libressl-2.8.3 @@ -1 +1 @@ -Subproject commit 2a56b36b77a00573c53ccd8e6932eb136172c950 +Subproject commit 52dbcfd522c14edc7bac5eb10c226477c83d550d diff --git a/src/external/openjdk b/src/external/openjdk index 3c6eb73f3..18a33aa40 160000 --- a/src/external/openjdk +++ b/src/external/openjdk @@ -1 +1 @@ -Subproject commit 3c6eb73f3c4d4f74fde632adec512a694d23de6e +Subproject commit 18a33aa40da5e0dc5329ccfb86399f6c3a7393e6