From: Thomas Richter <tmricht@linux.ibm.com>
To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
acme@kernel.org, wangnan0@huawei.com, jolsa@kernel.org
Cc: svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com,
hca@linux.ibm.com, Thomas Richter <tmricht@linux.ibm.com>
Subject: [PATCH] perf build: Fix broken feature check for llvm due to C++ standard
Date: Wed, 12 Jul 2023 10:30:36 +0200 [thread overview]
Message-ID: <20230712083037.4081444-1-tmricht@linux.ibm.com> (raw)
Perf build auto-detects features and packages already installed
for its build. This is done in directory tools/build/feature. This
directory contains small sample programs. When they successfully
compile the necessary prereqs in form of libraries and header
files are present.
Such a check is also done for llvm. And this check fails.
Fix this and update to the latest C++ standard.
Output before:
# rm -f ./test-llvm.bin; make test-llvm.bin; ./test-llvm.bin
g++ -MD -Wall -Werror -o test-llvm.bin test-llvm.cpp \
> test-llvm.make.output 2>&1 -std=gnu++14 \
-I/usr/include \
-L/usr/lib64 \
-lLLVM-16 \
\
> test-llvm.make.output 2>&1
make: *** [Makefile:343: test-llvm.bin] Error 1
-bash: ./test-llvm.bin: No such file or directory
#
Output after:
# rm -f ./test-llvm.bin; make test-llvm.bin; ./test-llvm.bin
g++ -MD -Wall -Werror -o test-llvm.bin test-llvm.cpp \
> test-llvm.make.output 2>&1 -std=gnu++17 \
-I/usr/include \
-L/usr/lib64 \
-lLLVM-16 \
\
> test-llvm.make.output 2>&1
Hello World!
#
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
---
tools/build/feature/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 0f0aa9b7d7b5..f8db69654791 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -340,7 +340,7 @@ $(OUTPUT)test-jvmti-cmlr.bin:
$(BUILD)
$(OUTPUT)test-llvm.bin:
- $(BUILDXX) -std=gnu++14 \
+ $(BUILDXX) -std=gnu++17 \
-I$(shell $(LLVM_CONFIG) --includedir) \
-L$(shell $(LLVM_CONFIG) --libdir) \
$(shell $(LLVM_CONFIG) --libs Core BPF) \
--
2.41.0
next reply other threads:[~2023-07-12 8:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 8:30 Thomas Richter [this message]
2023-07-12 8:30 ` [PATCH] perf build: Fix broken feature check for clang due to C++ standard and changed library packaging Thomas Richter
2023-07-13 3:02 ` Ian Rogers
2023-07-13 3:05 ` Ian Rogers
2023-07-13 3:10 ` [PATCH] perf build: Fix broken feature check for llvm due to C++ standard Ian Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230712083037.4081444-1-tmricht@linux.ibm.com \
--to=tmricht@linux.ibm.com \
--cc=acme@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sumanthk@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).