[coreboot-gerrit] Patch set updated for coreboot: xcompile: add support for x86-64
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Fri Jun 12 22:29:53 CEST 2015
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8669
-gerrit
commit 561dcc4a134aa1fbec4016226c82d1134c510182
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date: Fri Mar 13 22:52:47 2015 +0100
xcompile: add support for x86-64
Add support for detecting an x86-64 cross compiler in xcompile.
Change-Id: Icd2c9af7903956216db1fd54902eab6da0fe3e21
Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
Signed-off-by: Scott Duplichan <scott at notabs.org>
---
util/xcompile/xcompile | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 97dd7c4..6cad710 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -128,6 +128,10 @@ detect_special_flags() {
testcc "$GCC" "$CFLAGS_GCC -Wno-unused-but-set-variable " &&
CFLAGS_GCC="$CFLAGS_GCC -Wno-unused-but-set-variable "
+ # Check for an operational -m32/-m64
+ testcc "$GCC" "$CFLAGS_GCC -m$TWIDTH " &&
+ CFLAGS_GCC="$CFLAGS_GCC -m$TWIDTH "
+
# Use bfd linker instead of gold if available:
testcc "$GCC" "$CFLAGS_GCC -fuse-ld=bfd" &&
CFLAGS_GCC="$CFLAGS_GCC -fuse-ld=bfd" && LINKER_SUFFIX='.bfd'
@@ -137,12 +141,15 @@ detect_special_flags() {
testcc "$GCC" "$CFLAGS_GCC -Wl,--build-id=none" &&
CFLAGS_GCC="$CFLAGS_GCC -Wl,--build-id=none"
+ # Make sure that / in assembler code means division,
+ # not comment
+ testcc "$GCC" "$CFLAGS_GCC -Wa,--divide" &&
+ CFLAGS_GCC="$CFLAGS_GCC -Wa,--divide"
+ testcc "$CLANG" "$CFLAGS_CLANG -Wa,--divide" &&
+ CFLAGS_CLANG="$CFLAGS_CLANG -Wa,--divide"
+
case "$architecture" in
x86)
- testcc "$GCC" "$CFLAGS_GCC -Wa,--divide" &&
- CFLAGS_GCC="$CFLAGS_GCC -Wa,--divide"
- testcc "$CLANG" "$CFLAGS_CLANG -Wa,--divide" &&
- CFLAGS_CLANG="$CFLAGS_CLANG -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
@@ -201,7 +208,7 @@ EOF
}
# Architecture definitions
-SUPPORTED_ARCHITECTURES="arm arm64 mipsel riscv x86"
+SUPPORTED_ARCHITECTURES="arm arm64 mipsel riscv x64 x86"
arch_config_arm() {
TARCH="arm"
@@ -229,6 +236,14 @@ arch_config_riscv() {
TABI="elf"
}
+arch_config_x64() {
+ TARCH="x86_64"
+ TBFDARCHS="x86-64"
+ TCLIST="x86_64"
+ TWIDTH="64"
+ TABI="elf"
+}
+
arch_config_x86() {
TARCH="x86_32"
TBFDARCHS="i386"
More information about the coreboot-gerrit
mailing list