From: Sebastian Buchwald Date: Sat, 11 Mar 2023 21:08:35 +0000 (+0100) Subject: Fix Makefile for clang 16 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=052dce6a150c5dfc4a4775fc23319028904a86ab;p=fairystockfish.git Fix Makefile for clang 16 The clang 16 release will remove the -fexperimental-new-pass-manager flag (see https://github.com/llvm/llvm-project/commit/69b2b7282e92a1b576b7bd26f3b16716a5027e8e). Thus, the commit adapts the Makefile to use this flag only for older clang versions. closes https://github.com/official-stockfish/Stockfish/pull/4437 No functional change --- diff --git a/src/Makefile b/src/Makefile index 8572369..4fe4095 100644 --- a/src/Makefile +++ b/src/Makefile @@ -539,7 +539,10 @@ ifeq ($(optimize),yes) endif ifeq ($(comp),clang) - CXXFLAGS += -fexperimental-new-pass-manager + clangmajorversion = $(shell $(CXX) -dumpversion 2>/dev/null | cut -f1 -d.) + ifeq ($(shell expr $(clangmajorversion) \< 16),1) + CXXFLAGS += -fexperimental-new-pass-manager + endif endif endif