Browse Source
This fixes iOS derivative targets missing the c++ implicit library [^1].
[^1]: 79a83ddb08
pull/188/head
6 changed files with 3 additions and 97 deletions
@ -1,40 +0,0 @@ |
|||
From 27adb21b7b7144701db67e0ebeb978842af5ab7b Mon Sep 17 00:00:00 2001 |
|||
From: Steve Lhomme <slhomme@matroska.org> |
|||
Date: Mon, 20 Oct 2025 11:39:03 +0200 |
|||
Subject: [PATCH] CompilerABI: always do the ABI compilation as an EXECUTABLE |
|||
|
|||
All callers of CMAKE_DETERMINE_COMPILER_ABI pass a source |
|||
file with a main(). |
|||
|
|||
This fixes the c++ implicit library not detected for iOS, tvOS, watchOS, visionOS. |
|||
---
|
|||
Modules/CMakeDetermineCompilerABI.cmake | 3 +++ |
|||
1 file changed, 3 insertions(+) |
|||
|
|||
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
|
|||
index 4a75e25a92..0cf6e7c8da 100644
|
|||
--- a/Modules/CMakeDetermineCompilerABI.cmake
|
|||
+++ b/Modules/CMakeDetermineCompilerABI.cmake
|
|||
@@ -68,9 +68,11 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
|
|||
set(_orig_lc_all $ENV{LC_ALL}) |
|||
set(_orig_lc_messages $ENV{LC_MESSAGES}) |
|||
set(_orig_lang $ENV{LANG}) |
|||
+ set(_orig_CMAKE_FEATURE_DETECTION_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE})
|
|||
set(ENV{LC_ALL} C) |
|||
set(ENV{LC_MESSAGES} C) |
|||
set(ENV{LANG} C) |
|||
+ set(CMAKE_TRY_COMPILE_TARGET_TYPE "EXECUTABLE")
|
|||
try_compile(CMAKE_${lang}_ABI_COMPILED |
|||
SOURCES ${src} |
|||
CMAKE_FLAGS ${CMAKE_FLAGS} |
|||
@@ -87,6 +89,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
|
|||
set(ENV{LC_ALL} ${_orig_lc_all}) |
|||
set(ENV{LC_MESSAGES} ${_orig_lc_messages}) |
|||
set(ENV{LANG} ${_orig_lang}) |
|||
+ set(CMAKE_TRY_COMPILE_TARGET_TYPE ${_orig_CMAKE_FEATURE_DETECTION_TARGET_TYPE})
|
|||
|
|||
# Move result from cache to normal variable. |
|||
set(CMAKE_${lang}_ABI_COMPILED ${CMAKE_${lang}_ABI_COMPILED}) |
|||
--
|
|||
2.50.1 (Apple Git-155) |
|||
|
|||
@ -1,51 +0,0 @@ |
|||
From 9ab37d83eb74676e09e107d109be6a7dc71c25a6 Mon Sep 17 00:00:00 2001 |
|||
From: Steve Lhomme <robux4@ycbcr.xyz> |
|||
Date: Thu, 11 Jun 2020 15:09:53 +0200 |
|||
Subject: [PATCH] enable ALPN support on macOS 10.14 |
|||
|
|||
It fails to link properly with a macOS 10.13 SDK: |
|||
|
|||
[ 44%] Linking C executable curltest |
|||
Undefined symbols for architecture x86_64: |
|||
"_SSLCopyALPNProtocols", referenced from: |
|||
_sectransp_connect_step2 in libcmcurl.a(sectransp.c.o) |
|||
"_SSLSetALPNProtocols", referenced from: |
|||
_sectransp_connect_common in libcmcurl.a(sectransp.c.o) |
|||
ld: symbol(s) not found for architecture x86_64 |
|||
---
|
|||
Utilities/cmcurl/lib/vtls/sectransp.c | 5 +++-- |
|||
1 file changed, 3 insertions(+), 2 deletions(-) |
|||
|
|||
diff --git a/Utilities/cmcurl/lib/vtls/sectransp.c b/Utilities/cmcurl/lib/vtls/sectransp.c
|
|||
index 1f37305ce8..c380c134a4 100644
|
|||
--- a/Utilities/cmcurl/lib/vtls/sectransp.c
|
|||
+++ b/Utilities/cmcurl/lib/vtls/sectransp.c
|
|||
@@ -88,6 +88,7 @@
|
|||
#define CURL_BUILD_MAC_10_9 MAC_OS_X_VERSION_MAX_ALLOWED >= 1090 |
|||
#define CURL_BUILD_MAC_10_11 MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 |
|||
#define CURL_BUILD_MAC_10_13 MAC_OS_X_VERSION_MAX_ALLOWED >= 101300 |
|||
+#define CURL_BUILD_MAC_10_13_4 MAC_OS_X_VERSION_MAX_ALLOWED >= 101304
|
|||
#define CURL_BUILD_MAC_10_15 MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 |
|||
/* These macros mean "the following code is present to allow runtime backward |
|||
compatibility with at least this cat or earlier": |
|||
@@ -1091,7 +1092,7 @@ static CURLcode sectransp_connect_step1(struct Curl_cf
|
|||
if(result != CURLE_OK) |
|||
return result; |
|||
|
|||
-#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && \
|
|||
+#if (CURL_BUILD_MAC_10_13_4 || CURL_BUILD_IOS_11) && \
|
|||
defined(HAVE_BUILTIN_AVAILABLE) |
|||
if(connssl->alpn) { |
|||
if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) { |
|||
@@ -2083,7 +2084,7 @@ check_handshake:
|
|||
break; |
|||
} |
|||
|
|||
-#if (CURL_BUILD_MAC_10_13 || CURL_BUILD_IOS_11) && \
|
|||
+#if (CURL_BUILD_MAC_10_13_4 || CURL_BUILD_IOS_11) && \
|
|||
defined(HAVE_BUILTIN_AVAILABLE) |
|||
if(connssl->alpn) { |
|||
if(__builtin_available(macOS 10.13.4, iOS 11, tvOS 11, *)) { |
|||
--
|
|||
2.45.0.windows.1 |
|||
|
|||
Loading…
Reference in new issue