[coreboot-gerrit] New patch to review for coreboot: 981f311 xcompile: always use -march=i686

Isaac Christensen (isaac.christensen@se-eng.com) gerrit at coreboot.org
Tue Aug 19 22:13:31 CEST 2014


Isaac Christensen (isaac.christensen at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6716

-gerrit

commit 981f31166170b590b7724788af818245715addb0
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Thu Oct 10 12:44:11 2013 -0500

    xcompile: always use -march=i686
    
    When compiling coreboot for x86 on gcc the compiler is
    free to pick whatever defaults it is using at the time of
    gcc's compile/configuration when no -march is specified.
    Not properly specifying -march then opens up the use of SSE
    instructions for copmilation units it should not be used such
    as the SMM module as this module doesn't save/restore SSE
    registers.
    
    Change-Id: I64d4a6c5fa9fadb4b35bc7097458e992a094dcba
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    Reviewed-on: https://chromium-review.googlesource.com/172640
    Reviewed-by: Stefan Reinauer <reinauer at google.com>
    (cherry picked from commit d49358f7959bb52c3e7ff67d37c21a1b294adf72)
    Signed-off-by: Isaac Christensen <isaac.christensen at se-eng.com>
---
 util/xcompile/xcompile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 01d75bf..4b18942 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -138,6 +138,11 @@ detect_special_flags() {
 	x86)
 		testcc "$CC"   "$CFLAGS -Wa,--divide" &&
 			CFLAGS="$CFLAGS -Wa,--divide"
+		# 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="$CFLAGS  -march=i686"
 		;;
 	esac
 }



More information about the coreboot-gerrit mailing list