Browse Source

tools: update CMake to 4.1.2

This fixes iOS derivative targets missing the c++ implicit library [^1].

[^1]: 79a83ddb08
pull/188/head
Steve Lhomme 5 months ago
parent
commit
220a8271fd
  1. 1
      Makefile.am
  2. 40
      extras/tools/0001-CompilerABI-always-do-the-ABI-compilation-as-an-EXEC.patch
  3. 2
      extras/tools/SHA512SUMS
  4. 51
      extras/tools/cmake-enable-ALPN-support-on-macOS-10.14.patch
  5. 4
      extras/tools/packages.mak
  6. 2
      extras/tools/tools.mak

1
Makefile.am

@ -63,7 +63,6 @@ EXTRA_DIST += \
extras/tools/tools.mak \
extras/tools/SHA512SUMS \
extras/tools/automake-clang.patch \
extras/tools/cmake-enable-ALPN-support-on-macOS-10.14.patch \
extras/tools/libtool-2.4.7-bitcode.patch \
extras/tools/libtool-2.5.4-clang-libs.patch \
extras/tools/libtool-2.4.7-lpthread.patch \

40
extras/tools/0001-CompilerABI-always-do-the-ABI-compilation-as-an-EXEC.patch

@ -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)

2
extras/tools/SHA512SUMS

@ -1,7 +1,7 @@
3954a6ad3f522c135f327ba0d376eb16ae42103849c8cc5cd6c8c6e87b8c5433c95a0f2d4dfa3e6c2705ee0b8996e5b27d0b2248f64a05fc8c902116cc45a7b2 apache-ant-1.9.7.tar.bz2
3f71d459e2127ef2c98b37f11f5284f0c92318ad8d31c5b6034bed370adfe9f3d0f7a12f87e2efced06c11e2a159de4d4a292b751104e83daf11342f25ba9721 autoconf-2.72.tar.gz
b558cf2635e40efde888d16b287a107049f8be091b3977aa138bcb3066b6f31901c77b75a25c4a87258047919c958adabe74d12458aab94acf1867ea82e2ff82 automake-1.18.tar.gz
07dbb5af1d449760ef92a921e43c0a0a091989ac51ce3f8b7607bf617b8b56e47c675486d3c620c04f1105b7dfa3852b926915e0888ff46ea473cd01e572f461 cmake-3.31.8.tar.gz
169b8ebfbd2c880a1f3ed8c3da8d4b8e9252a5a1ff9f0011e39bb3bb84d183f0379eea880b80e2e052c333db91e49b80e5a65131f71fc8582709b604e94bf280 cmake-4.1.2.tar.gz
f5dd0f02fcae65a176a16af9a8e1747c26e9440c6c224003ba458d3298b777a75ffb189aee9051fb0c4840b2a48278be4a51d959381af0b1d627570f478c58f2 m4-1.4.19.tar.gz
56a9656539448972bc3080357ccc987bd4cbca3847758fe41251eb8af1a5e403a75f38d1344fa2c0bd56de880f37f3eaafbe7116c506f33331e7a8dd8a53cf2a pkg-config-0.28-1.tar.gz
dbbb0bb348fac54612d29182c09c88bda7096dea03bd94f03c580c24146e65a06db12808c6a1a9adc94548fa3843511e3e80b251cb07142110cf149eab23f573 sed-4.2.2.tar.bz2

51
extras/tools/cmake-enable-ALPN-support-on-macOS-10.14.patch

@ -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

4
extras/tools/packages.mak

@ -6,8 +6,8 @@ VIDEOLAN=https://downloads.videolan.org/pub/contrib
NASM_VERSION=2.14
NASM_URL=https://www.nasm.us/pub/nasm/releasebuilds/$(NASM_VERSION)/nasm-$(NASM_VERSION).tar.gz
CMAKE_VERSION_MAJ=3.31
CMAKE_VERSION=$(CMAKE_VERSION_MAJ).8
CMAKE_VERSION_MAJ=4.1
CMAKE_VERSION=$(CMAKE_VERSION_MAJ).2
CMAKE_URL=https://www.cmake.org/files/v$(CMAKE_VERSION_MAJ)/cmake-$(CMAKE_VERSION).tar.gz
LIBTOOL_VERSION=2.5.4

2
extras/tools/tools.mak

@ -83,8 +83,6 @@ cmake-$(CMAKE_VERSION).tar.gz:
cmake: cmake-$(CMAKE_VERSION).tar.gz
$(UNPACK)
$(APPLY) $(TOOLS)/cmake-enable-ALPN-support-on-macOS-10.14.patch
$(APPLY) $(TOOLS)/0001-CompilerABI-always-do-the-ABI-compilation-as-an-EXEC.patch
$(MOVE)
.buildcmake: cmake

Loading…
Cancel
Save