]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Fix AVX512 build with older compilers
[stockfish] / src / Makefile
index 3d84f4826547076ef241e5f07da09c231d63282b..e34fbf615e1924f23ff26c8fdd39a3b456d1ab05 100644 (file)
@@ -416,7 +416,7 @@ endif
 ifeq ($(avx512),yes)
        CXXFLAGS += -DUSE_AVX512
        ifeq ($(comp),$(filter $(comp),gcc clang mingw))
-               CXXFLAGS += -mavx512bw
+               CXXFLAGS += -mavx512f -mavx512bw
        endif
 endif
 
@@ -472,6 +472,11 @@ ifeq ($(debug), no)
        ifeq ($(gccisclang),)
                CXXFLAGS += -flto
                LDFLAGS += $(CXXFLAGS) -flto=jobserver
+               ifneq ($(findstring MINGW,$(KERNEL)),)
+                       LDFLAGS += -save-temps
+               else ifneq ($(findstring MSYS,$(KERNEL)),)
+                       LDFLAGS += -save-temps
+               endif
        else
                CXXFLAGS += -flto=thin
                LDFLAGS += $(CXXFLAGS)
@@ -605,7 +610,7 @@ objclean:
 # clean auxiliary profiling files
 profileclean:
        @rm -rf profdir
-       @rm -f bench.txt *.gcda *.gcno ./syzygy/*.gcda ./nnue/*.gcda ./nnue/features/*.gcda
+       @rm -f bench.txt *.gcda *.gcno ./syzygy/*.gcda ./nnue/*.gcda ./nnue/features/*.gcda *.s
        @rm -f stockfish.profdata *.profraw
 
 default: