Commit: 07b67894e8db446edbaaf4eb2a49019ac61080c5 Author: Brecht Van Lommel Date: Fri Dec 9 21:27:36 2022 +0100 Branches: master https://developer.blender.org/rB07b67894e8db446edbaaf4eb2a49019ac61080c5
Fix macOS precompiled libraries built on Xcode 14 not working in Xcode 13 Disable some symbols amd linking features not available in Xcode 13. =================================================================== M build_files/build_environment/patches/python_unix.diff M build_files/build_environment/patches/sdl.diff =================================================================== diff --git a/build_files/build_environment/patches/python_unix.diff b/build_files/build_environment/patches/python_unix.diff index a9baae8ce32..3969c706758 100644 --- a/build_files/build_environment/patches/python_unix.diff +++ b/build_files/build_environment/patches/python_unix.diff @@ -36,3 +36,39 @@ index a97a755..07ce853 100644 if (self.compiler.find_library_file(self.lib_dirs, lib_name)): ffi_lib = lib_name break +--- a/Modules/posixmodule.c 2022-12-09 21:44:03 ++++ b/Modules/posixmodule.c 2022-12-09 21:39:46 +@@ -10564,10 +10564,15 @@ + Py_BEGIN_ALLOW_THREADS + #ifdef HAVE_MKFIFOAT + if (dir_fd != DEFAULT_DIR_FD) { ++// BLENDER: disable also at compile time for compatibility when linking with older Xcode. ++// https://github.com/python/cpython/issues/97897 ++#ifndef __APPLE__ + if (HAVE_MKFIFOAT_RUNTIME) { + result = mkfifoat(dir_fd, path->narrow, mode); + ++ } else ++#endif ++ { +- } else { + mkfifoat_unavailable = 1; + result = 0; + } +@@ -10638,10 +10633,15 @@ + Py_BEGIN_ALLOW_THREADS + #ifdef HAVE_MKNODAT + if (dir_fd != DEFAULT_DIR_FD) { ++// BLENDER: disable also at compile time for compatibility when linking with older Xcode. ++// https://github.com/python/cpython/issues/97897 ++#ifndef __APPLE__ + if (HAVE_MKNODAT_RUNTIME) { + result = mknodat(dir_fd, path->narrow, mode, device); + ++ } else ++#endif ++ { +- } else { + mknodat_unavailable = 1; + result = 0; + } diff --git a/build_files/build_environment/patches/sdl.diff b/build_files/build_environment/patches/sdl.diff index 742183ecb4c..6caa98f9d68 100644 --- a/build_files/build_environment/patches/sdl.diff +++ b/build_files/build_environment/patches/sdl.diff @@ -30,3 +30,19 @@ diff -ru ./src/video/SDL_video.c ./src/video/SDL_video.c if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */ if (Cocoa_IsWindowInFullscreenSpace(window)) { return SDL_FALSE; +--- CMakeLists.txt 2022-12-09 20:40:00 ++++ CMakeLists.txt 2022-12-09 20:40:00 +@@ -526,6 +526,13 @@ + list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing") + endif() + ++ # BLENDER: make libs compatible with older Xcode. ++ # https://github.com/KhronosGroup/MoltenVK/issues/1756 ++ check_c_compiler_flag(-fno-objc-msgsend-selector-stubs HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS) ++ if(HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS) ++ list(APPEND EXTRA_CFLAGS "-fno-objc-msgsend-selector-stubs") ++ endif() ++ + check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT) + if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT) + check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs