diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2011-06-21 13:35:43 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:31 -0700 |
commit | 41ba20701710481458bcf01c1396c061c8d66886 (patch) | |
tree | bdd4cec9c5919f636082041cbf70b20317a337e2 /Makefile | |
parent | 4b5121741d2b51f138886fdd62253f21f74f31f8 (diff) |
CHROMIUM: export compiler flags
We export compiler flags because vboot_reference (or any library built
outside u-boot) has to be built with the same compiler flags with u-boot
so that the library and u-boot will have compatible ABI, etc.
BUG=chromium-os:16508
TEST=manual
make ARCH=arm \
CROSS_COMPILE=armv7a-cros-linux-gnueabi- \
USE_PRIVATE_LIBGCC=yes \
VBOOT=/build/tegra2_seaboard/usr \
{seaboard_config,u-boot-cflags.mk}
Content of u-boot-cflags.mk
------------------------------------------------------------
CC = armv7a-cros-linux-gnueabi-gcc
CFLAGS = -g -Os -fno-common -ffixed-r8 -msoft-float -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/armv7a-cros-linux-gnueabi/4.4.3/gcc/armv7a-cros-linux-gnueabi/4.4.3/include -pipe -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Werror -Wall -Wstrict-prototypes -fno-stack-protector
------------------------------------------------------------
Change-Id: If1bede099849af73e1770ef662601c2b619a215b
Reviewed-on: http://gerrit.chromium.org/gerrit/2935
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -368,6 +368,16 @@ endif all: $(ALL) +# awk script for extract part of CFLAGS we want to export +AWK_SRC = BEGIN { print "CFLAGS =" } \ + !/^-[DI]/ { printf " %s", $$1 } \ + END { print "\n" } + +$(obj)u-boot-cflags.mk: + echo "CC = $(CC)" > $@ ; \ + echo $(CFLAGS) | \ + awk -v RS='[ \t\n]+' -v ORS='' -- '$(AWK_SRC)' >> $@ + $(obj)u-boot.hex: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ |