summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-03-13 22:52:47 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-16 08:41:53 +0200
commitae9f87fc1bbaf9ef0c0936d3a52d1bae4ffd3732 (patch)
tree6420f1273684db74256157c2ed53a402067e7579 /util
parent7ffc71e047c27bc59a3e957f673572202e08e959 (diff)
downloadcoreboot-ae9f87fc1bbaf9ef0c0936d3a52d1bae4ffd3732.tar.xz
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@coreboot.org> Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-on: http://review.coreboot.org/8669 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/xcompile/xcompile14
1 files changed, 13 insertions, 1 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 97dd7c4004..07bcde7a6d 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'
@@ -201,7 +205,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 +233,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"