aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2025-02-01 10:41:25 +0000
committerLorenzo Salvadore <salvadore@FreeBSD.org>2025-02-04 08:16:33 +0000
commit670c92d6ac8df54055d4403d51d287a5d75cd93b (patch)
treec1563f6bc02fca9e2ffcf8381832e8148a32a8f2
parenta8d80884a488f357a2b0174abae3781c65f86bcc (diff)
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
-rw-r--r--lang/gcc13-devel/Makefile1
-rw-r--r--lang/gcc13-devel/files/patch-libgcc-config.host11
2 files changed, 12 insertions, 0 deletions
diff --git a/lang/gcc13-devel/Makefile b/lang/gcc13-devel/Makefile
index e27cfc8c23c1..0c9ba19546e4 100644
--- a/lang/gcc13-devel/Makefile
+++ b/lang/gcc13-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gcc
PORTVERSION= 13.3.1.s20250124
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
PKGNAMESUFFIX= ${SUFFIX}-devel
diff --git a/lang/gcc13-devel/files/patch-libgcc-config.host b/lang/gcc13-devel/files/patch-libgcc-config.host
new file mode 100644
index 000000000000..c371f0d1e40b
--- /dev/null
+++ b/lang/gcc13-devel/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"