summaryrefslogtreecommitdiff
path: root/toolchain.inc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-11-22 17:42:58 +0100
committerPatrick Georgi <pgeorgi@google.com>2014-11-25 08:47:38 +0100
commit3ce96bd49c571955c600aba74115fa37124e4e90 (patch)
tree826feb2c6aa4b71dada78b2ef111808517aa6b0f /toolchain.inc
parentc7e6cae0d6e086804264f3172e77ebce11bcf0bd (diff)
downloadcoreboot-3ce96bd49c571955c600aba74115fa37124e4e90.tar.xz
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 <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/7552 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'toolchain.inc')
-rw-r--r--toolchain.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/toolchain.inc b/toolchain.inc
index 0ed370f49a..1083476031 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