On Mon, Feb 03, 2025 at 10:42:21AM -0700, Simon Glass wrote: > The app should be built as a shared library, with position-independent > code and the -shared flags. Update the Makefile to handle this. > > Signed-off-by: Simon Glass <[email protected]> > --- > > Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Makefile b/Makefile > index 3958ea45b9a..990114731b4 100644 > --- a/Makefile > +++ b/Makefile > @@ -452,9 +452,13 @@ KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) > KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) > endif > > +ifdef CONFIG_EFI_APP > +KBUILD_CFLAGS += -shared > +else > # Don't generate position independent code > KBUILD_CFLAGS += $(call cc-option,-fno-PIE) > KBUILD_AFLAGS += $(call cc-option,-fno-PIE) > +endif > > # Read UBOOTRELEASE from include/config/uboot.release (if it exists) > UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
You should tidy up arch/x86/config.mk while doing this, and I assume -znocombreloc ends up being common as well? -- Tom
signature.asc
Description: PGP signature

