Skip to content

Commit 0c31d90

Browse files
authored
Merge pull request #96 from ziuziakowska/gdb-fix
GDB fixes
2 parents 7471191 + 389215f commit 0c31d90

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

build-binutils.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,11 @@ cd build
6060

6161
mkdir -p "$dist_dir"
6262

63-
# NOTE: We don't want to require `libexpat` to be dynamically linked.
64-
# It turns out to be quite hard to statically link *only* `libexpat`.
6563
../configure \
66-
--target "$target" \
64+
--target="$target" \
6765
--program-prefix="$target-" \
68-
--prefix "$dist_dir" \
69-
--with-expat=no
66+
--prefix="$dist_dir" \
67+
--with-libexpat-type=static
7068

7169
make -j "$(nproc)"
7270
make install

local-run-in-container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55

6-
IMAGE=lowrisc/lowrisc-base-centos6:latest
6+
IMAGE=quay.io/pypa/manylinux_2_28_x86_64
77

88
exec docker run -t -i \
99
-v $(pwd):/home/dev/src \

patches/binutils/001-bfd-elf.patch

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
2+
index 15767245..d7662e0f 100644
3+
--- a/bfd/elf-bfd.h
4+
+++ b/bfd/elf-bfd.h
5+
@@ -3066,7 +3066,13 @@ static inline bfd_boolean
6+
bfd_section_is_ctf (const asection *sec)
7+
{
8+
const char *name = bfd_section_name (sec);
9+
- return strncmp (name, ".ctf", 4) == 0 && (name[4] == 0 || name[4] == '.');
10+
+
11+
+ return (
12+
+ name[0] == '.'
13+
+ && name[1] == 'c'
14+
+ && name[2] == 't'
15+
+ && name[3] == 'f'
16+
+ && (name[4] == 0 || name[4] == '.'));
17+
}
18+
19+
#ifdef __cplusplus

prepare-host.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ set -x
99
# Repository for the `gh` GitHub CLI tool used for creating releases.
1010
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
1111

12+
# Repository for expat-static
13+
dnf install -y almalinux-release-devel
14+
1215
dnf install -y \
1316
sudo \
1417
gh \
@@ -27,4 +30,5 @@ dnf install -y \
2730
python36 \
2831
zlib-devel \
2932
zlib-static \
30-
libffi-devel
33+
libffi-devel \
34+
expat-static

0 commit comments

Comments
 (0)