diff options
author | Yilun Lin <yllin@google.com> | 2019-05-24 11:18:26 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-06-03 01:11:04 -0700 |
commit | 49436b18d2a77b994fe76d8c2f070000e2cdb58a (patch) | |
tree | 327729dead0cf855fca17c067d499c66773ebe06 /common/build.mk | |
parent | 7ccb50f4352309813cffd98460bd7dcb48d4657f (diff) | |
download | chrome-ec-49436b18d2a77b994fe76d8c2f070000e2cdb58a.tar.gz |
Makefile: Replace flag -DX with -DX= to be supported by IS_ENABLED().
IS_ENABLED works for an empty-string-defined macro.
However, -D options default to define the macro to 1. This CL forces
those macros, such as BOARD_* CHIP_*, CORE_*, CHIP_VARIANT_* and
CHIP_FAMILIY_*, to be defined as an empty string, so that it can
be supported by IS_ENABLED macro.
TEST=use if(IS_ENABLED(BOARD_KRANE)) and see compilation success.
TEST=compares build directory w/ and w/o this CL, and see the .smap
are the same:
ls build/*/*/ec.*.smap | sed -e 's|build/||' | \
xargs -I{} diff -u -a build/{} build.new/{}
BUG=none
BRANCH=None
Change-Id: I96e2aa1cb5f3369e5e445a674595a9234f26707a
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1627840
Commit-Ready: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'common/build.mk')
-rw-r--r-- | common/build.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/build.mk b/common/build.mk index 3e08cab72d..923c284949 100644 --- a/common/build.mk +++ b/common/build.mk @@ -183,7 +183,7 @@ ifneq ($(CONFIG_BOOTBLOCK),) build-util-bin += gen_emmc_transfer_data # Bootblock is only packed in RO image. -$(out)/util/gen_emmc_transfer_data: BUILD_LDFLAGS += -DSECTION_IS_RO +$(out)/util/gen_emmc_transfer_data: BUILD_LDFLAGS += -DSECTION_IS_RO=$(EMPTY) $(out)/bootblock_data.h: $(out)/util/gen_emmc_transfer_data $(out)/.bootblock $(call quiet,emmc_bootblock,BTBLK ) |