summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2012-12-27 13:30:55 -0800
committerRonald G. Minnich <rminnich@gmail.com>2013-01-04 00:48:49 +0100
commit10c90d31264b5698320a1ac2666823532d110258 (patch)
tree520cb6ddb4248986a198b0280f34beea76ebbbbd
parent72a2eaf4d5364d5c5b7632b75d62c84f7bf490c8 (diff)
downloadcoreboot-10c90d31264b5698320a1ac2666823532d110258.tar.xz
update CFLAGS for armv7
This updates $CFLAGS used for armv7. Most of them were just added to be consistent with what u-boot does. The important ones here are -march=armv7-a and -mthumb (to allow 16-bit Thumb instructions). I removed the hard float support because it got errors and coreboot should never use floats anyway. We're still having trouble with enums but I want to see how far it gets with this patch. Also, put the flags in a form that makes diffs easier to read. It's almost impossible otherwise. Finally, move some flags to the architecture Makefile, and rely on the fact that some are set for all architectures. Depends-On: I6f730d017391f9ec4401cdfd34931c869df10a9e Change-Id: Ia8a1ae22959933e06f7b996d1832cea40819f1ff Signed-off-by: David Hendricks <dhendrix@chromium.org> Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/2075 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/arch/armv7/Makefile.inc10
-rw-r--r--util/xcompile/xcompile11
2 files changed, 13 insertions, 8 deletions
diff --git a/src/arch/armv7/Makefile.inc b/src/arch/armv7/Makefile.inc
index 245cd8a299..9e57244e37 100644
--- a/src/arch/armv7/Makefile.inc
+++ b/src/arch/armv7/Makefile.inc
@@ -138,6 +138,16 @@ endif
################################################################################
# done
+CFLAGS += \
+ -fno-common\
+ -ffixed-r8\
+ -mabi=aapcs-linux\
+ -march=armv7-a\
+ -marm\
+ -mno-unaligned-access\
+ -mthumb\
+ -mthumb-interwork
+
# For various headers imported from Linux
CFLAGS += -D__KERNEL__
CFLAGS += -D__LINUX_ARM_ARCH__=7
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 42391764c5..ea975ecab8 100644
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -106,14 +106,9 @@ detect_special_flags() {
CFLAGS="$CFLAGS -Wl,--build-id=none"
case "$architecture" in
- arm )
- # testcc "$CC" "$CFLAGS -mcpu=cortex-a9" &&
- # CFLAGS="$CFLAGS -mcpu=cortex-a9"
- testcc "$CC" "\
-$CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \
--mno-thumb-interwork -march=armv7 -mno-thumb-interwork" && CFLAGS="\
-$CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \
--mno-thumb-interwork -march=armv7 -mno-thumb-interwork"
+ armv7 )
+ ARMFLAGS=""
+ testcc "$CC" "$CFLAGS $ARMFLAGS"&&CFLAGS="$CFLAGS $ARMFLAGS"
;;
esac
}