Skip to contentSkip to conversation

binutils : enable x86_64-pep for producing EFI binaries on x86/x86-64

PATCH Superseded Christopher Clark 1 participant 1 message Jul 27, 2018

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 binutils : enable x86_64-pep for producing EFI binaries on x86/x86-64

On x86 and x86_64 architectures, add the x86_64-pep emulation support to the linker to enable production of Portable Executables for EFI binaries.

Enables building the EFI variant of the Xen hypervisor.

---

Changes in v4: unbreak non-x86/x86-64: only supply the configure flag
"--enable-targets=" if also supplying a value to it.

 meta/recipes-devtools/binutils/binutils.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-devtools/binutils/binutils.inc +6 -1
index 37813dd..e269bdb 100644
@@ -74,12 +74,17 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
                 --enable-deterministic-archives \
                 --enable-plugins \
                 ${LDGOLD} \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
+                ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
+                ${ENABLE_EXTRA_TARGETS}"
 
 LDGOLD_class-native = ""
 LDGOLD_class-crosssdk = ""
 LDGOLD ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default --enable-threads', '--enable-gold --enable-ld=default --enable-threads', d)}"
 
+ARCH_EFI_EMULATION_x86-64 = "x86_64-pep"
+ARCH_EFI_EMULATION_x86 = "x86_64-pep"
+ENABLE_EXTRA_TARGETS ?= "${@ "--enable-targets=" + d.getVar('ARCH_EFI_EMULATION') if d.getVar('ARCH_EFI_EMULATION') else ""}"
+
 # This is necessary due to a bug in the binutils Makefiles
 # EXTRA_OEMAKE = "configure-build-libiberty all"
 
Signature · 1 line
2.7.4