From: kosmirror <kos...@us...> - 2025-06-24 01:07:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 3c2d96a8ce8d4b9622648ad78dfb82a4db5c233c (commit) from 1e95c1f3e843608ebd3f7045bd40e7be27d3a575 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3c2d96a8ce8d4b9622648ad78dfb82a4db5c233c Author: Shirobon <126...@us...> Date: Sun Jun 15 12:59:19 2025 +0900 Update to detect Apple Clang 17+ and fix zlib issue. New Apple Clang 17 in Xcode 16.3+ causes build issues with bundled in zlib in binutils/gcc, so detect compiler version and use system zlib if necessary. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/scripts/init.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/utils/dc-chain/scripts/init.mk b/utils/dc-chain/scripts/init.mk index 0115ca7d..f5d71011 100644 --- a/utils/dc-chain/scripts/init.mk +++ b/utils/dc-chain/scripts/init.mk @@ -68,6 +68,18 @@ ifdef MACOS SH_CXX_FOR_TARGET += $(macos_extra_args) macos_gcc_configure_args = --with-sysroot --with-native-system-header=/usr/include macos_gdb_configure_args = --with-sysroot=$(sdkroot) + # Detect if CC is Apple Clang and get major version, skip if using gcc. + APPLE_CLANG_MAJOR := $(shell $(CC) --version 2>&1 | \ + grep -i "Apple clang" | cut -f 4 -d " " | cut -f 1 -d ".") + ifdef APPLE_CLANG_MAJOR + # When using Apple Clang 17 or above, use system zlib. + ifeq ($(shell [ "$(APPLE_CLANG_MAJOR)" -gt 16 ] && echo "yes"), yes) + $(info Apple clang $(APPLE_CLANG_MAJOR) detected, using system zlib) + macos_gcc_configure_args += --with-system-zlib + macos_gdb_configure_args += --with-system-zlib + binutils_extra_configure_args += --with-system-zlib + endif + endif endif endif hooks/post-receive -- A pseudo Operating System for the Dreamcast. |