Skip to content

Commit

Permalink
Merge pull request #22 from ADKaster/package-version-download
Browse files Browse the repository at this point in the history
Changes to allow build from a fresh clone on current master
  • Loading branch information
flavioc authored Oct 24, 2023
2 parents 4dd04e1 + 8351ba8 commit a15be4f
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 4 deletions.
5 changes: 4 additions & 1 deletion download-funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ download_from_git () {
repo=$2
branch=$3
add_branch=""
if [ -n $branch ]; then
if [ -n "$branch" ]; then
add_branch="--branch $branch"
fi
if [ -d $dir ]; then
Expand Down Expand Up @@ -212,6 +212,9 @@ download_grep () {
return 0
fi
unpack xf $GREP_PKG $GREP_SRC
pushd $GREP_SRC &&
apply_patch $SCRIPT_DIR/patches/grep/gnulib-hurd-x86_64.patch 1 &&
popd
}

download_gawk () {
Expand Down
6 changes: 3 additions & 3 deletions package-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BINUTILS_VERSION=2.41
GCC_VERSION=13.2.0
FLEX_VERSION=2.6.4
ZLIB_VERSION=1.2.13
ZLIB_VERSION=1.3
BZIP2_VERSION=1.0.8
BASH_VERSION=5.2.15
COREUTILS_VERSION=9.1
Expand All @@ -16,7 +16,7 @@ GRUB_VERSION=2.06
SHADOW_VERSION=4.6
SED_VERSION=4.9
GMP_VERSION=6.2.1
MPFR_VERSION=4.2.0
MPFR_VERSION=4.2.1
MPC_VERSION=1.3.1
NCURSES_VERSION=6.4
# 8.1: checking what tgetent() returns for an unknown terminal... configure: error: failed to compile test program.
Expand All @@ -25,7 +25,7 @@ VIM_VERSION=9.0
GPG_ERROR_VERSION=1.46
GCRYPT_VERSION=1.10.1
MAKE_VERSION=4.3
GREP_VERSION=3.10
GREP_VERSION=3.11
GAWK_VERSION=5.2.1
DASH_VERSION=0.5.12
LIBPCIACCESS_VERSION=0.17
Expand Down
50 changes: 50 additions & 0 deletions patches/grep/gnulib-hurd-x86_64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From acb36717d8dd76b5cb755edc53aa5cea7f24db01 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Fri, 12 May 2023 21:28:47 +0200
Subject: sigsegv: Add tentative support for Hurd/x86_64.

Reported by Samuel Thibault <[email protected]>.

* lib/sigsegv.c: Update from libsigsegv/src/fault-hurd-i386.h.
---
ChangeLog | 6 ++++++
lib/sigsegv.c | 20 +++++++++++++++++---
2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/lib/sigsegv.c b/lib/sigsegv.c
index 5e943e4..aadba4e 100644
--- a/lib/sigsegv.c
+++ b/lib/sigsegv.c
@@ -365,12 +365,26 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
# define SIGSEGV_FAULT_ADDRESS (unsigned long) code
# define SIGSEGV_FAULT_CONTEXT scp

-# if defined __i386__
+# if defined __x86_64__
+/* 64 bit registers */
+
+/* scp points to a 'struct sigcontext' (defined in
+ glibc/sysdeps/mach/hurd/x86_64/bits/sigcontext.h).
+ The registers, at the moment the signal occurred, get pushed on the stack
+ through gnumach/x86_64/locore.S:alltraps and then copied into the struct
+ through glibc/sysdeps/mach/hurd/x86/trampoline.c. */
+/* sc_rsp is unused (not set by gnumach/x86_64/locore.S:alltraps). We need
+ to use sc_ursp. */
+# define SIGSEGV_FAULT_STACKPOINTER scp->sc_ursp
+
+# elif defined __i386__
+/* 32 bit registers */

/* scp points to a 'struct sigcontext' (defined in
glibc/sysdeps/mach/hurd/i386/bits/sigcontext.h).
- The registers of this struct get pushed on the stack through
- gnumach/i386/i386/locore.S:trapall. */
+ The registers, at the moment the signal occurred, get pushed on the stack
+ through gnumach/i386/i386/locore.S:alltraps and then copied into the struct
+ through glibc/sysdeps/mach/hurd/x86/trampoline.c. */
/* Both sc_esp and sc_uesp appear to have the same value.
It appears more reliable to use sc_uesp because it is labelled as
"old esp, if trapped from user". */
--
cgit v1.1

0 comments on commit a15be4f

Please sign in to comment.