diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2013-12-03 18:22:44 +0100 |
---|---|---|
committer | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2013-12-06 16:38:51 +0100 |
commit | e4c657c4afe968c86efe30766a1d14a29c782093 (patch) | |
tree | 568c5c181d2186f23f8dbdbbed658a425d7244ff /payloads | |
parent | 590e8d45581730a210eb32d58a87305ea6edb706 (diff) |
Do not export variables to GRUB build
Variables in coreboot and not in line with GRUB ones. E.g. HOSTCC is both
HOST_CC and BUILD_CC for GRUB (consult INSTALL for more details) and
what coreboot calls CC is TARGET_CC for GRUB.
Current code plugs this by defining variables explicitly but it has a nasty
effect that make stops caring about flags added in makefile itself. Undef
as many variables as possible but still pass them to configure for them to
have correct effect and keep CC assignment as my make version doesn't undefine
it even when instructed to do so.
Tested with qemu.
Change-Id: I9d18f557138a20ae3918d698dee8f5b5c5738f75
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4310
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/external/GRUB2/Makefile.inc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/payloads/external/GRUB2/Makefile.inc b/payloads/external/GRUB2/Makefile.inc index 888151dc9f..4b08e7df43 100644 --- a/payloads/external/GRUB2/Makefile.inc +++ b/payloads/external/GRUB2/Makefile.inc @@ -2,6 +2,20 @@ TAG-$(CONFIG_GRUB2_MASTER)= NAME-$(CONFIG_GRUB2_MASTER)=HEAD unexport KCONFIG_AUTOCONFIG +unexport CFLAGS +unexport CPPFLAGS +unexport CCASFLAGS +unexport CC +unexport BUILD_CC +unexport TARGET_CC +unexport TARGET_CFLAGS +unexport TARGET_CPPFLAGS +unexport TARGET_STRIP +unexport TARGET_OBJCOPY +unexport HOST_CFLAGS +unexport HOST_CPPFLAGS +unexport HOST_CC + all: grub2 @@ -27,12 +41,8 @@ config: checkout grub2: config echo " MAKE GRUB2 $(NAME-y)" - $(MAKE) -C grub2/build BUILD_CC="$(HOSTCC)" CC="$(HOSTCC)" \ - TARGET_CC="$(CC)" TARGET_OBJCOPY="$(OBJCOPY)" \ - TARGET_STRIP="$(STRIP)" CFLAGS=-O2 TARGET_CFLAGS=-Os \ - && $(MAKE) -C grub2/build BUILD_CC="$(HOSTCC)" CC="$(HOSTCC)" \ - TARGET_CC="$(CC)" TARGET_OBJCOPY="$(OBJCOPY)" TARGET_STRIP="$(STRIP)" \ - CFLAGS=-O2 TARGET_CFLAGS=-Os default_payload.elf + $(MAKE) -C grub2/build CC="$(HOSTCC)" + $(MAKE) -C grub2/build default_payload.elf clean: test -d grub2 && $(MAKE) -C grub2 clean || exit 0 |