From 3ce96bd49c571955c600aba74115fa37124e4e90 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 22 Nov 2014 17:42:58 +0100 Subject: build system: use a single variable name for compiler runtimes We build with either gcc or clang, no need to keep both around Change-Id: I9af2cc7636bdc791a68ba8ed6e7c5a81973c5dfd Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/7552 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Paul Menzel --- toolchain.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'toolchain.inc') diff --git a/toolchain.inc b/toolchain.inc index 0ed370f49ae3..1083476031ba 100644 --- a/toolchain.inc +++ b/toolchain.inc @@ -92,8 +92,11 @@ STRIP_$(1) := $(STRIP_$(2)) READELF_$(1) := $(READELF_$(2)) CFLAGS_$(1) = $$(CFLAGS_common) $$(CFLAGS_$(2)) CPPFLAGS_$(1) = $$(CPPFLAGS_common) $$(CPPFLAGS_$(2)) -LIBGCC_FILE_NAME_$(1) = $(wildcard $(shell $(CC_$(2)) $(CFLAGS_$(2)) -print-libgcc-file-name)) -LIBCLANG_RT_FILE_NAME_$(1) = $(shell $(CC_$(2)) $(CFLAGS_$(2)) -print-librt-file-name 2>/dev/null) +ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) +COMPILER_RT_$(1) = $(shell $(CC_$(2)) $(CFLAGS_$(2)) -print-librt-file-name 2>/dev/null) +else +COMPILER_RT_$(1) = $(wildcard $(shell $(CC_$(2)) $(CFLAGS_$(2)) -print-libgcc-file-name)) +endif endef # define_class: Allows defining any program as dynamic class and compiler tool -- cgit v1.2.3