Add m4 for debhelper
Hello,
Nowadays, debhelper pulls autotools, and thus m4, so we'd want to
crossbuild it.
Here is a fix, also available in my tree
git@salsa.debian.org:sthibault/rebootstrap.git
as 184ce049bc8f13330bbe40f18133da4060ea5ba6
Samuel
commit 184ce049bc8f13330bbe40f18133da4060ea5ba6
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Thu Jul 10 22:55:58 2025 +0200
Add m4 for debhelper
Nowadays debhelper pulls autotools and thus m4.
diff --git a/bootstrap.sh b/bootstrap.sh
index 9913ca0..db97577 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -3049,6 +3049,34 @@ patch_lz4() {
EOF
}
+add_automatic m4
+patch_m4() {
+ test "$HOST_ARCH" = hurd-amd64 || return 0
+ echo "Fix ucontext https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63334 https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00048.html"
+ drop_privs patch -p1 <<'EOF'
+--- ./lib/sigsegv.c.original 2023-05-05 10:45:54.673751100 +0000
++++ ./lib/sigsegv.c 2023-05-05 10:48:47.903577554 +0000
+@@ -351,6 +351,17 @@
+ "old esp, if trapped from user". */
+ # define SIGSEGV_FAULT_STACKPOINTER scp->sc_uesp
+
++# elif defined __x86_64__
++
++/* scp points to a 'struct sigcontext' (defined in
++ glibc/sysdeps/mach/hurd/x86_64/bits/sigcontext.h).
++ The registers of this struct get pushed on the stack through
++ gnumach/x86_64/i386/locore.S:trapall. */
++/* Both sc_rsp and sc_ursp appear to have the same value.
++ It appears more reliable to use sc_ursp because it is labelled as
++ "old rsp, if trapped from user". */
++# define SIGSEGV_FAULT_STACKPOINTER scp->sc_ursp
++
+ # endif
+
+ #endif
+EOF
+}
+
add_automatic man-db
add_automatic mawk
add_automatic mpclib3
@@ -4049,6 +4077,7 @@ add_need libxcrypt # by cyrus-sasl2, pam, shadow, systemd, util-linux
add_need libxrender # by cairo
add_need libzstd # by systemd
add_need lz4 # by elfutils, systemd
+add_need m4 # for debhelper
add_need man-db # for debhelper
add_need mawk # for base-files (alternatively: gawk)
add_need mpclib3 # by gcc-VER
Reply to: