From a42d328f21f76e1637135db36eb8e8bca72849e4 Mon Sep 17 00:00:00 2001 From: Linmiao Xu Date: Thu, 9 Apr 2026 21:42:09 +0200 Subject: [PATCH] Fix compilation errors on macOS ``` clang++: error: unknown argument: '-fno-ipa-cp-clone' clang++: error: unknown argument: '-fno-ipa-cp-clone' make[1]: *** [bitboard.o] Error 1 ``` The flag is unsupported by Clang, which pretends to be GCC on macOS, so only passing -fno-ipa-cp-clone to real GCC fixes macOS builds. closes https://github.com/official-stockfish/Stockfish/pull/6698 No functional change --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 48847bc78..c46505d88 100644 --- a/src/Makefile +++ b/src/Makefile @@ -451,7 +451,7 @@ endif ifeq ($(COMP),gcc) comp=gcc CXX=g++ - CXXFLAGS += -pedantic -Wextra -Wshadow -Wmissing-declarations -fno-ipa-cp-clone + CXXFLAGS += -pedantic -Wextra -Wshadow -Wmissing-declarations ifeq ($(arch),$(filter $(arch),armv7 armv8 riscv64)) ifeq ($(OS),Android) @@ -623,7 +623,7 @@ ifeq ($(COMP),gcc) profile_make = clang-profile-make profile_use = clang-profile-use else - CXXFLAGS += -Wstack-usage=128000 + CXXFLAGS += -Wstack-usage=128000 -fno-ipa-cp-clone endif endif