[vlc-commits] [Git][videolan/vlc][master] build: fix linker flag for latest Xcode toolchains

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jan 10 07:32:41 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b9256446 by Maxime Chapelet at 2024-01-10T06:34:37+00:00
build: fix linker flag for latest Xcode toolchains

It seems `<sdk_name>_simulator_version_min` or `<sdk_name>_version_min` option isn't supported by the latest linker and the build fails with Xcode 15.
This patch will use the recommended `platform_version` option instead.

- - - - -


1 changed file:

- extras/package/apple/build.sh


Changes:

=====================================
extras/package/apple/build.sh
=====================================
@@ -184,15 +184,14 @@ check_tool()
 set_deployment_target()
 {
     VLC_DEPLOYMENT_TARGET="$1"
-    VLC_DEPLOYMENT_TARGET_LDFLAG="-Wl,-$VLC_HOST_OS"
+    VLC_DEPLOYMENT_TARGET_LDFLAG="${VLC_HOST_OS}"
     VLC_DEPLOYMENT_TARGET_CFLAG="-m$VLC_HOST_OS"
 
     if [ -n "$VLC_HOST_PLATFORM_SIMULATOR" ]; then
-        VLC_DEPLOYMENT_TARGET_LDFLAG="${VLC_DEPLOYMENT_TARGET_LDFLAG}_simulator"
+        VLC_DEPLOYMENT_TARGET_LDFLAG="${VLC_HOST_OS}-simulator"
         VLC_DEPLOYMENT_TARGET_CFLAG="${VLC_DEPLOYMENT_TARGET_CFLAG}-simulator"
     fi
-
-    VLC_DEPLOYMENT_TARGET_LDFLAG="${VLC_DEPLOYMENT_TARGET_LDFLAG}_version_min,${VLC_DEPLOYMENT_TARGET}"
+    VLC_DEPLOYMENT_TARGET_LDFLAG="-Wl,-platform_version,${VLC_DEPLOYMENT_TARGET_LDFLAG},${VLC_DEPLOYMENT_TARGET},${VLC_APPLE_SDK_VERSION}"
     VLC_DEPLOYMENT_TARGET_CFLAG="${VLC_DEPLOYMENT_TARGET_CFLAG}-version-min=${VLC_DEPLOYMENT_TARGET}"
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b92564463b451d26d7e228621a09193ebedfc89f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b92564463b451d26d7e228621a09193ebedfc89f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list