mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-22 21:43:03 -04:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
45
net-libs/dpdk/files/dpdk-21.11-static_linker.patch
Normal file
45
net-libs/dpdk/files/dpdk-21.11-static_linker.patch
Normal file
@@ -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:
|
||||
Reference in New Issue
Block a user