From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH v6 06/13] llvm: remove LLVM_LDFLAGS from llvm-config --ldflags output
Date: Mon, 07 Apr 2025 12:48:11 +0300 [thread overview]
Message-ID: <20250407-mesa-25-v6-6-29bf4cae8d28@oss.qualcomm.com> (raw)
In-Reply-To: <20250407-mesa-25-v6-0-29bf4cae8d28@oss.qualcomm.com>
On native OE builds the LLVM_LDFLAGS gets a lot of extra flags which may
depend on exact build dir and as such be inappropriate to binaries
shared through sstate-cache. It is not possible to override this
behaviour in llvm-config since crossscripts are not being used for
native builds. Ignore LLVM_LDFLAGS for native builds.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
...g-remove-LLVM_LDFLAGS-from-ldflags-output.patch | 34 ++++++++++++++++++++++
meta/recipes-devtools/llvm/llvm_20.1.1.bb | 2 ++
2 files changed, 36 insertions(+)
diff --git a/meta/recipes-devtools/llvm/llvm/0001-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch b/meta/recipes-devtools/llvm/llvm/0001-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2320399d5f7de44cf9cc4269d180c097c1b4a616
--- /dev/null
+++ b/meta/recipes-devtools/llvm/llvm/0001-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch
@@ -0,0 +1,34 @@
+From caff2482f786dd7fd5f1f46f2667f7ed847cb8f8 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Date: Wed, 2 Apr 2025 17:05:17 +0300
+Subject: [PATCH] llvm-config: remove LLVM_LDFLAGS from --ldflags output
+
+On native OE builds the LLVM_LDFLAGS gets a lot of extra flags which may
+depend on exact build dir and as such be inappropriate to binaries
+shared through sstate-cache. It is not possible to override this
+behaviour in llvm-config since crossscripts are not being used for
+native builds. As a OE-specific modification ignore LLVM_LDFLAGS for
+native builds.
+
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Upstream-Status: Inappropriate [OE-Specific]
+---
+ llvm/tools/llvm-config/llvm-config.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
+index d5b76b1bb6c1..29f7c2eaa419 100644
+--- a/llvm/tools/llvm-config/llvm-config.cpp
++++ b/llvm/tools/llvm-config/llvm-config.cpp
+@@ -529,7 +529,7 @@ int main(int argc, char **argv) {
+ OS << ActiveIncludeOption << ' ' << LLVM_CXXFLAGS << '\n';
+ } else if (Arg == "--ldflags") {
+ OS << ((HostTriple.isWindowsMSVCEnvironment()) ? "-LIBPATH:" : "-L")
+- << ActiveLibDir << ' ' << LLVM_LDFLAGS << '\n';
++ << ActiveLibDir << '\n';
+ } else if (Arg == "--system-libs") {
+ PrintSystemLibs = true;
+ } else if (Arg == "--libs") {
+--
+2.39.5
+
diff --git a/meta/recipes-devtools/llvm/llvm_20.1.1.bb b/meta/recipes-devtools/llvm/llvm_20.1.1.bb
index 1ea94327161a8002453ac1aa79d7661d4da72499..b95473c88b64961cb6ae2f4ace14aac4600cf98e 100644
--- a/meta/recipes-devtools/llvm/llvm_20.1.1.bb
+++ b/meta/recipes-devtools/llvm/llvm_20.1.1.bb
@@ -32,6 +32,8 @@ SRC_URI[sha256sum] = "4d5ebbd40ce1e984a650818a4bb5ae86fc70644dec2e6d54e78b4176db
UPSTREAM_CHECK_URI = "https://github.com/llvm/llvm-project"
UPSTREAM_CHECK_REGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)"
+SRC_URI:append:class-native = " file://0001-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch"
+
S = "${WORKDIR}/llvm-project-${PV}.src"
OECMAKE_SOURCEPATH = "${S}/llvm"
--
2.39.5
next prev parent reply other threads:[~2025-04-07 9:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 9:48 [PATCH v6 00/13] mesa: upgrade to 25.0.2 Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 01/13] runqemu: also set GBM_BACKENDS_PATH Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 02/13] llvm: move libLLVM.so.N.M to llvm-libllvm package Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 03/13] llvm: use OECMAKE_SOURCEPATH to specify cmake dir Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 04/13] llvm: handle libdir in llvm-config Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 05/13] llvm: also use llvm-config wrapper for nativesdk recipes Dmitry Baryshkov
2025-04-07 9:48 ` Dmitry Baryshkov [this message]
2025-04-07 9:48 ` [PATCH v6 07/13] llvm: forcibly disable __isoc23_strtol usage Dmitry Baryshkov
2025-04-07 11:22 ` [OE-core] " Alexander Kanavin
2025-04-07 11:58 ` Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 08/13] llvm: support building libclc Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 09/13] llvm: add SPIRV-LLVM-Translator support Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 10/13] llvm: enable more targets to build Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 11/13] mesa: upgrade 24.0.7 -> 25.0.2 Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 12/13] bindgen-cli: a tool to generate Rust bindings Dmitry Baryshkov
2025-04-07 9:48 ` [PATCH v6 13/13] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Dmitry Baryshkov
2025-04-08 13:34 ` [OE-core] [PATCH v6 00/13] mesa: upgrade to 25.0.2 Mathieu Dubois-Briand
2025-04-08 19:08 ` Dmitry Baryshkov
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=20250407-mesa-25-v6-6-29bf4cae8d28@oss.qualcomm.com \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.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