From 7040155e58a67cfca0776f5ca6348c7c8da68a49 Mon Sep 17 00:00:00 2001 From: Roberto Vargas Date: Thu, 10 May 2018 13:38:19 +0100 Subject: [PATCH] Use clang as preprocessor when clang toolchain is selected Change-Id: I562c5de91e12fe384245df41225dfb9122a13a85 Signed-off-by: Roberto Vargas --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index e25c380c4..533cb8ab1 100644 --- a/Makefile +++ b/Makefile @@ -151,11 +151,15 @@ TF_CFLAGS_aarch32 = -target arm-arm-none-eabi $(march32-directive) TF_CFLAGS_aarch64 = -target aarch64-arm-none-eabi -march=armv8-a LD = $(LINKER) AS = $(CC) -c -x assembler-with-cpp $(TF_CFLAGS_$(ARCH)) +CPP = $(CC) -E $(TF_CFLAGS_$(ARCH)) +PP = $(CC) -E $(TF_CFLAGS_$(ARCH)) else ifneq ($(findstring clang,$(notdir $(CC))),) TF_CFLAGS_aarch32 = $(target32-directive) TF_CFLAGS_aarch64 = -target aarch64-elf LD = $(LINKER) AS = $(CC) -c -x assembler-with-cpp $(TF_CFLAGS_$(ARCH)) +CPP = $(CC) -E +PP = $(CC) -E else TF_CFLAGS_aarch32 = $(march32-directive) TF_CFLAGS_aarch64 = -march=armv8-a