]> git.baikalelectronics.ru Git - uboot.git/commitdiff
examples: Don't use LTO for hello_world
authorTom Rini <trini@konsulko.com>
Thu, 9 Mar 2023 16:22:09 +0000 (11:22 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 22 Mar 2023 19:22:48 +0000 (15:22 -0400)
If we're building U-Boot with LTO, we don't want to use that for
examples as it's more work than required.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
examples/standalone/Makefile

index 5b48a9d43c6251d2b7951ee27641b5ca29851d91..559170dd5c97305300db1675c3343f0f90c6ba9b 100644 (file)
@@ -29,6 +29,10 @@ targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBOBJS-y)
 LIBOBJS        := $(addprefix $(obj)/,$(LIBOBJS-y))
 ELF    := $(addprefix $(obj)/,$(ELF))
 
+# Disable LTO for these builds
+CFLAGS_REMOVE_hello_world.o := $(LTO_CFLAGS)
+CFLAGS_REMOVE_stubs.o := $(LTO_CFLAGS)
+
 # For PowerPC there's no need to compile standalone applications as a
 # relocatable executable.  The relocation data is not needed, and
 # also causes the entry point of the standalone application to be