diff options
author | Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> | 2021-06-24 17:26:22 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2021-06-25 15:57:30 +0800 |
commit | fb2dd96868a3eb51673e4a1e122e0b375aa1832f (patch) | |
tree | a375e31b667e249f52bc27384465f7f9e79ca644 | |
parent | e73b8ba6a6ea6e987a3a67456b6951c717633396 (diff) | |
download | meta-dpdk-fb2dd96868a3eb51673e4a1e122e0b375aa1832f.tar.gz |
dpdk: fix finding librt
The generated pkg-config libdpdk.pc file has the output
with full path of librt such as
<builddir>/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 <mohamad.noor.alim.hussin@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r-- | recipes-extended/dpdk/dpdk/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch | 35 | ||||
-rw-r--r-- | recipes-extended/dpdk/dpdk_20.11.1.bb | 1 |
2 files changed, 36 insertions, 0 deletions
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 @@ | |||
1 | From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> | ||
3 | Date: Thu, 24 Jun 2021 11:30:09 +0800 | ||
4 | Subject: [PATCH] ifpga/meson: Fix finding librt using find_library() | ||
5 | |||
6 | Finding with "librt" keyword would give the output | ||
7 | with full path of librt such as /usr/lib/librt.so | ||
8 | instead of -lrt. | ||
9 | |||
10 | Assume find_library() will prepend "lib", thus remove | ||
11 | "lib" from "librt" keyword. The output will shows as | ||
12 | -lrt. | ||
13 | |||
14 | Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html] | ||
15 | |||
16 | Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> | ||
17 | --- | ||
18 | drivers/raw/ifpga/base/meson.build | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build | ||
22 | index da2d6e33c..949f7f127 100644 | ||
23 | --- a/drivers/raw/ifpga/base/meson.build | ||
24 | +++ b/drivers/raw/ifpga/base/meson.build | ||
25 | @@ -25,7 +25,7 @@ sources = [ | ||
26 | |||
27 | rtdep = dependency('librt', required: false) | ||
28 | if not rtdep.found() | ||
29 | - rtdep = cc.find_library('librt', required: false) | ||
30 | + rtdep = cc.find_library('rt', required: false) | ||
31 | endif | ||
32 | if not rtdep.found() | ||
33 | build = false | ||
34 | -- | ||
35 | 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 | |||
2 | 2 | ||
3 | SRC_URI += " \ | 3 | SRC_URI += " \ |
4 | file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \ | 4 | file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \ |
5 | file://0001-ifpga-meson-Fix-finding-librt-using-find_library.patch \ | ||
5 | " | 6 | " |
6 | 7 | ||
7 | STABLE = "-stable" | 8 | STABLE = "-stable" |