Github messages for voidlinux
 help / color / mirror / Atom feed
From: unspecd <unspecd@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] gdb: clean up templates
Date: Wed, 14 Apr 2021 13:39:08 +0200	[thread overview]
Message-ID: <20210414113908.Xd7yon0PYukleJm_jy7xl6ChnLWo6ijzdoa8JfPHJoo@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29382@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

There is an updated pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages gdb
https://github.com/void-linux/void-packages/pull/29382

gdb: clean up templates
Improved consistency across templates.

Also:
- Fixed `post_install` in srcpkgs/avr-gdb.
- Added build option for Guile.
- Updated cross-arm-none-eabi-gdb to 10.1.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [x] armv7l
  - [ ] ppc
  - [x] ppc-musl


A patch file from https://github.com/void-linux/void-packages/pull/29382.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gdb-29382.patch --]
[-- Type: text/x-diff, Size: 13287 bytes --]

From 3522b71abafe5c98714d800bbb292fa6d837c951 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Wed, 10 Mar 2021 23:26:08 +1100
Subject: [PATCH 1/3] gdb: clean up

Also added build option for Guile.
---
 srcpkgs/gdb-common                           |  1 +
 srcpkgs/gdb/patches/gdb-mips-linux-nat.patch | 11 ++++
 srcpkgs/gdb/template                         | 65 +++++++++-----------
 3 files changed, 42 insertions(+), 35 deletions(-)
 create mode 120000 srcpkgs/gdb-common
 create mode 100644 srcpkgs/gdb/patches/gdb-mips-linux-nat.patch

diff --git a/srcpkgs/gdb-common b/srcpkgs/gdb-common
new file mode 120000
index 000000000000..f3e03e3f1a44
--- /dev/null
+++ b/srcpkgs/gdb-common
@@ -0,0 +1 @@
+gdb
\ No newline at end of file
diff --git a/srcpkgs/gdb/patches/gdb-mips-linux-nat.patch b/srcpkgs/gdb/patches/gdb-mips-linux-nat.patch
new file mode 100644
index 000000000000..ec4e9c2666f5
--- /dev/null
+++ b/srcpkgs/gdb/patches/gdb-mips-linux-nat.patch
@@ -0,0 +1,11 @@
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -31,7 +31,7 @@
+ #include "gdb_proc_service.h"
+ #include "gregset.h"
+ 
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #include "nat/gdb_ptrace.h"
+ #include <asm/ptrace.h>
+ #include "inf-ptrace.h"
diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template
index 64787a9ade34..09cbe518c7df 100644
--- a/srcpkgs/gdb/template
+++ b/srcpkgs/gdb/template
@@ -1,65 +1,60 @@
 # Template file for 'gdb'
 pkgname=gdb
 version=10.1
-revision=3
+revision=4
 build_style=gnu-configure
 pycompile_dirs="/usr/share/gdb/python"
 configure_args="--disable-werror --disable-nls --with-system-readline
  --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib $(vopt_enable gdbserver)
  $(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static')
- $(vopt_if python --with-python=/usr/bin/python3)
+ $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)
  $(vopt_with debuginfod)"
-hostmakedepends="texinfo perl pkg-config $(vopt_if python python3-devel)"
-makedepends="ncurses-devel zlib-devel readline-devel expat-devel
- $(vopt_if python 'python3-devel gettext-devel')
- $(vopt_if debuginfod elfutils-devel)"
+hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)"
+makedepends="expat-devel ncurses-devel readline-devel zlib-devel $(vopt_if guile guile-devel)
+ $(vopt_if python 'python3-devel gettext-devel') $(vopt_if debuginfod elfutils-devel)"
+depends="gdb-common>=${version}_${revision}"
+checkdepends="dejagnu"
 short_desc="GNU Debugger"
 maintainer="Anthony Iliopoulos <ailiop@altatus.com>"
 license="GPL-3.0-or-later"
-homepage="https://www.gnu.org/software/gdb/"
-distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
+homepage="https://www.gnu.org/software/gdb"
+distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz"
 checksum=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0
+make_check=extended  # Tests take too long, not all of them pass.
 python_version=3
 patch_args="-Np1"
+ignore_elf_files="
+ /usr/share/gdb/guile/gdb/support.go
+ /usr/share/gdb/guile/gdb/experimental.go
+ /usr/share/gdb/guile/gdb/iterator.go
+ /usr/share/gdb/guile/gdb/types.go
+ /usr/share/gdb/guile/gdb/printing.go
+ /usr/share/gdb/guile/gdb.go"
 
 if [ "${CROSS_BUILD}" ]; then
 	# Make python3.x detection work in cross builds
 	CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
 	CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
+	makedepends+=" $(vopt_if guile libatomic_ops-devel)"
 fi
-CFLAGS+=" -fcommon"
-CXXFLAGS+=" -fcommon"
+
 # Package build options
-build_options="gdbserver static python debuginfod"
+build_options="debuginfod gdbserver guile python static"
 desc_option_gdbserver="Enable support for building GDB server"
 desc_option_debuginfod="Enable support for libdebuginfod"
 # Enable gdbserver if !static.
-build_options_default="gdbserver python debuginfod"
+build_options_default="debuginfod gdbserver python"
 # Both options cannot be enabled at the same time
 vopt_conflict gdbserver static
 
-post_extract() {
-	vsed -i 's,sgidefs.h,asm/sgidefs.h,' gdb/mips-linux-nat.c
-	mkdir -p build
-}
-do_configure() {
-	cd build
-	../configure ${configure_args/with-sysroot/with-build-sysroot} \
-		CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -fcommon"
-	export gl_cv_func_gettimeofday_clobber=no
-	export gl_cv_func_working_strerror=yes
-	export gl_cv_func_strerror_0_works=yes
-}
-do_build() {
-	cd build
-	make ${makejobs} all
-}
-do_install() {
-	cd build
-	make DESTDIR=${DESTDIR} ${makejobs} install
+post_install() {
 	# resolve conflicts with binutils
-	rm -rf ${DESTDIR}/usr/{include,lib,lib64}
-	for f in bfd configure standards; do
-		rm -f ${DESTDIR}/usr/share/info/${f}.info*
-	done
+	rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*}
+}
+
+gdb-common_package() {
+	short_desc+=" - common files"
+	pkg_install() {
+		vmove usr/share
+	}
 }

From a94e1d927576f20bb298cd2a8efbefa95cb63e6a Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Thu, 11 Mar 2021 01:12:29 +1100
Subject: [PATCH 2/3] avr-gdb: clean up

Also added build option for Guile.
---
 .../avr-gdb/patches/gdb-mips-linux-nat.patch  | 11 +++
 srcpkgs/avr-gdb/template                      | 72 ++++---------------
 2 files changed, 26 insertions(+), 57 deletions(-)
 create mode 100644 srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch

diff --git a/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch b/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch
new file mode 100644
index 000000000000..54191222f4a6
--- /dev/null
+++ b/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch
@@ -0,0 +1,11 @@
+--- gdb/mips-linux-nat.c.orig
++++ gdb/mips-linux-nat.c
+@@ -31,7 +31,7 @@
+ #include "gdb_proc_service.h"
+ #include "gregset.h"
+ 
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #include "nat/gdb_ptrace.h"
+ #include <asm/ptrace.h>
+ #include "inf-ptrace.h"
diff --git a/srcpkgs/avr-gdb/template b/srcpkgs/avr-gdb/template
index 73d9f9ac7456..cd80ef3b0bbf 100644
--- a/srcpkgs/avr-gdb/template
+++ b/srcpkgs/avr-gdb/template
@@ -1,79 +1,37 @@
 # Template file for 'avr-gdb'
 pkgname=avr-gdb
 version=10.1
-revision=1
+revision=2
 wrksrc=gdb-${version}
 build_style=gnu-configure
-pycompile_dirs="/usr/share/gdb/python"
-configure_args="\
-	--target=avr \
-	--program-prefix=avr- \
-	--disable-werror \
-	--disable-nls \
-	--with-system-readline \
-	--with-system-gdbinit=/etc/gdb/gdbinit \
-	--with-system-zlib $(vopt_enable gdbserver) \
-	$(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static') \
-	$(vopt_if python --with-python=/usr/bin/python3)"
-hostmakedepends="texinfo perl $(vopt_if python python3-devel)"
-makedepends="ncurses-devel zlib-devel readline-devel expat-devel
+configure_args="--target=avr --disable-werror --disable-nls --with-system-readline
+ --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib
+ $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)"
+hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)"
+makedepends="expat-devel ncurses-devel readline-devel zlib-devel $(vopt_if guile guile-devel)
  $(vopt_if python 'python3-devel gettext-devel')"
-depends=gdb
+depends="gdb-common"
 short_desc="GNU Debugger for AVR"
 maintainer="Artur Sinila <opensource@logarithmus.dev>"
 license="GPL-3.0-or-later"
-homepage="https://www.gnu.org/software/gdb/"
+homepage="https://www.gnu.org/software/gdb"
 distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz"
 checksum=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0
-python_version=3
+make_check=no  # See gdb/template.
 replaces="cross-avr-gdb>=0"
 
 if [ "${CROSS_BUILD}" ]; then
 	# Make python3.x detection work in cross builds
 	CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
 	CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
+	makedepends+=" $(vopt_if guile libatomic_ops-devel)"
 fi
-CFLAGS+=" -fcommon"
-CXXFLAGS+=" -fcommon"
-# Package build options
-build_options="gdbserver static python"
-desc_option_gdbserver="Enable support for building GDB server"
-# By default, don't enable any of build options
-#build_options_default="gdbserver"
-# Both options cannot be enabled at the same time
-vopt_conflict gdbserver static
-
-post_extract() {
-	vsed -i 's,sgidefs.h,asm/sgidefs.h,' gdb/mips-linux-nat.c
-	mkdir -p build
-}
-
-do_configure() {
-	cd build
-	../configure ${configure_args/with-sysroot/with-build-sysroot} \
-		CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -fcommon"
-	export gl_cv_func_gettimeofday_clobber=no
-	export gl_cv_func_working_strerror=yes
-	export gl_cv_func_strerror_0_works=yes
-}
 
-do_build() {
-	cd build
-	make ${makejobs} all
-}
-
-do_install() {
-	cd build
-	make DESTDIR=${DESTDIR} ${makejobs} install
-	# resolve conflicts with binutils
-	rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib
-	rm -rf ${DESTDIR}/usr/lib64
-	for f in bfd configure standards; do
-		rm -f ${DESTDIR}/usr/share/info/${f}.info*
-	done
-}
+# Package build options
+build_options="guile python"
+build_options_default="python"
 
 post_install() {
-	# resolve conflicts with binutils and native gdb
-	rm -fr usr/{share/{locale,gdb,info},include}
+	# resolve conflicts with gdb-common
+	rm -r ${DESTDIR}/usr/{share/{gdb,info},include}
 }

From 435540818e0cc92dd785077a3bbed5aab42d1298 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Thu, 11 Mar 2021 01:14:22 +1100
Subject: [PATCH 3/3] cross-arm-none-eabi-gdb: update to 10.1, clean up

---
 .../patches/gdb-mips-linux-nat.patch          | 11 +++
 srcpkgs/cross-arm-none-eabi-gdb/template      | 68 ++++++++-----------
 2 files changed, 39 insertions(+), 40 deletions(-)
 create mode 100644 srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch

diff --git a/srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch b/srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch
new file mode 100644
index 000000000000..54191222f4a6
--- /dev/null
+++ b/srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch
@@ -0,0 +1,11 @@
+--- gdb/mips-linux-nat.c.orig
++++ gdb/mips-linux-nat.c
+@@ -31,7 +31,7 @@
+ #include "gdb_proc_service.h"
+ #include "gregset.h"
+ 
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #include "nat/gdb_ptrace.h"
+ #include <asm/ptrace.h>
+ #include "inf-ptrace.h"
diff --git a/srcpkgs/cross-arm-none-eabi-gdb/template b/srcpkgs/cross-arm-none-eabi-gdb/template
index ac8e6837d72c..aa3e72c4d936 100644
--- a/srcpkgs/cross-arm-none-eabi-gdb/template
+++ b/srcpkgs/cross-arm-none-eabi-gdb/template
@@ -1,48 +1,36 @@
-# Template file for 'cross-${_triplet}-${_pkgname}'
-_triplet=arm-none-eabi
-_pkgname=gdb
-pkgname=cross-${_triplet}-${_pkgname}
-version=8.3
+# Template file for 'cross-arm-none-eabi-gdb'
+pkgname=cross-arm-none-eabi-gdb
+version=10.1
 revision=1
-wrksrc="${_pkgname}-${version}"
+wrksrc=gdb-${version}
 build_style=gnu-configure
-pycompile_dirs="/usr/share/${_pkgname}"
-configure_args="
- --disable-gdbserver
- --disable-nls
- --disable-werror
- --host=${XBPS_CROSS_TRIPLE}
- --prefix=/usr
- --target=${_triplet}
- --with-babeltrace
- --with-expat
- --with-mpfr
- --with-system-readline
- --with-system-zlib
- --without-isl
- $(vopt_with guile)
- $(vopt_with python)
-"
-hostmakedepends="autoconf automake bison flex pkg-config texinfo"
-makedepends="babeltrace-devel expat-devel mpfr-devel ncurses-devel
- readline-devel zlib-devel $(vopt_if guile guile-devel)
- $(vopt_if python 'python3-devel gettext-devel')"
-short_desc="GNU Debugger"
+configure_args="--target=arm-none-eabi --disable-werror --disable-nls --with-system-readline
+ --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib --without-isl
+ $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)"
+hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)"
+makedepends="expat-devel ncurses-devel readline-devel zlib-devel $(vopt_if guile guile-devel)
+ $(vopt_if python 'python3-devel gettext-devel') babeltrace-devel mpfr-devel"
+depends="gdb-common"
+short_desc="GNU Debugger for ARM"
 maintainer="Ivan Sokolov <ivan-p-sokolov@ya.ru>"
 license="GPL-3.0-or-later"
-homepage="https://www.gnu.org/software/${_pkgname}"
-distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}.tar.xz"
-checksum=802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e
-python_version=2 #unverified
-build_options="guile python"
-# don't enable guile and python interfaces until they are moved into
-# platform independent packages
-build_options_default=" "
-nocross=yes
+homepage="https://www.gnu.org/software/gdb"
+distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz"
+checksum=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0
+make_check=no  # See gdb/template.
+
+if [ "${CROSS_BUILD}" ]; then
+	# Make python3.x detection work in cross builds
+	CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
+	CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
+	makedepends+=" $(vopt_if guile libatomic_ops-devel)"
+fi
 
-CFLAGS="-fcommon"
+# Package build options
+build_options="guile python"
+build_options_default="python"
 
 post_install() {
-	# resolve conflicts with binutils and native gdb
-	rm -fr ${DESTDIR}/usr/{share/{locale,gdb,info},include}
+	# resolve conflicts with gdb-common
+	rm -r ${DESTDIR}/usr/{share/{gdb,info},include}
 }

  parent reply	other threads:[~2021-04-14 11:39 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 17:12 [PR PATCH] " unspecd
2021-03-11  0:38 ` [PR REVIEW] " sgn
2021-03-11  5:45 ` [PR PATCH] [Updated] " unspecd
2021-03-11  7:33 ` [PR REVIEW] " unspecd
2021-03-18  9:26 ` [PR PATCH] [Updated] " unspecd
2021-03-18  9:46 ` unspecd
2021-03-28  0:46 ` unspecd
2021-04-04 23:11 ` [PR REVIEW] " ericonr
2021-04-11  4:19 ` ericonr
2021-04-11  4:19 ` ericonr
2021-04-11  4:19 ` ericonr
2021-04-11  4:19 ` ericonr
2021-04-11  4:19 ` ericonr
2021-04-14  3:49 ` [PR PATCH] [Updated] " unspecd
2021-04-14  3:56 ` [PR REVIEW] " unspecd
2021-04-14  3:57 ` unspecd
2021-04-14  4:04 ` [PR PATCH] [Updated] " unspecd
2021-04-14  5:09 ` [PR REVIEW] " unspecd
2021-04-14  5:15 ` ericonr
2021-04-14  5:15 ` ericonr
2021-04-14  5:15 ` ericonr
2021-04-14  5:15 ` ericonr
2021-04-14  5:15 ` ericonr
2021-04-14  5:15 ` ericonr
2021-04-14  5:15 ` ericonr
2021-04-14  5:17 ` ericonr
2021-04-14  5:17 ` ericonr
2021-04-14 11:39 ` unspecd [this message]
2021-04-14 11:40 ` unspecd
2021-04-14 11:41 ` unspecd
2021-04-14 11:52 ` unspecd
2021-04-14 12:10 ` unspecd
2021-04-14 12:22 ` ericonr
2021-04-15  2:45 ` [PR PATCH] [Updated] " unspecd
2021-04-15  3:20 ` [PR REVIEW] " unspecd
2021-04-26 16:58 ` ericonr
2021-04-30 16:31 ` [PR PATCH] [Updated] " unspecd
2021-04-30 16:55 ` [PR REVIEW] " unspecd
2021-04-30 17:49 ` ericonr
2021-04-30 18:28 ` [PR PATCH] [Updated] " unspecd
2021-04-30 18:35 ` unspecd
2021-04-30 19:15 ` [PR REVIEW] " unspecd
2021-04-30 19:44 ` ericonr
2021-04-30 19:47 ` [PR PATCH] [Updated] " unspecd
2021-04-30 19:49 ` [PR REVIEW] " unspecd
2021-05-04 11:47 ` ericonr
2021-05-04 11:52 ` [PR PATCH] [Updated] " unspecd
2021-05-04 20:07 ` [PR REVIEW] " ericonr
2021-05-04 20:07 ` ericonr
2021-05-05  6:55 ` Piraty
2021-05-06 12:47 ` unspecd
2021-05-06 14:16 ` unspecd
2021-05-06 14:19 ` unspecd
2021-05-06 14:45 ` ericonr
2021-10-03  8:16 ` [PR PATCH] [Updated] " ericonr
2021-10-03  8:17 ` [PR PATCH] [Merged]: " ericonr
2021-10-03  8:17 ` ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210414113908.Xd7yon0PYukleJm_jy7xl6ChnLWo6ijzdoa8JfPHJoo@z \
    --to=unspecd@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).