summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-06-28 08:15:21 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-06-28 07:06:45 -0700
commit6f38ed23f3d467937f15cf0474b8f323564bcc0d (patch)
tree1e3e0e645638fd176ef184ce80debedf35d646c6 /Makefile
parentcacc1c8ac679b66876cf3e65c58f2bf874498050 (diff)
downloadchrome-ec-6f38ed23f3d467937f15cf0474b8f323564bcc0d.tar.gz
Makefile.toolchain: Switch from cpp to $(CC) -E
Makes it more straightforward to switch to clang preprocessor later on. This requires a few other modifications in the Makefiles (gcc -E does not read from stdin by default, and does not process files that do not end in .c/.h). BRANCH=none BUG=chromium:854924 TEST=make buildall -j TEST=Before and after the change, all ec.bin binaries are identical: git checkout m/master make REAL_SIGNER=dummy buildall -j mv build build-master find build-master -type d | sed -e 's/-master//' | \ xargs -I{} mkdir -p {} find build-master -name ec_version.h | sed -e 's|build-master/||' | \ xargs -I{} cp build-master/{} build/{} git checkout this-cl => comment out .PHONY: $(out)/ec_version.h in Makefiles.rules make REAL_SIGNER=dummy buildall -j find build-master -name ec.bin | sed -e 's|build-master/||' | \ xargs -I{} diff build-master/{} build/{} => No difference Change-Id: If07f033dc7e9a73245499c656562bb906dcd4130 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1117721 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 4460c2f045..53d49b0155 100644
--- a/Makefile
+++ b/Makefile
@@ -146,21 +146,21 @@ ifneq "$(CONFIG_COMMON_RUNTIME)" "y"
_irq_list:=$(shell $(CPP) $(CPPFLAGS) -P -Ichip/$(CHIP) -I$(BASEDIR) \
-I$(BDIR) -D"ENABLE_IRQ(x)=EN_IRQ x" \
-imacros chip/$(CHIP)/registers.h \
- $(BDIR)/ec.irqlist | grep "EN_IRQ .*" | cut -c8-)
+ - < $(BDIR)/ec.irqlist | grep "EN_IRQ .*" | cut -c8-)
CPPFLAGS+=$(foreach irq,$(_irq_list),\
-D"irq_$(irq)_handler_optional=irq_$(irq)_handler")
endif
# Compute RW firmware size and offset
_rw_off_str:=$(shell echo "CONFIG_RW_MEM_OFF" | $(CPP) $(CPPFLAGS) -P \
- -Ichip/$(CHIP) -I$(BASEDIR) -I$(BDIR) -imacros include/config.h)
+ -Ichip/$(CHIP) -I$(BASEDIR) -I$(BDIR) -imacros include/config.h -)
_rw_off:=$(shell echo "$$(($(_rw_off_str)))")
_rw_size_str:=$(shell echo "CONFIG_RW_SIZE" | $(CPP) $(CPPFLAGS) -P \
- -Ichip/$(CHIP) -I$(BASEDIR) -I$(BDIR) -imacros include/config.h)
+ -Ichip/$(CHIP) -I$(BASEDIR) -I$(BDIR) -imacros include/config.h -)
_rw_size:=$(shell echo "$$(($(_rw_size_str)))")
_program_memory_base_str:=$(shell echo "CONFIG_PROGRAM_MEMORY_BASE" | \
- $(CPP) $(CPPFLAGS) -P \
- -Ichip/$(CHIP) -I$(BDIR) -I$(BASEDIR) -imacros include/config.h)
+ $(CPP) $(CPPFLAGS) -P \
+ -Ichip/$(CHIP) -I$(BDIR) -I$(BASEDIR) -imacros include/config.h -)
_program_memory_base=$(shell echo "$$(($(_program_memory_base_str)))")
$(eval BASEBOARD_$(UC_BASEBOARD)=y)