summaryrefslogtreecommitdiffstats
path: root/tools/build
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/Build.include5
-rw-r--r--tools/build/Makefile.feature6
-rw-r--r--tools/build/feature/Makefile14
3 files changed, 18 insertions, 7 deletions
diff --git a/tools/build/Build.include b/tools/build/Build.include
index 418871d02ebf..a4bbb984941d 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -12,6 +12,7 @@
# Convenient variables
comma := ,
squote := '
+pound := \#
###
# Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o
@@ -43,11 +44,11 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\
###
# Replace >$< with >$$< to preserve $ when reloading the .cmd file
# (needed for make)
-# Replace >#< with >\#< to avoid starting a comment in the .cmd file
+# Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file
# (needed for make)
# Replace >'< with >'\''< to be able to enclose the whole string in '...'
# (needed for the shell)
-make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1)))))
+make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1)))))
###
# Find any prerequisites that is newer than target or that does not exist.
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index c378f003b007..5b6dda3b1ca8 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -82,7 +82,11 @@ FEATURE_TESTS_EXTRA := \
liberty-z \
libunwind-debug-frame \
libunwind-debug-frame-arm \
- libunwind-debug-frame-aarch64
+ libunwind-debug-frame-aarch64 \
+ cxx \
+ llvm \
+ llvm-version \
+ clang
FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 0a490cb15149..dac9563b5470 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -54,7 +54,10 @@ FILES= \
test-jvmti.bin \
test-sched_getcpu.bin \
test-setns.bin \
- test-libopencsd.bin
+ test-libopencsd.bin \
+ test-clang.bin \
+ test-llvm.bin \
+ test-llvm-version.bin
FILES := $(addprefix $(OUTPUT),$(FILES))
@@ -257,11 +260,13 @@ $(OUTPUT)test-llvm.bin:
-I$(shell $(LLVM_CONFIG) --includedir) \
-L$(shell $(LLVM_CONFIG) --libdir) \
$(shell $(LLVM_CONFIG) --libs Core BPF) \
- $(shell $(LLVM_CONFIG) --system-libs)
+ $(shell $(LLVM_CONFIG) --system-libs) \
+ > $(@:.bin=.make.output) 2>&1
$(OUTPUT)test-llvm-version.bin:
$(BUILDXX) -std=gnu++11 \
- -I$(shell $(LLVM_CONFIG) --includedir)
+ -I$(shell $(LLVM_CONFIG) --includedir) \
+ > $(@:.bin=.make.output) 2>&1
$(OUTPUT)test-clang.bin:
$(BUILDXX) -std=gnu++11 \
@@ -271,7 +276,8 @@ $(OUTPUT)test-clang.bin:
-lclangFrontend -lclangEdit -lclangLex \
-lclangAST -Wl,--end-group \
$(shell $(LLVM_CONFIG) --libs Core option) \
- $(shell $(LLVM_CONFIG) --system-libs)
+ $(shell $(LLVM_CONFIG) --system-libs) \
+ > $(@:.bin=.make.output) 2>&1
-include $(OUTPUT)*.d
OpenPOWER on IntegriCloud