summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-11-04 20:27:11 +0100
committerMartin L Roth <gaumless@gmail.com>2022-11-13 15:27:07 +0000
commit27c94b586cb1692c93a5efc17a636735a3176ffe (patch)
treebff581cd0c55819a6ed8042af77696217d9eac72 /util
parente13b263ef33664ff0029909479dedcfb832075ed (diff)
downloadcoreboot-27c94b586cb1692c93a5efc17a636735a3176ffe.tar.gz
coreboot-27c94b586cb1692c93a5efc17a636735a3176ffe.tar.bz2
coreboot-27c94b586cb1692c93a5efc17a636735a3176ffe.zip
util/xcompile: Fix building for clang + 64bit
-malign-abi does not exist on clang (v15.0.0) and the -ccc-gcc-name variable is not needed anymore. TESTED: This also boots on qemu q35 Change-Id: I7f99ebea18d5c09fdc7ced5c793d57d6fedd2e47 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69232 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/xcompile/xcompile11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index e35904fde1dc..e6d312327be5 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -235,6 +235,13 @@ GCC_CFLAGS_${TARCH}+=-fno-delete-null-pointer-checks -Wlogical-op
GCC_ADAFLAGS_${TARCH}:=${FLAGS_GCC}
GCC_COMPILER_RT_${TARCH}:=${CC_RT_GCC}
GCC_COMPILER_RT_FLAGS_${TARCH}:=${CC_RT_EXTRA_GCC}
+EOF
+if [ "${TARCH}" = "x86_64" ]; then
+cat <<EOF
+ GCC_CFLAGS_${TARCH} += -malign-data=abi
+EOF
+fi
+cat <<EOF
# Clang
CLANG_CC_${TARCH}:=${CLANG}
@@ -270,7 +277,7 @@ EOF
# to use i586 instead.
if [ "${TARCH}" = "x86_64" ]; then
cat <<EOF
- CFLAGS_${TARCH} += -march=nocona -malign-data=abi
+ CFLAGS_${TARCH} += -march=nocona
EOF
fi
@@ -459,7 +466,7 @@ test_architecture() {
# but that's more of a clang limitation. Let's be optimistic
# that this will change in the future.
CLANG="${clang_prefix}clang"
- CFLAGS_CLANG="-target ${clang_arch}-${TABI} $CFLAGS_CLANG -ccc-gcc-name ${GCC}"
+ CFLAGS_CLANG="-target ${clang_arch}-${TABI} $CFLAGS_CLANG"
fi
}