X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2FMakefile;h=8c2c6a7028392642c5156cd92ee4329c72b4b899;hb=ff9ca3e76eb6432dee8ed2442e3942b93d0f6ba5;hp=3fd601ffe20c96cee61c94c1ab9ec5e2a8aa2078;hpb=b61ec33f2277d2ac699b56f6560786e68e85c2de;p=stockfish diff --git a/src/Makefile b/src/Makefile index 3fd601ff..8c2c6a70 100644 --- a/src/Makefile +++ b/src/Makefile @@ -175,6 +175,7 @@ endif ifeq ($(COMP),mingw) comp=mingw CXX=g++ + prefetch = yes profile_prepare = gcc-profile-prepare profile_make = gcc-profile-make profile_use = gcc-profile-use @@ -184,6 +185,7 @@ endif ifeq ($(COMP),gcc) comp=gcc CXX=g++ + prefetch = yes profile_prepare = gcc-profile-prepare profile_make = gcc-profile-make profile_use = gcc-profile-use @@ -202,6 +204,7 @@ endif ifeq ($(COMP),clang) comp=clang CXX=clang++ + prefetch = yes profile_prepare = gcc-profile-prepare profile_make = gcc-profile-make profile_use = gcc-profile-use @@ -321,11 +324,13 @@ endif ### This is a mix of compile and link time options because the lto link phase ### needs access to the optimization flags. ifeq ($(comp),gcc) - GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.` - GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.` - ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \))) - CXXFLAGS += -flto - LDFLAGS += $(CXXFLAGS) + ifeq ($(optimize),yes) + GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.` + GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.` + ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \))) + CXXFLAGS += -flto + LDFLAGS += $(CXXFLAGS) + endif endif endif