From 423949a13b39a193dff8b2758d23d6691d11dbc3 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 15 Nov 2023 11:22:20 +0000 Subject: [PATCH] depends: add -platform_version to macOS build flags ```bash -platform_version platform min_version sdk_version This is set to indicate the platform, oldest supported version of that platform that output is to be used on, and the SDK that the output was built against. ``` --- depends/hosts/darwin.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index ecd45540cf9..e21af008996 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -71,6 +71,10 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$( # # Adds the desired paths from the SDK # +# -platform_version +# +# Indicate to the linker the platform, the oldest supported version, +# and the SDK used. darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ @@ -91,6 +95,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ darwin_CFLAGS=-pipe -std=$(C_STANDARD) darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) +darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) ifneq ($(LTO),) darwin_CFLAGS += -flto