aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAisha Tammy <gentoo@aisha.cc>2021-12-28 18:36:37 +0000
committerAisha Tammy <gentoo@aisha.cc>2021-12-28 18:36:37 +0000
commit87e78614530996f51240fb976347ae75b3d26917 (patch)
tree6f363f55f3c01e12a8cf73c2bba6db4682cbb0c1
parentsys-kernel/rte_kni-kmod: restrict tests (diff)
downloadguru-87e78614.tar.gz
guru-87e78614.tar.bz2
guru-87e78614.zip
net-libs/dpdk: add static linker patch
closes: https://bugs.gentoo.org/830145 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
-rw-r--r--net-libs/dpdk/dpdk-21.11.ebuild5
-rw-r--r--net-libs/dpdk/files/dpdk-21.11-static_linker.patch45
2 files changed, 49 insertions, 1 deletions
diff --git a/net-libs/dpdk/dpdk-21.11.ebuild b/net-libs/dpdk/dpdk-21.11.ebuild
index 97b9e66ffc..c2affead6b 100644
--- a/net-libs/dpdk/dpdk-21.11.ebuild
+++ b/net-libs/dpdk/dpdk-21.11.ebuild
@@ -4,7 +4,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{8..10} )
-inherit python-single-r1 meson
+inherit toolchain-funcs python-single-r1 meson
DESCRIPTION="Data Plane Development Kit libraries for fast userspace networking"
HOMEPAGE="https://dpdk.org/"
@@ -44,12 +44,15 @@ BDEPEND="
dev-lang/nasm
"
+PATCHES=( "${FILESDIR}/dpdk-21.11-static_linker.patch" )
+
src_configure() {
python-single-r1_pkg_setup
local emesonargs=(
-Denable_kmods=false
-Dmachine=default
-Dplatform=generic
+ -Dstatic_linker=$(tc-getAR)
$(meson_use test tests)
)
meson_src_configure
diff --git a/net-libs/dpdk/files/dpdk-21.11-static_linker.patch b/net-libs/dpdk/files/dpdk-21.11-static_linker.patch
new file mode 100644
index 0000000000..5e0a8e9e73
--- /dev/null
+++ b/net-libs/dpdk/files/dpdk-21.11-static_linker.patch
@@ -0,0 +1,45 @@
+allow setting static linker
+
+diff --git a/buildtools/meson.build b/buildtools/meson.build
+index 22ea0ba..1da02ad 100644--- a/buildtools/meson.build
++++ b/buildtools/meson.build
+@@ -24,14 +24,19 @@ binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
+ # select library and object file format
+ pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()]
+ pmdinfogen = py3 + files('pmdinfogen.py')
++ar = ''
++if cc.get_id() == 'gcc' or host_machine.system() != 'windows'
++ ar = 'ar'
++else
++ ar = 'llvm-ar'
++endif
++if get_option('static_linker') != ''
++ ar = get_option('static_linker')
++endif
+ if host_machine.system() == 'windows'
+- if cc.get_id() == 'gcc'
+- pmdinfo += 'ar'
+- else
+- pmdinfo += 'llvm-ar'
+- endif
++ pmdinfo += ar
+ pmdinfogen += 'coff'
+ else
+- pmdinfo += 'ar'
++ pmdinfo += ar
+ pmdinfogen += 'elf'
+ endif
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 7c220ad..c5c09b4 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -26,6 +26,8 @@ option('flexran_sdk', type: 'string', value: '', description:
+ 'Path to FlexRAN SDK optional Libraries for BBDEV device')
+ option('ibverbs_link', type: 'combo', choices : ['static', 'shared', 'dlopen'], value: 'shared', description:
+ 'Linkage method (static/shared/dlopen) for Mellanox PMDs with ibverbs dependencies.')
++option('static_linker', type: 'string', value: '', description:
++ 'Linker to use for creating static libraries.')
+ option('include_subdir_arch', type: 'string', value: '', description:
+ 'subdirectory where to install arch-dependent headers')
+ option('kernel_dir', type: 'string', value: '', description: