[OE-core] [PATCH v2] binutils : enable x86_64-pep for producing EFI binaries

Christopher Clark christopher.w.clark at gmail.com
Wed Jul 25 23:46:34 UTC 2018


From: Christopher Clark <christopher.clark6 at baesystems.com>

On EFI architectures (arm/x86/x86_64/aarch64) 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.

Signed-off-by: Christopher Clark <christopher.clark6 at baesystems.com>
---
 meta/recipes-devtools/binutils/binutils.inc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 37813dd..b3efbad 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -69,12 +69,19 @@ python do_package_prepend() {
 
 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
 
+def enable_efi_targets(d):
+    translated_arch = d.getVar('TRANSLATED_TARGET_ARCH')
+    if translated_arch in ["x86-64", "i586", "i686", "arm", "aarch64"]:
+        return "--enable-targets=x86_64-pep"
+    return ""
+
 EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
                 --disable-werror \
                 --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_efi_targets(d)}"
 
 LDGOLD_class-native = ""
 LDGOLD_class-crosssdk = ""
-- 
2.7.4




More information about the Openembedded-core mailing list