nixpkgs/pkgs/development/tools/build-managers/cmake/darwin-always-set-runtime-c-flag.patch
Luke Granger-Brown a8be3a74cc cmake: revert cmake support for 10.4 Tiger
This is a reversed patch of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6426.

_CURRENT_OSX_VERSION isn't set properly, which causes this condition to fail,
which means we don't get CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG which means
we can't compile libcxx. Ugh.
2021-09-11 15:12:21 +01:00

15 lines
531 B
Diff

Revert of commit 1af23c4de2c7d58c06171d70b37794b5c860d5f4.
--- b/Modules/Platform/Darwin.cmake
+++ a/Modules/Platform/Darwin.cmake
@@ -47,9 +47,7 @@
set(CMAKE_SHARED_MODULE_SUFFIX ".so")
set(CMAKE_MODULE_EXISTS 1)
set(CMAKE_DL_LIBS "")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-if(NOT "${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
- set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-endif()
foreach(lang C CXX OBJC OBJCXX)
set(CMAKE_${lang}_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")