aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/recipes-bsp/rmc/files/0001-RMC-Support-x32-build.patch29
-rw-r--r--common/recipes-bsp/rmc/rmc.bb4
2 files changed, 32 insertions, 1 deletions
diff --git a/common/recipes-bsp/rmc/files/0001-RMC-Support-x32-build.patch b/common/recipes-bsp/rmc/files/0001-RMC-Support-x32-build.patch
new file mode 100644
index 00000000..a6d183f5
--- /dev/null
+++ b/common/recipes-bsp/rmc/files/0001-RMC-Support-x32-build.patch
@@ -0,0 +1,29 @@
+From c0d2abc3f77e54a467a035f744f8252a54d0b0ea Mon Sep 17 00:00:00 2001
+From: sweeaun <swee.aun.khor@intel.com>
+Date: Thu, 29 Jun 2017 15:47:46 -0700
+Subject: [PATCH] RMC: Support x32 build
+
+RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.
+
+Signed-off-by: sweeaun <swee.aun.khor@intel.com>
+---
+ Makefile.efi | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Makefile.efi b/Makefile.efi
+index 4f69dfe..95e0f8c 100644
+--- a/Makefile.efi
++++ b/Makefile.efi
+@@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
+
+ RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc -nostdlib -fno-builtin -std=gnu90
+
++#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32
++CC := $(patsubst -mx32, -m64, $(CC))
++
+ all: librmcefi
+
+ $(RMC_LIB_OBJ): %.efi.o: %.c
+--
+2.7.4
+
diff --git a/common/recipes-bsp/rmc/rmc.bb b/common/recipes-bsp/rmc/rmc.bb
index 93fdd3aa..0abbf911 100644
--- a/common/recipes-bsp/rmc/rmc.bb
+++ b/common/recipes-bsp/rmc/rmc.bb
@@ -12,7 +12,9 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8"
-SRC_URI = "git://git.yoctoproject.org/rmc"
+SRC_URI = "git://git.yoctoproject.org/rmc \
+ file://0001-RMC-Support-x32-build.patch \
+ "
SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9"