DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] buildtools: remove absolute paths from pc file
@ 2024-01-07 15:41 Srikanth Yalavarthi
  2024-10-09 18:44 ` Stephen Hemminger
  2024-10-10 13:57 ` Bruce Richardson
  0 siblings, 2 replies; 4+ messages in thread
From: Srikanth Yalavarthi @ 2024-01-07 15:41 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, aprabhu, syalavarthi, sshankarnara, ptakkar

When linking with non-versioned libraries, absolute paths
of the libraries are added to libdpdk.pc. This patch replaces
the absolute path with correct linker flags, -l<libname>.

https://github.com/mesonbuild/meson/issues/7766

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 buildtools/pkg-config/set-static-linker-flags.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/buildtools/pkg-config/set-static-linker-flags.py b/buildtools/pkg-config/set-static-linker-flags.py
index 2745db34c29..e8804353383 100644
--- a/buildtools/pkg-config/set-static-linker-flags.py
+++ b/buildtools/pkg-config/set-static-linker-flags.py
@@ -9,6 +9,8 @@
 
 
 def fix_ldflag(f):
+    if (f.startswith('/') and (f.endswith('.so') or f.endswith('.a'))):
+        return f.split('/', -1)[-1].split('.', -1)[0].replace('lib', '-l', 1)
     if not f.startswith('-lrte_'):
         return f
     return '-l:lib' + f[2:] + '.a'
-- 
2.42.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-10 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-07 15:41 [PATCH 1/1] buildtools: remove absolute paths from pc file Srikanth Yalavarthi
2024-10-09 18:44 ` Stephen Hemminger
2024-10-10  8:02   ` Bruce Richardson
2024-10-10 13:57 ` Bruce Richardson

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).