summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChe-Liang Chiou <clchiou@chromium.org>2011-10-14 11:11:28 +0800
committerChe-Liang Chiou <clchiou@chromium.org>2011-10-17 20:08:28 -0700
commit6b0003c6381a7e69818b0b34b358c2cfb1393043 (patch)
treee00bb7828c24c49c7786f8e09fadcbcde8433060
parent74554733156c33cd79ed90563e9a92e5fa011cbe (diff)
downloadvboot-release-R16-1193.B.tar.gz
Remove -isystem from CFLAGS for firmware buildrelease-R16-1193.B
The -isystem and the rest of the CFLAGS for firmware builds is copied from U-Boot, where U-Boot generates it on the fly, as a temporary solution before we figure out how make the CFLAGS right. Given that, the hard-coded -isystem is both incorrect (since tool chain is upgraded to a new version) and unnecessary. It is unnecessary because firmware lib is carefully written that the lib does not (and probably should not) depend on any system header. Even if in the future a system header is added to the firmware lib, because firmware build sets -nostdinc to CFLAGS, the compiler will safely report missing header instead of silently using the standard system header. So this commit removes the -isystem. BUG=chromium-os:16808 TEST=Make sure non-firmware build still works by running `emerge-{tegra2_seaboard,x86-alex} vboot_reference` TEST=Run firmware build successfully `emerge-{tegra2_seaboard,x86-alex} vboot_reference-firmware` TEST=Add #include<stdarg.h> to any header in firmware/include/ and run firmware build again and observe build fail on missing stdarg.h Change-Id: I8291390f21a975446993640d7a92a3eed4750e32 Reviewed-on: http://gerrit.chromium.org/gerrit/10072 Tested-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 4fac353c..d2ddd88b 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,9 @@ CFLAGS += -O0 -g
endif
#
-# TODO We hard-code u-boot's compiler flags here just temporarily. As we are
-# still investigating which flags are necessary for maintaining a compatible
-# ABI, etc. between u-boot and vboot_reference.
+# TODO(crosbug.com/16808) We hard-code u-boot's compiler flags here just
+# temporarily. As we are still investigating which flags are necessary for
+# maintaining a compatible ABI, etc. between u-boot and vboot_reference.
#
# Override CC and CFLAGS for firmware builds; if you have any -D flags, please
# add them after this point (e.g., -DVBOOT_DEBUG).
@@ -27,7 +27,6 @@ ifeq ($(FIRMWARE_ARCH), arm)
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
endif
@@ -35,7 +34,6 @@ ifeq ($(FIRMWARE_ARCH), i386)
CC = i686-pc-linux-gnu-gcc
CFLAGS = -g -Os -ffunction-sections -fvisibility=hidden -fno-builtin \
-ffreestanding -nostdinc \
- -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/gcc/i686-pc-linux-gnu/4.4.3/include \
-pipe -fno-strict-aliasing -Wstrict-prototypes -mregparm=3 \
-fomit-frame-pointer -ffreestanding -fno-toplevel-reorder \
-fno-stack-protector -mpreferred-stack-boundary=2 -fno-dwarf2-cfi-asm \