[PATCH 27/31] Makefile: Disable LTO when building with MSYS2
Simon Glass
sjg at chromium.org
Tue Apr 25 01:08:32 CEST 2023
This creates a lot of errors of the form:
`__stack_chk_fail' referenced in section `.text' of ...ltrans.o: defined
in discarded section `.text' of common/stackprot.o (symbol from plugin)
Drop LTO for now.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 08eab87d0a11..3a35d14a4497 100644
--- a/Makefile
+++ b/Makefile
@@ -658,9 +658,11 @@ export EFI_TARGET # binutils target if EFI is natively supported
export LTO_ENABLE
# This is y if LTO is enabled for this build. See NO_LTO=1 to disable LTO
+ifeq ($(MSYS_VERSION),0)
ifeq ($(NO_LTO),)
LTO_ENABLE=$(if $(CONFIG_LTO),y)
endif
+endif
# If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
# that (or fail if absent). Otherwise, search for a linker script in a
--
2.40.0.634.g4ca3ef3211-goog
More information about the U-Boot
mailing list