[coreboot-gerrit] Change in coreboot[master]: libpayload: Enable building libpayload with march=i586

Lee Leahy (Code Review) gerrit at coreboot.org
Sat Jun 24 00:35:24 CEST 2017


Lee Leahy has uploaded this change for review. ( https://review.coreboot.org/20322


Change subject: libpayload: Enable building libpayload with march=i586
......................................................................

libpayload: Enable building libpayload with march=i586

Add a Kconfig value to enable building libpayload with the 586 compiler.
Update the cross compiler script to add the Kconfig value name that is
used when libpayload builds.

The Quark SOC does not support some of the instructions generated with
the 686 compiler (e.g. CMOV).  Success occurs when
payloads/libpayload/build/config.h indicates that
CONFIG_LP_USE_MARCH_586=1.

TEST=Build and run on Galileo Gen2.

Change-Id: I04907e9a38ee139bae2e8b227821f54614707c25
Signed-off-by: Lee Leahy <Leroy.P.Leahy at intel.com>
---
M payloads/libpayload/Kconfig
M util/xcompile/xcompile
2 files changed, 13 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/20322/1

diff --git a/payloads/libpayload/Kconfig b/payloads/libpayload/Kconfig
index dcb1f4e..5a5bce2 100644
--- a/payloads/libpayload/Kconfig
+++ b/payloads/libpayload/Kconfig
@@ -157,6 +157,14 @@
 
 endmenu
 
+config USE_MARCH_586
+	bool "Use march=586 qualifier to build"
+	default n
+	depends on ARCH_X86
+	help
+	  Allow a platform or processor to select to be compiled using
+	  the '-march=i586' option instead of the typical '-march=i686'
+
 menu "Standard Libraries"
 
 config LIBC
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 347ae8e..7b66247 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -238,7 +238,11 @@
 ifeq (\$(CONFIG_USE_MARCH_586),y)
 	GCC_CFLAGS_${TARCH} += -march=i586
 else
-	GCC_CFLAGS_${TARCH} += -march=i686
+	ifeq (\$(CONFIG_LP_USE_MARCH_586),y)
+		GCC_CFLAGS_${TARCH} += -march=i586
+	else
+		GCC_CFLAGS_${TARCH} += -march=i686
+	endif
 endif
 EOF
 fi

-- 
To view, visit https://review.coreboot.org/20322
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I04907e9a38ee139bae2e8b227821f54614707c25
Gerrit-Change-Number: 20322
Gerrit-PatchSet: 1
Gerrit-Owner: Lee Leahy <leroy.p.leahy at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170623/d7b6bc89/attachment.html>


More information about the coreboot-gerrit mailing list