Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip]
@ 2022-07-05 11:44 meator
  2022-07-05 11:45 ` meator
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: meator @ 2022-07-05 11:44 UTC (permalink / raw)
  To: ml

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

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

https://github.com/meator/void-packages libstdc++
https://github.com/void-linux/void-packages/pull/37864

gcc: include gdb helpers for libstdc++ [ci skip]
<!-- Uncomment relevant sections and delete options which are not applicable -->

So. Gcc (or more specifically libstdc++) includes extra files to make debugging C++ code in gdb easier. This includes pretty printers and xmethods. These files can significantly improve the experience of debugging C++ code. Debian based distros (and probably other ones) already include this into their libstdc++ package.

But Void explicitly deletes these files that are generated when compiling. Rather than deleting these useful files, I included then into the libstdc++ package like Ubuntu does. This doesn't add any extra dependencies, gdb will try to load it if python is present, otherwise it'll ignore it.

There are some other packages that already include extra info for gdb: `gstreamer1`, `glib-devel`... Interestingly enough, these packages put the files into `/usr/share/gdb/auto-load/usr/lib64` instead of `/usr/share/gdb/auto-load/usr/lib`, which isn't loaded by gdb at all (maybe because `/usr/lib64` is just a symlink).

The files could be moved to `libstdc++-devel`. Maybe it would be more apropriate.

I have built and tested the pretty printers and everything works. It took 5 and a half hours to compile for me (I dont have a very beefy computer), so I'm assigning `[ci skip]`.

I know messing with a `bootstrap=yes` compiler could cause a disaster if something goes wrong but I'm only modifying revelant files and it's working for me (I have it installed on my computer) so I hope everything will be fine.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - I didn't test cross compiling. The python scripts aren't architecture dependent, so there should be no problems.

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

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

From 17484a077e7675fc4870fc597e5139d2e202353f Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Tue, 5 Jul 2022 10:09:39 +0200
Subject: [PATCH] gcc: include gdb helpers for libstdc++

---
 srcpkgs/gcc/template | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template
index 09727ef34fb2..ff86d69a1ec8 100644
--- a/srcpkgs/gcc/template
+++ b/srcpkgs/gcc/template
@@ -7,7 +7,7 @@ pkgname=gcc
 # to get regression fixes not yet incorporate into a stable release
 # it should be possible to switch back to stable with 10.3 or 11
 version=10.2.1pre1
-revision=3
+revision=4
 _patchver="${version%pre*}"
 _minorver="${_patchver%.*}"
 _majorver="${_minorver%.*}"
@@ -371,13 +371,9 @@ do_install() {
 	rm -f ${DESTDIR}/usr/lib/libffi*
 	rm -f ${DESTDIR}/usr/share/man/man3/ffi*
 
-	# Remove all python scripts in libdir.
-	rm -f ${DESTDIR}/usr/lib/*.py
-
-	# Remove more python stuff.
-	if [ -d ${DESTDIR}/usr/share/gcc-${_patchver}/python ]; then
-		rm -rf ${DESTDIR}/usr/share/gcc-${_patchver}/python
-	fi
+	# Move libstdc++ gdb helpers to location where gdb can autoload them
+	mkdir -p ${DESTDIR}/usr/share/gdb/auto-load/usr/lib
+	mv ${DESTDIR}/usr/lib/*.py ${DESTDIR}/usr/share/gdb/auto-load/usr/lib
 
 	# Install c89 and c99 wrappers and its manpages, from NetBSD.
 	for f in c89 c99; do
@@ -719,5 +715,7 @@ libstdc++_package() {
 	pkg_install() {
 		vmove "usr/lib/libstdc++.so*"
 		vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+		vmove usr/share/gdb
+		vmove usr/share/gcc-${_patchver}/python
 	}
 }

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

* Re: gcc: include gdb helpers for libstdc++ [ci skip]
  2022-07-05 11:44 [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip] meator
@ 2022-07-05 11:45 ` meator
  2022-07-14 18:40 ` leahneukirchen
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: meator @ 2022-07-05 11:45 UTC (permalink / raw)
  To: ml

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

New comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/37864#issuecomment-1174965622

Comment:
@Gottox ping

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

* Re: gcc: include gdb helpers for libstdc++ [ci skip]
  2022-07-05 11:44 [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip] meator
  2022-07-05 11:45 ` meator
@ 2022-07-14 18:40 ` leahneukirchen
  2022-10-13  2:15 ` github-actions
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: leahneukirchen @ 2022-07-14 18:40 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/37864#issuecomment-1184778100

Comment:
sgtm

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

* Re: gcc: include gdb helpers for libstdc++ [ci skip]
  2022-07-05 11:44 [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip] meator
  2022-07-05 11:45 ` meator
  2022-07-14 18:40 ` leahneukirchen
@ 2022-10-13  2:15 ` github-actions
  2022-10-13 18:26 ` meator
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: github-actions @ 2022-10-13  2:15 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/37864#issuecomment-1276935432

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: gcc: include gdb helpers for libstdc++ [ci skip]
  2022-07-05 11:44 [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip] meator
                   ` (2 preceding siblings ...)
  2022-10-13  2:15 ` github-actions
@ 2022-10-13 18:26 ` meator
  2022-12-20 21:53 ` [PR PATCH] [Closed]: " classabbyamp
  2022-12-20 21:53 ` classabbyamp
  5 siblings, 0 replies; 7+ messages in thread
From: meator @ 2022-10-13 18:26 UTC (permalink / raw)
  To: ml

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

New comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/37864#issuecomment-1278013854

Comment:
I believe this pull request is still relevant. The lint error
```
template:515: license GFDL-1.2-or-later GPL-3.0-or-later LGPL-2.1-or-later should not be installed
```
is unrelated to changes I'm proposing. I don't want to fix it because `gcc` is a base package and I don't want to break anything.

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

* Re: [PR PATCH] [Closed]: gcc: include gdb helpers for libstdc++ [ci skip]
  2022-07-05 11:44 [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip] meator
                   ` (3 preceding siblings ...)
  2022-10-13 18:26 ` meator
@ 2022-12-20 21:53 ` classabbyamp
  2022-12-20 21:53 ` classabbyamp
  5 siblings, 0 replies; 7+ messages in thread
From: classabbyamp @ 2022-12-20 21:53 UTC (permalink / raw)
  To: ml

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

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

gcc: include gdb helpers for libstdc++ [ci skip]
https://github.com/void-linux/void-packages/pull/37864

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

So. Gcc (or more specifically libstdc++) includes extra files to make debugging C++ code in gdb easier. This includes pretty printers and xmethods. These files can significantly improve the experience of debugging C++ code. Debian based distros (and probably other ones) already include this into their libstdc++ package.

But Void explicitly deletes these files that are generated when compiling. Rather than deleting these useful files, I included then into the libstdc++ package like Ubuntu does. This doesn't add any extra dependencies, gdb will try to load it if python is present, otherwise it'll ignore it.

There are some other packages that already include extra info for gdb: `gstreamer1`, `glib-devel`... Interestingly enough, these packages put the files into `/usr/share/gdb/auto-load/usr/lib64` instead of `/usr/share/gdb/auto-load/usr/lib`, which isn't loaded by gdb at all (maybe because `/usr/lib64` is just a symlink).

The files could be moved to `libstdc++-devel`. Maybe it would be more apropriate.

I have built and tested the pretty printers and everything works. It took 5 and a half hours to compile for me (I dont have a very beefy computer), so I'm assigning `[ci skip]`.

I know messing with a `bootstrap=yes` compiler could cause a disaster if something goes wrong but I'm only modifying revelant files and it's working for me (I have it installed on my computer) so I hope everything will be fine.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - I didn't test cross compiling. The python scripts aren't architecture dependent, so there should be no problems.

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

* Re: gcc: include gdb helpers for libstdc++ [ci skip]
  2022-07-05 11:44 [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip] meator
                   ` (4 preceding siblings ...)
  2022-12-20 21:53 ` [PR PATCH] [Closed]: " classabbyamp
@ 2022-12-20 21:53 ` classabbyamp
  5 siblings, 0 replies; 7+ messages in thread
From: classabbyamp @ 2022-12-20 21:53 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/37864#issuecomment-1360372254

Comment:
done as part of gcc12

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

end of thread, other threads:[~2022-12-20 21:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 11:44 [PR PATCH] gcc: include gdb helpers for libstdc++ [ci skip] meator
2022-07-05 11:45 ` meator
2022-07-14 18:40 ` leahneukirchen
2022-10-13  2:15 ` github-actions
2022-10-13 18:26 ` meator
2022-12-20 21:53 ` [PR PATCH] [Closed]: " classabbyamp
2022-12-20 21:53 ` classabbyamp

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