git: f1c61d6af201 - main - lang/gcc13: Fix segfaults for static binaries
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Mar 2025 14:31:19 UTC
The branch main has been updated by salvadore:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f1c61d6af201a3d60445b0619e1bf97390ac78cd
commit f1c61d6af201a3d60445b0619e1bf97390ac78cd
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2025-03-12 09:33:16 +0000
Commit: Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-12 14:30:43 +0000
lang/gcc13: 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/Makefile | 1 +
lang/gcc13/files/patch-libgcc-config.host | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/lang/gcc13/Makefile b/lang/gcc13/Makefile
index aa47d51bb117..a213be8912d7 100644
--- a/lang/gcc13/Makefile
+++ b/lang/gcc13/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gcc
PORTVERSION= 13.3.0
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= GCC
PKGNAMESUFFIX= ${SUFFIX}
diff --git a/lang/gcc13/files/patch-libgcc-config.host b/lang/gcc13/files/patch-libgcc-config.host
new file mode 100644
index 000000000000..266694676d17
--- /dev/null
+++ b/lang/gcc13/files/patch-libgcc-config.host
@@ -0,0 +1,11 @@
+--- libgcc/config.host.orig 2025-01-30 12:31:26.479569000 -0800
++++ libgcc/config.host 2025-01-30 12:32:03.732682000 -0800
+@@ -286,7 +286,7 @@
+ # machine-specific sections may refine and add to this
+ # configuration.
+ tmake_file="$tmake_file t-freebsd t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
+- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtbeginT.o crtendS.o"
+ case ${target_thread_file} in
+ posix)
+ tmake_file="${tmake_file} t-freebsd-thread"