From 40a480a83a10d1718e26a6f4fc54d271c1f13a95 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 20 Oct 2022 14:00:29 +0100 Subject: gentoo auto-resync : 20:10:2022 - 14:00:29 --- dev-util/perf/files/perf-6.0-clang.patch | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 dev-util/perf/files/perf-6.0-clang.patch (limited to 'dev-util/perf/files') diff --git a/dev-util/perf/files/perf-6.0-clang.patch b/dev-util/perf/files/perf-6.0-clang.patch new file mode 100644 index 000000000000..65b38c8d399b --- /dev/null +++ b/dev-util/perf/files/perf-6.0-clang.patch @@ -0,0 +1,44 @@ + +Adapt for building against LLVM/Clang with monolithic libraries. + +--- a/tools/build/feature/Makefile ++++ b/tools/build/feature/Makefile +@@ -338,7 +338,7 @@ $(OUTPUT)test-llvm.bin: + $(BUILDXX) -std=gnu++14 \ + -I$(shell $(LLVM_CONFIG) --includedir) \ + -L$(shell $(LLVM_CONFIG) --libdir) \ +- $(shell $(LLVM_CONFIG) --libs Core BPF) \ ++ $(shell $(LLVM_CONFIG) --libs) \ + $(shell $(LLVM_CONFIG) --system-libs) \ + > $(@:.bin=.make.output) 2>&1 + +@@ -351,10 +351,7 @@ $(OUTPUT)test-clang.bin: + $(BUILDXX) -std=gnu++14 \ + -I$(shell $(LLVM_CONFIG) --includedir) \ + -L$(shell $(LLVM_CONFIG) --libdir) \ +- -Wl,--start-group -lclangBasic -lclangDriver \ +- -lclangFrontend -lclangEdit -lclangLex \ +- -lclangAST -Wl,--end-group \ +- $(shell $(LLVM_CONFIG) --libs Core option) \ ++ -lclang-cpp $(shell $(LLVM_CONFIG) --libs) \ + $(shell $(LLVM_CONFIG) --system-libs) \ + > $(@:.bin=.make.output) 2>&1 + +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -416,14 +416,11 @@ EXTLIBS := $(call filter-out,$(EXCLUDE_EXTLIBS),$(EXTLIBS)) + LIBS = -Wl,--whole-archive $(PERFLIBS) $(EXTRA_PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group + + ifeq ($(USE_CLANG), 1) +- CLANGLIBS_LIST = AST Basic CodeGen Driver Frontend Lex Tooling Edit Sema Analysis Parse Serialization +- CLANGLIBS_NOEXT_LIST = $(foreach l,$(CLANGLIBS_LIST),$(shell $(LLVM_CONFIG) --libdir)/libclang$(l)) +- LIBCLANG = $(foreach l,$(CLANGLIBS_NOEXT_LIST),$(wildcard $(l).a $(l).so)) +- LIBS += -Wl,--start-group $(LIBCLANG) -Wl,--end-group ++ LIBS += -lclang-cpp + endif + + ifeq ($(USE_LLVM), 1) +- LIBLLVM = $(shell $(LLVM_CONFIG) --libs all) $(shell $(LLVM_CONFIG) --system-libs) ++ LIBLLVM = $(shell $(LLVM_CONFIG) --libs) $(shell $(LLVM_CONFIG) --system-libs) + LIBS += -L$(shell $(LLVM_CONFIG) --libdir) $(LIBLLVM) + endif -- cgit v1.2.3