I recently reported an issue with lang/gcc14 and static linking. The email trail is here: https://lists.freebsd.org/archives/freebsd-hackers/2025-January/004236.html kib has fixed FreeBSD to avoid the issue, and commit a change to top-of-tree: https://lists.freebsd.org/archives/dev-commits-src-main/2025-January/029575.html dim has provided a patch for lang/gcc14 and I've tested that patch with top-of-tree gcc sources. He sent the patch to GCC here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685 If there is soemone involved with the lang/gccXX ports and they have commit access to gcc git repository, you may want to commit the change. For this report, I know lang/gcc14. Other ports may also have a problem.
Created attachment 257135 [details] Patch for lang/gcc14 To move this along, here's a patch for lang/gcc14.
Thanks for the patch, which is definitely helpful! I am going to test it and commit it to all the GCC ports. I am going to start with the -devel ports, then if everything is all right I will move to the production ports. I believe it will not take long.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=aac6274e7a2e0d07771a1989be1ad73d2844afba commit aac6274e7a2e0d07771a1989be1ad73d2844afba Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2025-02-02 08:20:42 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2025-02-04 08:16:34 +0000 lang/gcc14-devel: Fix segfaults for static binaries Fix segmentation faults caused by -static flag into compiled binaries. Email thread: https://lists.freebsd.org/archives/freebsd-hackers/2025-January/004236.html Upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685 PR: 284441 Reported by: kargl lang/gcc14-devel/Makefile | 1 + lang/gcc14-devel/files/patch-libgcc-config.host (new) | 11 +++++++++++ 2 files changed, 12 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=07afa7646b3889d74a77e1f0206b350404baca4a commit 07afa7646b3889d74a77e1f0206b350404baca4a Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2025-02-03 16:01:00 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2025-02-04 08:16:35 +0000 lang/gcc15-devel: Fix segfaults for static binaries Fix segmentation faults caused by -static flag into compiled binaries. Email thread: https://lists.freebsd.org/archives/freebsd-hackers/2025-January/004236.html Upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685 PR: 284441 Reported by: kargl lang/gcc15-devel/Makefile | 1 + lang/gcc15-devel/files/patch-libgcc-config.host (new) | 11 +++++++++++ 2 files changed, 12 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=168cb3d94f79d676bb4155c15dcfcf6a48756b6d commit 168cb3d94f79d676bb4155c15dcfcf6a48756b6d Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2025-01-31 09:34:06 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2025-02-04 08:16:33 +0000 lang/gcc12-devel: Fix segfaults for static binaries Fix segmentation faults caused by -static flag into compiled binaries. Email thread: https://lists.freebsd.org/archives/freebsd-hackers/2025-January/004236.html Upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685 PR: 284441 Reported by: kargl lang/gcc12-devel/Makefile | 1 + lang/gcc12-devel/files/patch-libgcc-config.host (new) | 11 +++++++++++ 2 files changed, 12 insertions(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=670c92d6ac8df54055d4403d51d287a5d75cd93b commit 670c92d6ac8df54055d4403d51d287a5d75cd93b Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2025-02-01 10:41:25 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2025-02-04 08:16:33 +0000 lang/gcc13-devel: Fix segfaults for static binaries Fix segmentation faults caused by -static flag into compiled binaries. Email thread: https://lists.freebsd.org/archives/freebsd-hackers/2025-January/004236.html Upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685 PR: 284441 Reported by: kargl lang/gcc13-devel/Makefile | 1 + lang/gcc13-devel/files/patch-libgcc-config.host (new) | 11 +++++++++++ 2 files changed, 12 insertions(+)