summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-07 08:47:14 -0700
committerAlexander Graf <agraf@suse.de>2016-11-14 23:24:04 +0100
commit2dcd4e9ee1b6dc0f0ba1d89a7af3987ea47dda23 (patch)
treebee452040b1403b2feab1709c8fff3b44e80bbfa /arch/x86/lib/Makefile
parentd36badfdc6a47ae1377dde809c9ea6f6249f5c15 (diff)
downloadu-boot-2dcd4e9ee1b6dc0f0ba1d89a7af3987ea47dda23.tar.gz
u-boot-2dcd4e9ee1b6dc0f0ba1d89a7af3987ea47dda23.tar.xz
u-boot-2dcd4e9ee1b6dc0f0ba1d89a7af3987ea47dda23.zip
x86: Move efi .S files into the 'lib' directory
These files now need to be in a standard place so that they can be located by generic Makefile rules. Move them to the 'lib' directory. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/x86/lib/Makefile')
-rw-r--r--arch/x86/lib/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index b9c29226bd..aad6555a71 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -44,3 +44,21 @@ NORMAL_LIBGCC = $(shell $(CC) $(PLATFORM_CPPFLAGS) -print-libgcc-file-name)
OBJCOPYFLAGS := --prefix-symbols=__normal_
$(obj)/lib.a: $(NORMAL_LIBGCC) FORCE
$(call if_changed,objcopy)
+
+obj-$(CONFIG_EFI_APP) += crt0_ia32_efi.o reloc_ia32_efi.o
+
+ifneq ($(CONFIG_EFI_STUB),)
+
+CFLAGS_REMOVE_reloc_ia32_efi.o += -mregparm=3
+CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar
+
+# When building for 64-bit we must remove the i386-specific flags
+CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32
+CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar
+
+AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32
+AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar
+
+extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o
+extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o
+endif