X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=efca3947ee95aaf762f495fc470ec7d5221f11a4;hp=8622be3206291abd014304d14007049e762bbcd2;hb=e5da0e4b79b405da5bdc42f6fb4c2ba49afba00a;hpb=0da7295795448fc826cb5b2613ac64a6e0c4adcd diff --git a/src/Makefile b/src/Makefile index 8622be32..efca3947 100644 --- a/src/Makefile +++ b/src/Makefile @@ -151,14 +151,18 @@ ifeq ($(COMP),gcc) comp=gcc CXX=g++ CXXFLAGS += -pedantic -Wno-long-long -Wextra -Wshadow - LDFLAGS += -Wl,--no-as-needed + ifneq ($(UNAME),Darwin) + LDFLAGS += -Wl,--no-as-needed + else + LDFLAGS += -Wl + endif endif ifeq ($(COMP),mingw) comp=mingw CXX=g++ CXXFLAGS += -Wextra -Wshadow - LDFLAGS += -static-libstdc++ -static-libgcc + LDFLAGS += -static endif ifeq ($(COMP),icc) @@ -189,8 +193,8 @@ else endif ifeq ($(UNAME),Darwin) - CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.10 - LDFLAGS += -arch $(arch) -mmacosx-version-min=10.10 + CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.9 + LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9 endif ### On mingw use Windows threads, otherwise POSIX @@ -304,12 +308,8 @@ endif ifeq ($(comp),gcc) ifeq ($(optimize),yes) ifeq ($(debug),no) - 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 + CXXFLAGS += -flto + LDFLAGS += $(CXXFLAGS) endif endif endif