Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: cross-avr-gdb
@ 2020-09-28 19:31 Logarithmus
  2020-09-28 21:17 ` [PR REVIEW] " pullmoll
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Logarithmus @ 2020-09-28 19:31 UTC (permalink / raw)
  To: ml

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

There is a new pull request by Logarithmus against master on the void-packages repository

https://github.com/Logarithmus/void-packages cross-avr-gdb
https://github.com/void-linux/void-packages/pull/25159

New package: cross-avr-gdb
GDB for debugging AVR targets

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

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

From 3bf83152cd699617f76fe56101d9434e5ac66d2a Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Mon, 28 Sep 2020 08:51:45 +0300
Subject: [PATCH] New package: cross-avr-gdb

---
 srcpkgs/cross-avr-gdb/template | 80 ++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 srcpkgs/cross-avr-gdb/template

diff --git a/srcpkgs/cross-avr-gdb/template b/srcpkgs/cross-avr-gdb/template
new file mode 100644
index 00000000000..c148b153b44
--- /dev/null
+++ b/srcpkgs/cross-avr-gdb/template
@@ -0,0 +1,80 @@
+# Template file for 'cross-${_triplet}-${_pkgname}'
+_triplet=avr
+_pkgname=gdb
+pkgname=cross-${_triplet}-${_pkgname}
+version=9.2
+revision=1
+wrksrc=${_pkgname}-${version}
+build_style=gnu-configure
+pycompile_dirs="/usr/share/gdb/python"
+configure_args="\
+	--target=${_triplet} \
+	--program-prefix=${_triplet}- \
+	--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
+	$(vopt_if python 'python3-devel gettext-libs')"
+depends=gdb
+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/"
+distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}.tar.xz"
+checksum=360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555
+python_version=3
+
+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}"
+fi
+CFLAGS+=" -fcommon -Wno-error"
+CXXFLAGS+=" -fcommon -Wno-error"
+# 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 ${wrksrc}/build
+}
+
+do_configure() {
+	cd ${wrksrc}/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 ${wrksrc}/build
+	make ${makejobs} all
+}
+
+do_install() {
+	cd ${wrksrc}/build
+	make DESTDIR=${DESTDIR} ${makejobs} install
+	# resolve conflicts with binutils
+	rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib
+	[ -d ${DESTDIR}/usr/lib64 ] && rm -rf ${DESTDIR}/usr/lib64
+	for f in bfd configure standards; do
+		rm -f ${DESTDIR}/usr/share/info/${f}.info*
+	done
+}
+
+post_install() {
+	# resolve conflicts with binutils and native gdb
+	rm -fr ${DESTDIR}/usr/{share/{locale,gdb,info},include}
+}

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

* Re: [PR REVIEW] New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
@ 2020-09-28 21:17 ` pullmoll
  2020-09-28 21:19 ` pullmoll
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pullmoll @ 2020-09-28 21:17 UTC (permalink / raw)
  To: ml

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

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/25159#discussion_r496237998

Comment:
The test for directory is redundant with `rm -rf ...`.

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

* Re: [PR REVIEW] New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
  2020-09-28 21:17 ` [PR REVIEW] " pullmoll
@ 2020-09-28 21:19 ` pullmoll
  2020-09-28 21:20 ` pullmoll
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pullmoll @ 2020-09-28 21:19 UTC (permalink / raw)
  To: ml

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

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/25159#discussion_r496238684

Comment:
You have `--disable-werror` so `-Wno-error` would be redundant?

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

* Re: [PR REVIEW] New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
  2020-09-28 21:17 ` [PR REVIEW] " pullmoll
  2020-09-28 21:19 ` pullmoll
@ 2020-09-28 21:20 ` pullmoll
  2020-09-28 21:20 ` pullmoll
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pullmoll @ 2020-09-28 21:20 UTC (permalink / raw)
  To: ml

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

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/25159#discussion_r496239191

Comment:
`cd build` should suffice because each stage starts with $PWD = $wrksrc

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

* Re: [PR REVIEW] New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
                   ` (2 preceding siblings ...)
  2020-09-28 21:20 ` pullmoll
@ 2020-09-28 21:20 ` pullmoll
  2020-09-28 21:28 ` [PR PATCH] [Updated] " Logarithmus
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pullmoll @ 2020-09-28 21:20 UTC (permalink / raw)
  To: ml

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

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/25159#discussion_r496239310

Comment:
`cd build`

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

* Re: [PR PATCH] [Updated] New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
                   ` (3 preceding siblings ...)
  2020-09-28 21:20 ` pullmoll
@ 2020-09-28 21:28 ` Logarithmus
  2020-09-28 21:32 ` Logarithmus
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Logarithmus @ 2020-09-28 21:28 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Logarithmus/void-packages cross-avr-gdb
https://github.com/void-linux/void-packages/pull/25159

New package: cross-avr-gdb
GDB for debugging AVR targets

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

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

From 6a9ca72eb0f1c1a903e5ad5da7f31c4cf099b796 Mon Sep 17 00:00:00 2001
From: Artur Sinila <personal@logarithmus.dev>
Date: Mon, 28 Sep 2020 08:51:45 +0300
Subject: [PATCH] New package: cross-avr-gdb

---
 srcpkgs/cross-avr-gdb/template | 80 ++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 srcpkgs/cross-avr-gdb/template

diff --git a/srcpkgs/cross-avr-gdb/template b/srcpkgs/cross-avr-gdb/template
new file mode 100644
index 00000000000..e01a4bf6bfa
--- /dev/null
+++ b/srcpkgs/cross-avr-gdb/template
@@ -0,0 +1,80 @@
+# Template file for 'cross-${_triplet}-${_pkgname}'
+_triplet=avr
+_pkgname=gdb
+pkgname=cross-${_triplet}-${_pkgname}
+version=9.2
+revision=1
+wrksrc=${_pkgname}-${version}
+build_style=gnu-configure
+pycompile_dirs="/usr/share/gdb/python"
+configure_args="\
+	--target=${_triplet} \
+	--program-prefix=${_triplet}- \
+	--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
+	$(vopt_if python 'python3-devel gettext-libs')"
+depends=gdb
+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/"
+distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}.tar.xz"
+checksum=360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555
+python_version=3
+
+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}"
+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
+}
+
+post_install() {
+	# resolve conflicts with binutils and native gdb
+	rm -fr usr/{share/{locale,gdb,info},include}
+}

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

* Re: New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
                   ` (4 preceding siblings ...)
  2020-09-28 21:28 ` [PR PATCH] [Updated] " Logarithmus
@ 2020-09-28 21:32 ` Logarithmus
  2020-09-28 21:33 ` Logarithmus
  2020-09-29 10:39 ` [PR PATCH] [Merged]: " pullmoll
  7 siblings, 0 replies; 9+ messages in thread
From: Logarithmus @ 2020-09-28 21:32 UTC (permalink / raw)
  To: ml

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

New comment by Logarithmus on void-packages repository

https://github.com/void-linux/void-packages/pull/25159#issuecomment-700292654

Comment:
Corrected

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

* Re: New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
                   ` (5 preceding siblings ...)
  2020-09-28 21:32 ` Logarithmus
@ 2020-09-28 21:33 ` Logarithmus
  2020-09-29 10:39 ` [PR PATCH] [Merged]: " pullmoll
  7 siblings, 0 replies; 9+ messages in thread
From: Logarithmus @ 2020-09-28 21:33 UTC (permalink / raw)
  To: ml

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

New comment by Logarithmus on void-packages repository

https://github.com/void-linux/void-packages/pull/25159#issuecomment-700292654

Comment:
Corrected. We should correct the same issues in **gdb** package's template

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

* Re: [PR PATCH] [Merged]: New package: cross-avr-gdb
  2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
                   ` (6 preceding siblings ...)
  2020-09-28 21:33 ` Logarithmus
@ 2020-09-29 10:39 ` pullmoll
  7 siblings, 0 replies; 9+ messages in thread
From: pullmoll @ 2020-09-29 10:39 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

New package: cross-avr-gdb
https://github.com/void-linux/void-packages/pull/25159

Description:
GDB for debugging AVR targets

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

end of thread, other threads:[~2020-09-29 10:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 19:31 [PR PATCH] New package: cross-avr-gdb Logarithmus
2020-09-28 21:17 ` [PR REVIEW] " pullmoll
2020-09-28 21:19 ` pullmoll
2020-09-28 21:20 ` pullmoll
2020-09-28 21:20 ` pullmoll
2020-09-28 21:28 ` [PR PATCH] [Updated] " Logarithmus
2020-09-28 21:32 ` Logarithmus
2020-09-28 21:33 ` Logarithmus
2020-09-29 10:39 ` [PR PATCH] [Merged]: " pullmoll

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).