diff -Naur heirloom-sh-050706-baseline/makefile heirloom-sh-050706/makefile
--- heirloom-sh-050706-baseline/makefile	2024-12-12 20:47:47.094750262 +0300
+++ heirloom-sh-050706/makefile	2024-12-12 20:59:38.702770210 +0300
@@ -71,10 +71,22 @@
 	setbrk.o stak.o string.o test.o ulimit.o word.o xec.o \
 	gmatch.o getopt.o strsig.o version.o mapmalloc.o umask.o
 
-.c.o: ; $(CC) -c $(CFLAGS) $(CPPFLAGS) $(LARGEF) $(SPELL) $(WARN) $<
-
 all: sh jsh sh.1.out
 
+# This is a hack so we properly compile with glibc 2.34+.
+# Citing glibc news file:
+#   * Add _SC_MINSIGSTKSZ and _SC_SIGSTKSZ.  When _SC_SIGSTKSZ_SOURCE or
+#    _GNU_SOURCE are defined, MINSIGSTKSZ and SIGSTKSZ are no longer
+#    constant on Linux.  MINSIGSTKSZ is redefined to sysconf(_SC_MINSIGSTKSZ)
+#    and SIGSTKSZ is redefined to sysconf (_SC_SIGSTKSZ).
+# Due to this change, fault.c fails to compile due to an attempt to initialize
+# sigsegv_stack, an array defined as "static", with a non-constant size.
+# Compiling without _GNU_SOURCE leads to no errors.
+fault.o:
+	$(CC) -c $(CFLAGS) $(LARGEF) $(SPELL) $(WARN) $<
+
+.c.o: ; $(CC) -c $(CFLAGS) $(CPPFLAGS) $(LARGEF) $(SPELL) $(WARN) $<
+
 sh: $(OBJ)
 	$(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o sh
 
