aports/testing/stockfish/no-lto.patch
2025-03-03 22:38:17 +00:00

47 lines
1.3 KiB
Diff

diff --git a/Makefile b/Makefile
index 7142b972..abfac5ad 100644
--- a/Makefile
+++ b/Makefile
@@ -744,41 +744,6 @@ ifneq ($(ARCH), )
CXXFLAGS += -DARCH=$(ARCH)
endif
-### 3.9 Link Time Optimization
-### This is a mix of compile and link time options because the lto link phase
-### needs access to the optimization flags.
-ifeq ($(optimize),yes)
-ifeq ($(debug), no)
- ifeq ($(comp),$(filter $(comp),clang icx))
- CXXFLAGS += -flto=full
- ifeq ($(comp),icx)
- CXXFLAGS += -fwhole-program-vtables
- endif
- ifeq ($(target_windows),yes)
- CXXFLAGS += -fuse-ld=lld
- endif
- LDFLAGS += $(CXXFLAGS)
-
-# GCC and CLANG use different methods for parallelizing LTO and CLANG pretends to be
-# GCC on some systems.
- else ifeq ($(comp),gcc)
- ifeq ($(gccisclang),)
- CXXFLAGS += -flto -flto-partition=one
- LDFLAGS += $(CXXFLAGS) -flto=jobserver
- else
- CXXFLAGS += -flto=full
- LDFLAGS += $(CXXFLAGS)
- endif
-
-# To use LTO and static linking on Windows,
-# the tool chain requires gcc version 10.1 or later.
- else ifeq ($(comp),mingw)
- CXXFLAGS += -flto -flto-partition=one
- LDFLAGS += $(CXXFLAGS) -save-temps
- endif
-endif
-endif
-
### 3.10 Android 5 can only run position independent executables. Note that this
### breaks Android 4.0 and earlier.
ifeq ($(OS), Android)