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
This commit is contained in:
Linmiao Xu
2026-04-09 21:53:08 +02:00
committed by Disservin
parent bb752eb2f6
commit a42d328f21
+2 -2
View File
@@ -451,7 +451,7 @@ endif
ifeq ($(COMP),gcc) ifeq ($(COMP),gcc)
comp=gcc comp=gcc
CXX=g++ 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 ($(arch),$(filter $(arch),armv7 armv8 riscv64))
ifeq ($(OS),Android) ifeq ($(OS),Android)
@@ -623,7 +623,7 @@ ifeq ($(COMP),gcc)
profile_make = clang-profile-make profile_make = clang-profile-make
profile_use = clang-profile-use profile_use = clang-profile-use
else else
CXXFLAGS += -Wstack-usage=128000 CXXFLAGS += -Wstack-usage=128000 -fno-ipa-cp-clone
endif endif
endif endif