From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19E6E43857; Sun, 7 Jan 2024 16:42:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B094402B1; Sun, 7 Jan 2024 16:42:17 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id D65DD402A9 for ; Sun, 7 Jan 2024 16:42:15 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 407CPDUs015632; Sun, 7 Jan 2024 07:42:15 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=pfpt0220; bh=2XMAaX7a aih7S10PbC2RzdIm5FoU834s77VKJ0gm4tk=; b=kl3JCnfTdWQnRKOCyvHMxV9I T9i0YK2hstYu/qARJZ1J44sKkmuHB5vfi/rdgx0m5fmctZy5bNHnj1SIWgeAPV76 7dBE0qECvmATh20MauKyKKfdrZERmm84mCu2vWON0O8gCRUHrGHjmfNWyEBTkyEw inFdBYLKWFzR/1/bS/4TwblYnL/MGmQcir0nMIytJbAcqOgGF9PqWt32DEKRWoYu SJrYvPBWUA4dpYHqdxrL6qhJF24+jdaRo68OrEQqPM25H40HvSTKfMQtCooDxbeZ DNTQmxg0Fz0NO9aGWplNDtNFaXTeAFD8MyA0ujDvtcESIsiGLMfpF4s9feDLeA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3vf53qjkqj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 07 Jan 2024 07:42:13 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 7 Jan 2024 07:41:53 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 7 Jan 2024 07:41:53 -0800 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id 7C5093F7093; Sun, 7 Jan 2024 07:41:53 -0800 (PST) From: Srikanth Yalavarthi To: Bruce Richardson CC: , , , , Subject: [PATCH 1/1] buildtools: remove absolute paths from pc file Date: Sun, 7 Jan 2024 07:41:36 -0800 Message-ID: <20240107154137.4909-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: Sj7e_HMXOj3I0SWIzW6Fuc38ly1sKk9G X-Proofpoint-GUID: Sj7e_HMXOj3I0SWIzW6Fuc38ly1sKk9G X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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. https://github.com/mesonbuild/meson/issues/7766 Signed-off-by: Srikanth Yalavarthi --- 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