summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Kuivenhoven <bemk@redhat.com>2014-03-10 12:42:25 +0100
committerBart Kuivenhoven <bemk@redhat.com>2014-03-12 13:17:24 +0100
commit54bfa07f00b25cd474be5ece09c85a211b1fdc2f (patch)
treefa37a6a80cebd00034809f12d7849663bc1341fc
parentcaf95212ec0add94925fef02d8daa0b90a3baee3 (diff)
downloadgnu-efi-3.0-bemk.tar.gz
gnu-efi-3.0-bemk.tar.xz
gnu-efi-3.0-bemk.zip
Make: Compile for aarch64 ... sortabemk
This commit fixes the build process for the current limitations of objcopy. Objcopy still has the problem of not fully understanding relocations so while this compiles, it will not be loadable by uefi. Signed-off-by: Bart Kuivenhoven <bemk@redhat.com>
-rw-r--r--gnu-efi-3.0/Make.defaults9
-rw-r--r--gnu-efi-3.0/Make.rules2
-rw-r--r--gnu-efi-3.0/apps/Makefile4
3 files changed, 11 insertions, 4 deletions
diff --git a/gnu-efi-3.0/Make.defaults b/gnu-efi-3.0/Make.defaults
index cd5db7e..7b9eda4 100644
--- a/gnu-efi-3.0/Make.defaults
+++ b/gnu-efi-3.0/Make.defaults
@@ -46,8 +46,13 @@ TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
# lib and include under the root
#
INSTALLROOT := /
-PREFIX := /usr/local
-LIBDIR := $(PREFIX)/lib
+ifeq ($(ARCH),aarch64)
+ PREFIX := /usr
+ LIBDIR := $(PREFIX)/lib64
+else
+ PREFIX := /usr/local
+ LIBDIR := $(PREFIX)/lib
+endif
INSTALL := install
# Host/target identification
diff --git a/gnu-efi-3.0/Make.rules b/gnu-efi-3.0/Make.rules
index 65fb612..1078af0 100644
--- a/gnu-efi-3.0/Make.rules
+++ b/gnu-efi-3.0/Make.rules
@@ -36,7 +36,7 @@
%.efi: %.so
$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
- -j .rela -j .reloc --target=$(FORMAT) $*.so $@
+ -j .rela -j .reloc --subsystem=efi-app --target=$(FORMAT) $*.so $@
%.so: %.o
$(LD) $(LDFLAGS) $^ -o $@ $(LOADLIBES)
diff --git a/gnu-efi-3.0/apps/Makefile b/gnu-efi-3.0/apps/Makefile
index bd7e658..91d4172 100644
--- a/gnu-efi-3.0/apps/Makefile
+++ b/gnu-efi-3.0/apps/Makefile
@@ -59,7 +59,9 @@ LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
LOADLIBES += -T $(LDSCRIPT)
ifeq ($(ARCH),aarch64)
-FORMAT := pe-aarch64-little
+FORMAT := pei-aarch64-little
+#FORMAT := efi-app-aarch64
+PE_SUBSYSTEM := efi-app
else
FORMAT = efi-app-$(ARCH)
endif