From 0cd9ff8987f9d4f303e01aefe9bfc812916fee04 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Mon, 1 Feb 2016 17:33:37 -0700 Subject: xcompile: Add a way to specify -march=i586 Instead of instructing users to edit xcompile when they want to build a quark platform, give the build a way to set -march=586 so that the quark code will build correctly. The Quark processor does not support the instructions introduced with the Pentium 6 architecture. Change-Id: I0ed69aadc515f86f76800180e0e33bcd75feac5a Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/13552 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) Reviewed-by: Leroy P Leahy Reviewed-by: Patrick Georgi Reviewed-by: FEI WANG --- util/xcompile/xcompile | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'util/xcompile') diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 176518362f..79c8a4c0b0 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -182,11 +182,6 @@ detect_special_flags() { case "$architecture" in x86) - # Always build for i686 -- no sse/mmx instructions since SMM - # modules are compiled using these flags. Note that this - # doesn't prevent a project using xcompile to explicitly - # specify -mmsse, etc flags. - CFLAGS_GCC="$CFLAGS_GCC -march=i686" ;; x64) ;; @@ -224,6 +219,27 @@ GCC_CC_${TARCH}:=${GCC} GCC_CFLAGS_${TARCH}:=${CFLAGS_GCC} GCC_COMPILER_RT_${TARCH}:=${CC_RT_GCC} GCC_COMPILER_RT_FLAGS_${TARCH}:=${CC_RT_EXTRA_GCC} +EOF + +# Generally the x86 should build for i686 -- no sse/mmx +# instructions since SMM modules are compiled using these +# flags. Note that this doesn't prevent a project using +# xcompile to explicitly specify -mmsse, etc flags. +# The Quark processor doesn't support the instructions +# introduced with the Pentium 6 architecture, so allow it +# to use i586 instead. +if [ "${TARCH}" = "x86_64" ] || [ "${TARCH}" = "x86_32" ]; then +cat <