X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2FMakefile;h=c3660a20fa674739009e3fe65eb9ba9a06e2d8fa;hb=6c197c3964ca0c637ff1f646dc7e6653b1bb4b45;hp=81731e6675c0134d21a994da1c5c048adbd4db8b;hpb=11483fe6d942a4fee6fa272f72251d6b6d6d7454;p=stockfish diff --git a/src/Makefile b/src/Makefile index 81731e66..c3660a20 100644 --- a/src/Makefile +++ b/src/Makefile @@ -134,8 +134,8 @@ endif ifeq ($(ARCH),armv8) arch = armv8-a - bits = 64 prefetch = yes + popcnt = yes endif ifeq ($(ARCH),ppc-32) @@ -322,7 +322,7 @@ endif ### 3.6 popcnt ifeq ($(popcnt),yes) - ifeq ($(arch),ppc64) + ifeq ($(arch),$(filter $(arch),ppc64 armv8-a)) CXXFLAGS += -DUSE_POPCNT else ifeq ($(comp),icc) CXXFLAGS += -msse3 -DUSE_POPCNT @@ -344,10 +344,20 @@ endif ### needs access to the optimization flags. ifeq ($(optimize),yes) ifeq ($(debug), no) - ifeq ($(comp),$(filter $(comp),gcc clang mingw)) + ifeq ($(comp),$(filter $(comp),gcc clang)) + CXXFLAGS += -flto + LDFLAGS += $(CXXFLAGS) + endif + +# To use LTO and static linking on windows, the tool chain requires a recent gcc: +# gcc version 10.1 in msys2 or TDM-GCC version 9.2 are know to work, older might not. +# So, only enable it for a cross from Linux by default. + ifeq ($(comp),mingw) + ifeq ($(KERNEL),Linux) CXXFLAGS += -flto LDFLAGS += $(CXXFLAGS) endif + endif endif endif