summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
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.toolchain
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.toolchain')
-rw-r--r--Makefile.toolchain2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 37100780d1..093721eede 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -22,7 +22,7 @@ HOST_CROSS_COMPILE:=$(if $(shell which x86_64-pc-linux-gnu-gcc 2>/dev/null),x86_
endif
CC=$(CCACHE) $(CROSS_COMPILE)gcc
-CPP=$(CCACHE) $(CROSS_COMPILE)cpp
+CPP=$(CC) -E
LD=$(CROSS_COMPILE)ld
NM=$(CROSS_COMPILE)nm
OBJCOPY=$(CROSS_COMPILE)objcopy