]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: move HOST_ARCH to version_autogenerated.h
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 3 Apr 2024 23:00:41 +0000 (01:00 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 8 Apr 2024 11:04:48 +0000 (13:04 +0200)
efi_default_filename.h requires HOST_ARCH to be defined. Up to now we
defined it via a CFLAGS. This does not scale. Add the symbol to
version_autogenerated.h instead.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Makefile
arch/sandbox/config.mk
include/host_arch.h
lib/efi_loader/Makefile

index ba660976547f65af7f0fe01e99d5633a952d35a7..1069adca91e45b256df9d180385a728b22f96061 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1963,6 +1963,7 @@ define filechk_version.h
        echo \#define U_BOOT_VERSION_NUM $(VERSION); \
        echo \#define U_BOOT_VERSION_NUM_PATCH $$(echo $(PATCHLEVEL) | \
                sed -e "s/^0*//"); \
+       echo \#define HOST_ARCH $(HOST_ARCH); \
        echo \#define CC_VERSION_STRING \"$$(LC_ALL=C $(CC) --version | head -n 1)\"; \
        echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; )
 endef
index 1d50991f8d24d3b815e0ffdd1301a8405254ef50..405843800e9e8094af692df8b0e4247447398cec 100644 (file)
@@ -69,5 +69,3 @@ EFI_LDS := ${SRCDIR}/../../../arch/riscv/lib/elf_riscv64_efi.lds
 endif
 EFI_CRT0 := crt0_sandbox_efi.o
 EFI_RELOC := reloc_sandbox_efi.o
-AFLAGS_crt0_sandbox_efi.o += -DHOST_ARCH="$(HOST_ARCH)"
-CFLAGS_reloc_sandbox_efi.o += -DHOST_ARCH="$(HOST_ARCH)"
index 169d4945136d4ed4fe2c008cd22433e6da7b42d4..261194bd7c6e40575f80a48d005c194c909400f0 100644 (file)
@@ -16,6 +16,8 @@ export HOST_ARCH_X86=0x0386
 export HOST_ARCH_X86_64=0x8664
 #endif
 
+#include <version.h>
+
 #define HOST_ARCH_AARCH64 0xaa64
 #define HOST_ARCH_ARM 0x00a7
 #define HOST_ARCH_RISCV32 0x5032
index fcb0af7e7d6dc426757042715642998ee5c04a87..086521fb28786ed1fb20c3f022f0ea38cea9fe99 100644 (file)
@@ -6,8 +6,7 @@
 # This file only gets included with CONFIG_EFI_LOADER set, so all
 # object inclusion implicitly depends on it
 
-asflags-y += -DHOST_ARCH="$(HOST_ARCH)" -I.
-ccflags-y += -DHOST_ARCH="$(HOST_ARCH)"
+asflags-y += -I.
 
 CFLAGS_efi_boottime.o += \
   -DFW_VERSION="0x$(VERSION)" \