Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions build-binutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,11 @@ cd build

mkdir -p "$dist_dir"

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

make -j "$(nproc)"
make install
2 changes: 1 addition & 1 deletion local-run-in-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

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

exec docker run -t -i \
-v $(pwd):/home/dev/src \
Expand Down
19 changes: 19 additions & 0 deletions patches/binutils/001-bfd-elf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 15767245..d7662e0f 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -3066,7 +3066,13 @@ static inline bfd_boolean
bfd_section_is_ctf (const asection *sec)
{
const char *name = bfd_section_name (sec);
- return strncmp (name, ".ctf", 4) == 0 && (name[4] == 0 || name[4] == '.');
+
+ return (
+ name[0] == '.'
+ && name[1] == 'c'
+ && name[2] == 't'
+ && name[3] == 'f'
+ && (name[4] == 0 || name[4] == '.'));
}

#ifdef __cplusplus
6 changes: 5 additions & 1 deletion prepare-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ set -x
# Repository for the `gh` GitHub CLI tool used for creating releases.
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo

# Repository for expat-static
dnf install -y almalinux-release-devel

dnf install -y \
sudo \
gh \
Expand All @@ -27,4 +30,5 @@ dnf install -y \
python36 \
zlib-devel \
zlib-static \
libffi-devel
libffi-devel \
expat-static