guix_mirror_bot pushed a commit to branch go-team
in repository guix.
commit e4e34a57e59cdcd4dc4ed94d8992ac492a1de996
Author: Yelninei <[email protected]>
AuthorDate: Sat Jan 10 18:19:35 2026 +0000
gnu: gccgo-15: Fix build on Hurd.
* gnu/packages/patches/gcc-hurd-split-stack.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/gcc.scm (gcc-15): Add patch.
Change-Id: If5f3b22ffaca3bbf1343e4986cd573213a8b0d12
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/local.mk | 1 +
gnu/packages/gcc.scm | 3 +-
gnu/packages/patches/gcc-hurd-split-stack.patch | 39 +++++++++++++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index e619ab688c..6112c857ba 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1358,6 +1358,7 @@ dist_patch_DATA =
\
%D%/packages/patches/gcc-cross-environment-variables.patch \
%D%/packages/patches/gcc-cross-gxx-include-dir.patch \
%D%/packages/patches/gcc-fix-texi2pod.patch \
+ %D%/packages/patches/gcc-hurd-split-stack.patch \
%D%/packages/patches/gcc-libstdc++-newer-gcc.patch \
%D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \
%D%/packages/patches/gcc-4.9-inline.patch \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 1bdcce1236..9265bd1b8b 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1065,7 +1065,8 @@ It also includes runtime support libraries for these
languages.")
(base32
"0knj4ph6y7r7yhnp1v4339af7mki5nkh7ni9b948433bhabdk3s3"))
(patches (search-patches "gcc-12-strmov-store-file-names.patch"
- "gcc-5.0-libvtv-runpath.patch"))
+ "gcc-5.0-libvtv-runpath.patch"
+ "gcc-hurd-split-stack.patch"))
(modules '((guix build utils)))
(snippet gcc-canadian-cross-objdump-snippet)))
(arguments
diff --git a/gnu/packages/patches/gcc-hurd-split-stack.patch
b/gnu/packages/patches/gcc-hurd-split-stack.patch
new file mode 100644
index 0000000000..b918414384
--- /dev/null
+++ b/gnu/packages/patches/gcc-hurd-split-stack.patch
@@ -0,0 +1,39 @@
+Patch from
https://gcc.gnu.org/cgit/gcc/commit/?id=29eacf043b6e8560c5c42d67f7f9b11e4e2cb156
+
+See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104290
+
+From 29eacf043b6e8560c5c42d67f7f9b11e4e2cb156 Mon Sep 17 00:00:00 2001
+From: Svante Signell <[email protected]>
+Date: Sun, 6 Feb 2022 11:43:23 +0000
+Subject: hurd: Add OPTION_GLIBC_P and OPTION_GLIBC
+
+GNU/Hurd uses glibc just like GNU/Linux.
+
+This is needed for gcc to notice that glibc supports split stack in
+finish_options.
+
+ PR go/104290
+gcc/ChangeLog:
+ * config/gnu.h (OPTION_GLIBC_P, OPTION_GLIBC): Define.
+---
+ gcc/config/gnu.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h
+index 6b8f36bd3d2a..825e7434d404 100644
+--- a/gcc/config/gnu.h
++++ b/gcc/config/gnu.h
+@@ -19,6 +19,10 @@ You should have received a copy of the GNU General Public
License
+ along with GCC. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++/* C libraries used on GNU/Hurd. */
++#define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC)
++#define OPTION_GLIBC OPTION_GLIBC_P (&global_options)
++
+ #undef GNU_USER_TARGET_OS_CPP_BUILTINS
+ #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
+ do { \
+--
+cgit
+