From fb2dd96868a3eb51673e4a1e122e0b375aa1832f Mon Sep 17 00:00:00 2001 From: Mohamad Noor Alim Hussin Date: Thu, 24 Jun 2021 17:26:22 +0800 Subject: dpdk: fix finding librt The generated pkg-config libdpdk.pc file has the output with full path of librt such as /recipe-sysroot/usr/lib/librt.so instead of -lrt. This will cause an issue when compile DPDK app with static library as the librt is not found with the hardcode path in the libdpdk.pc file. Signed-off-by: Mohamad Noor Alim Hussin Signed-off-by: Anuj Mittal --- ...eson-Fix-finding-librt-using-find_library.patch | 35 ++++++++++++++++++++++ recipes-extended/dpdk/dpdk_20.11.1.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 recipes-extended/dpdk/dpdk/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch diff --git a/recipes-extended/dpdk/dpdk/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch b/recipes-extended/dpdk/dpdk/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch new file mode 100644 index 0000000..4df28c4 --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch @@ -0,0 +1,35 @@ +From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001 +From: Mohamad Noor Alim Hussin +Date: Thu, 24 Jun 2021 11:30:09 +0800 +Subject: [PATCH] ifpga/meson: Fix finding librt using find_library() + +Finding with "librt" keyword would give the output +with full path of librt such as /usr/lib/librt.so +instead of -lrt. + +Assume find_library() will prepend "lib", thus remove +"lib" from "librt" keyword. The output will shows as +-lrt. + +Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html] + +Signed-off-by: Mohamad Noor Alim Hussin +--- + drivers/raw/ifpga/base/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build +index da2d6e33c..949f7f127 100644 +--- a/drivers/raw/ifpga/base/meson.build ++++ b/drivers/raw/ifpga/base/meson.build +@@ -25,7 +25,7 @@ sources = [ + + rtdep = dependency('librt', required: false) + if not rtdep.found() +- rtdep = cc.find_library('librt', required: false) ++ rtdep = cc.find_library('rt', required: false) + endif + if not rtdep.found() + build = false +-- +2.32.0 diff --git a/recipes-extended/dpdk/dpdk_20.11.1.bb b/recipes-extended/dpdk/dpdk_20.11.1.bb index d96fd8b..19e8bcc 100644 --- a/recipes-extended/dpdk/dpdk_20.11.1.bb +++ b/recipes-extended/dpdk/dpdk_20.11.1.bb @@ -2,6 +2,7 @@ include dpdk.inc SRC_URI += " \ file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \ + file://0001-ifpga-meson-Fix-finding-librt-using-find_library.patch \ " STABLE = "-stable" -- cgit v1.2.3-54-g00ecf