public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: net-libs/dpdk/files/, net-libs/dpdk/
@ 2021-12-28 18:36 Aisha Tammy
  0 siblings, 0 replies; 2+ messages in thread
From: Aisha Tammy @ 2021-12-28 18:36 UTC (permalink / raw
  To: gentoo-commits

commit:     87e78614530996f51240fb976347ae75b3d26917
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Tue Dec 28 18:36:37 2021 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Tue Dec 28 18:36:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=87e78614

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 <AT> aisha.cc>

 net-libs/dpdk/dpdk-21.11.ebuild                    |  5 ++-
 net-libs/dpdk/files/dpdk-21.11-static_linker.patch | 45 ++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/net-libs/dpdk/dpdk-21.11.ebuild b/net-libs/dpdk/dpdk-21.11.ebuild
index 97b9e66ff..c2affead6 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 000000000..5e0a8e9e7
--- /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:


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: net-libs/dpdk/files/, net-libs/dpdk/
@ 2022-08-14 11:46 Aisha Tammy
  0 siblings, 0 replies; 2+ messages in thread
From: Aisha Tammy @ 2022-08-14 11:46 UTC (permalink / raw
  To: gentoo-commits

commit:     ccfbaad448247f76c23548ba32362383e7b01a2b
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Sun Aug 14 11:36:11 2022 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Sun Aug 14 11:36:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ccfbaad4

net-libs/dpdk: fix objdump calls

Closes: https://bugs.gentoo.org/842312

Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 net-libs/dpdk/dpdk-22.03.ebuild               | 17 +++++---
 net-libs/dpdk/files/dpdk-22.03-binutils.patch | 60 +++++++++++++++++++++++++++
 2 files changed, 71 insertions(+), 6 deletions(-)

diff --git a/net-libs/dpdk/dpdk-22.03.ebuild b/net-libs/dpdk/dpdk-22.03.ebuild
index 7b72a35c3..e6399a2ba 100644
--- a/net-libs/dpdk/dpdk-22.03.ebuild
+++ b/net-libs/dpdk/dpdk-22.03.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 
 PYTHON_COMPAT=( python3_{8..10} )
-inherit python-single-r1 meson
+inherit python-single-r1 toolchain-funcs meson
 
 DESCRIPTION="Data Plane Development Kit libraries for fast userspace networking"
 HOMEPAGE="https://dpdk.org/"
@@ -44,7 +44,15 @@ BDEPEND="
 	dev-lang/nasm
 "
 
-PATCHES=( "${FILESDIR}/dpdk-21.11.1-static_linker.patch" )
+PATCHES=( "${FILESDIR}/dpdk-22.03-binutils.patch" )
+
+src_prepare() {
+	default
+	sed -e "s/@OBJDUMP@/$(tc-getOBJDUMP)/g" -i \
+		buildtools/meson.build \
+		buildtools/check-symbols.sh \
+		devtools/check-abi-version.sh || die
+}
 
 src_configure() {
 	python-single-r1_pkg_setup
@@ -59,8 +67,5 @@ src_configure() {
 
 src_install() {
 	meson_src_install
-	local pyfiles=( "${ED}"/usr/bin/*.py )
-	for pyfile in "${pyfiles[@]}"; do
-		python_fix_shebang "${pyfile}"
-	done
+	python_fix_shebang "${ED}"
 }

diff --git a/net-libs/dpdk/files/dpdk-22.03-binutils.patch b/net-libs/dpdk/files/dpdk-22.03-binutils.patch
new file mode 100644
index 000000000..db34aca18
--- /dev/null
+++ b/net-libs/dpdk/files/dpdk-22.03-binutils.patch
@@ -0,0 +1,60 @@
+diff --git a/buildtools/check-symbols.sh b/buildtools/check-symbols.sh
+index e458c0a..9031a18 100755
+--- a/buildtools/check-symbols.sh
++++ b/buildtools/check-symbols.sh
+@@ -22,7 +22,7 @@ fi
+
+ DUMPFILE=$(mktemp -t dpdk.${0##*/}.objdump.XXXXXX)
+ trap 'rm -f "$DUMPFILE"' EXIT
+-objdump -t $OBJFILE >$DUMPFILE
++@OBJDUMP@ -t $OBJFILE >$DUMPFILE
+
+ ret=0
+
+diff --git a/buildtools/meson.build b/buildtools/meson.build
+index e1c600e..6b09e63 100644
+--- a/buildtools/meson.build
++++ b/buildtools/meson.build
+@@ -4,7 +4,7 @@
+ pkgconf = find_program('pkg-config', 'pkgconf', required: false)
+ check_symbols = find_program('check-symbols.sh')
+ ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
+-objdump = find_program('objdump', 'llvm-objdump')
++objdump = find_program('@OBJDUMP@')
+
+ python3 = import('python').find_installation(required: false)
+ if python3.found()
+@@ -24,18 +24,11 @@ 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 = find_program('ar')
++pmdinfo += ar
+ if host_machine.system() == 'windows'
+-    if cc.get_id() == 'gcc'
+-        pmdinfo += 'ar'
+-    else
+-        pmdinfo += 'llvm-ar'
+-    endif
+     pmdinfogen += 'coff'
+-elif host_machine.system() == 'freebsd'
+-    pmdinfo += 'llvm-ar'
+-    pmdinfogen += 'elf'
+ else
+-    pmdinfo += 'ar'
+     pmdinfogen += 'elf'
+ endif
+
+diff --git a/devtools/check-abi-version.sh b/devtools/check-abi-version.sh
+index f0cca42..6efe1eb 100755
+--- a/devtools/check-abi-version.sh
++++ b/devtools/check-abi-version.sh
+@@ -28,7 +28,7 @@ NEXT_ABIVER="DPDK_$((${2-$DEFAULT_ABI}+1))"
+ ret=0
+
+ # get output of objdump
+-OBJ_DUMP_OUTPUT=`objdump -TC --section=.text ${LIB} 2>&1 | grep ".text"`
++OBJ_DUMP_OUTPUT=`@OBJDUMP@ -TC --section=.text ${LIB} 2>&1 | grep ".text"`
+
+ # there may not be any .text sections in the .so file, in which case exit early
+ echo "${OBJ_DUMP_OUTPUT}" | grep "not found in any input file" -q


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-14 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14 11:46 [gentoo-commits] repo/proj/guru:dev commit in: net-libs/dpdk/files/, net-libs/dpdk/ Aisha Tammy
  -- strict thread matches above, loose matches on Subject: below --
2021-12-28 18:36 Aisha Tammy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox