summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2015-06-04 13:20:24 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-06-04 20:01:29 +0200
commit532df293da6f82cdbc10fd02b224ba8131d42533 (patch)
tree51208441ef1da15ff34dc04c44c2ec2a26a794cd /util
parent93af2f271d8448dd99c52b9eb0aeeb1ac9c2e87d (diff)
downloadcoreboot-532df293da6f82cdbc10fd02b224ba8131d42533.tar.xz
xcompile: Rename internal variable CFLAGS to CFLAGS_GCC
This is in preparation of adding support for clang to xcompile. Change-Id: I518d077f134610082b0939b1525682f2289eec34 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/10423 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/xcompile/xcompile38
1 files changed, 19 insertions, 19 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 28b3d2686a..0a22c34ca4 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -100,11 +100,11 @@ testas() {
if [ -z "$use_dash_twidth" ]; then
ASFLAGS=""
- CFLAGS=""
+ CFLAGS_GCC=""
LDFLAGS=""
else
ASFLAGS="--$twidth"
- CFLAGS="-m$twidth"
+ CFLAGS_GCC="-m$twidth"
LDFLAGS="-b $full_arch"
fi
@@ -113,7 +113,7 @@ testas() {
[ -n "$use_dash_twidth" ] && case "$full_arch" in
"elf32-i386" )
LDFLAGS="$LDFLAGS -melf_i386"
- CFLAGS="$CFLAGS -Wl,-b,elf32-i386 -Wl,-melf_i386"
+ CFLAGS_GCC="$CFLAGS_GCC -Wl,-b,elf32-i386 -Wl,-melf_i386"
;;
esac
@@ -124,35 +124,35 @@ detect_special_flags() {
local architecture="$1"
# GCC 4.6 is much more picky about unused variables.
# Turn off it's warnings for now:
- testcc "$CC" "$CFLAGS -Wno-unused-but-set-variable " &&
- CFLAGS="$CFLAGS -Wno-unused-but-set-variable "
+ testcc "$CC" "$CFLAGS_GCC -Wno-unused-but-set-variable " &&
+ CFLAGS_GCC="$CFLAGS_GCC -Wno-unused-but-set-variable "
# Use bfd linker instead of gold if available:
- testcc "$CC" "$CFLAGS -fuse-ld=bfd" &&
- CFLAGS="$CFLAGS -fuse-ld=bfd" && LINKER_SUFFIX='.bfd'
+ testcc "$CC" "$CFLAGS_GCC -fuse-ld=bfd" &&
+ CFLAGS_GCC="$CFLAGS_GCC -fuse-ld=bfd" && LINKER_SUFFIX='.bfd'
- testcc "$CC" "$CFLAGS -fno-stack-protector"&&
- CFLAGS="$CFLAGS -fno-stack-protector"
- testcc "$CC" "$CFLAGS -Wl,--build-id=none" &&
- CFLAGS="$CFLAGS -Wl,--build-id=none"
+ testcc "$CC" "$CFLAGS_GCC -fno-stack-protector"&&
+ CFLAGS_GCC="$CFLAGS_GCC -fno-stack-protector"
+ testcc "$CC" "$CFLAGS_GCC -Wl,--build-id=none" &&
+ CFLAGS_GCC="$CFLAGS_GCC -Wl,--build-id=none"
case "$architecture" in
x86)
- testcc "$CC" "$CFLAGS -Wa,--divide" &&
- CFLAGS="$CFLAGS -Wa,--divide"
+ testcc "$CC" "$CFLAGS_GCC -Wa,--divide" &&
+ CFLAGS_GCC="$CFLAGS_GCC -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"
+ CFLAGS_GCC="$CFLAGS_GCC -march=i686"
;;
mipsel)
- testcc "$CC" "$CFLAGS -mno-abicalls -fno-pic" && \
- CFLAGS+=" -mno-abicalls -fno-pic"
+ testcc "$CC" "$CFLAGS_GCC -mno-abicalls -fno-pic" && \
+ CFLAGS_GCC+=" -mno-abicalls -fno-pic"
# Enforce little endian mode.
- testcc "$CC" "$CFLAGS -EL" && \
- CFLAGS+=" -EL"
+ testcc "$CC" "$CFLAGS_GCC -EL" && \
+ CFLAGS_GCC+=" -EL"
;;
esac
}
@@ -163,7 +163,7 @@ report_arch_toolchain() {
ARCH_SUPPORTED+=${TARCH}
SUBARCH_SUPPORTED+=${TSUPP-${TARCH}}
CC_${TARCH}:=${GCCPREFIX}gcc
-CFLAGS_${TARCH}:=${CFLAGS}
+CFLAGS_${TARCH}:=${CFLAGS_GCC}
CPP_${TARCH}:=${GCCPREFIX}cpp
AS_${TARCH}:=${GCCPREFIX}as ${ASFLAGS}
LD_${TARCH}:=${GCCPREFIX}ld${LINKER_SUFFIX} ${LDFLAGS}