diff mbox

[U-Boot,v4,05/14] efi: Makefile: Export variables for use with EFI

Message ID 1478533636-17577-6-git-send-email-sjg@chromium.org
State Accepted
Commit bb1ae55948377b6b75d2230fd8fea69106477d81
Delegated to: Alexander Graf
Headers show

Commit Message

Simon Glass Nov. 7, 2016, 3:47 p.m. UTC
When building an EFI app we need three things:

   - start-up code
   - relocation code
   - link script

These are all different for each architecture. We also need special
compiler flags in some cases.

Add top-level Makefile variables for these along with documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Alexander Graf Nov. 14, 2016, 11:06 p.m. UTC | #1
> When building an EFI app we need three things:
> 
>    - start-up code
>    - relocation code
>    - link script
> 
> These are all different for each architecture. We also need special
> compiler flags in some cases.
> 
> Add top-level Makefile variables for these along with documentation.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Thanks, applied to efi-next

Alex
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 37cbcb2..d3a6a12 100644
--- a/Makefile
+++ b/Makefile
@@ -527,6 +527,15 @@  endif
 endif
 endif
 
+# These are set by the arch-specific config.mk. Make sure they are exported
+# so they can be used when building an EFI application.
+export EFI_LDS		# Filename of EFI link script in arch/$(ARCH)/lib
+export EFI_CRT0		# Filename of EFI CRT0 in arch/$(ARCH)/lib
+export EFI_RELOC	# Filename of EFU relocation code in arch/$(ARCH)/lib
+export CFLAGS_EFI	# Compiler flags to add when building EFI app
+export CFLAGS_NON_EFI	# Compiler flags to remove when building EFI app
+export EFI_TARGET	# binutils target if EFI is natively supported
+
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.