Skip to content

Commit 3eb771d

Browse files
committed
Update to binutils 2.45
1 parent bff41a9 commit 3eb771d

3 files changed

Lines changed: 32 additions & 45 deletions

File tree

build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ declare -r isl_tarball='/tmp/isl.tar.xz'
2626
declare -r isl_directory='/tmp/isl-0.27'
2727

2828
declare -r binutils_tarball='/tmp/binutils.tar.xz'
29-
declare -r binutils_directory='/tmp/binutils-with-gold-2.44'
29+
declare -r binutils_directory='/tmp/binutils-2.45'
3030

3131
declare -r gcc_major='15'
3232

@@ -262,7 +262,7 @@ fi
262262

263263
if ! [ -f "${binutils_tarball}" ]; then
264264
curl \
265-
--url 'https://mirrors.kernel.org/gnu/binutils/binutils-with-gold-2.44.tar.xz' \
265+
--url 'https://mirrors.kernel.org/gnu/binutils/binutils-2.45.tar.xz' \
266266
--retry '30' \
267267
--retry-all-errors \
268268
--retry-delay '0' \
@@ -276,9 +276,8 @@ if ! [ -f "${binutils_tarball}" ]; then
276276
--extract \
277277
--file="${binutils_tarball}"
278278

279-
patch --directory="${binutils_directory}" --strip='1' --input="${workdir}/patches/0001-Revert-gold-Use-char16_t-char32_t-instead-of-uint16_.patch"
280-
patch --directory="${binutils_directory}" --strip='1' --input="${workdir}/patches/0001-Disable-annoying-linker-warnings.patch"
281279
patch --directory="${binutils_directory}" --strip='1' --input="${workdir}/patches/0001-Add-relative-RPATHs-to-binutils-host-tools.patch"
280+
patch --directory="${binutils_directory}" --strip='1' --input="${workdir}/patches/0001-static_assert-is-a-C23-feature.patch"
282281
fi
283282

284283
if ! [ -f "${zstd_tarball}" ]; then

patches/0001-Add-relative-RPATHs-to-binutils-host-tools.patch

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ This eliminates the need to statically link any libraries and also saves disk sp
1111
bfd/Makefile.in | 2 +-
1212
binutils/Makefile.in | 2 +-
1313
gas/Makefile.in | 2 +-
14-
gold/Makefile.in | 8 ++++----
1514
gprof/Makefile.in | 2 +-
1615
ld/Makefile.in | 2 +-
1716
6 files changed, 9 insertions(+), 9 deletions(-)
@@ -55,46 +54,6 @@ index 1f24d4a5..47d294e2 100644
5554
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
5655
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
5756
am__v_CCLD_0 = @echo " CCLD " $@;
58-
diff --git a/gold/Makefile.in b/gold/Makefile.in
59-
index 02df5383..84abad9f 100644
60-
--- a/gold/Makefile.in
61-
+++ b/gold/Makefile.in
62-
@@ -193,7 +193,7 @@ PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
63-
am_dwp_OBJECTS = dwp.$(OBJEXT)
64-
dwp_OBJECTS = $(am_dwp_OBJECTS)
65-
am__DEPENDENCIES_1 =
66-
-dwp_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(dwp_LDFLAGS) \
67-
+dwp_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) -Xlinker -rpath -Xlinker \$$ORIGIN/../lib $(dwp_LDFLAGS) \
68-
$(LDFLAGS) -o $@
69-
am_incremental_dump_OBJECTS = incremental-dump.$(OBJEXT)
70-
incremental_dump_OBJECTS = $(am_incremental_dump_OBJECTS)
71-
@@ -242,7 +242,7 @@ am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
72-
am__v_CC_0 = @echo " CC " $@;
73-
am__v_CC_1 =
74-
CCLD = $(CC)
75-
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
76-
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) -Xlinker -rpath -Xlinker \$$ORIGIN/../lib $(LDFLAGS) -o $@
77-
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
78-
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
79-
am__v_CCLD_0 = @echo " CCLD " $@;
80-
@@ -254,7 +254,7 @@ am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
81-
am__v_CXX_0 = @echo " CXX " $@;
82-
am__v_CXX_1 =
83-
CXXLD = $(CXX)
84-
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
85-
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) -Xlinker -rpath -Xlinker \$$ORIGIN/../lib $(LDFLAGS) \
86-
-o $@
87-
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
88-
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
89-
@@ -1042,7 +1042,7 @@ incremental-dump$(EXEEXT): $(incremental_dump_OBJECTS) $(incremental_dump_DEPEND
90-
91-
ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES) $(EXTRA_ld_new_DEPENDENCIES)
92-
@rm -f ld-new$(EXEEXT)
93-
- $(AM_V_CXXLD)$(ld_new_LINK) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
94-
+ $(AM_V_CXXLD)$(ld_new_LINK) -Xlinker -rpath -Xlinker \$$ORIGIN/../lib $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
95-
96-
ld1$(EXEEXT): $(ld1_OBJECTS) $(ld1_DEPENDENCIES) $(EXTRA_ld1_DEPENDENCIES)
97-
@rm -f ld1$(EXEEXT)
9857
diff --git a/gprof/Makefile.in b/gprof/Makefile.in
9958
index 93fb3781..9aad7841 100644
10059
--- a/gprof/Makefile.in
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 18f85bd95c8cb740ac525f8fca05d3f6f6b497dc Mon Sep 17 00:00:00 2001
2+
From: Your Name <you@example.com>
3+
Date: Sun, 10 Aug 2025 23:13:27 +0000
4+
Subject: [PATCH] static_assert() is a C23 feature
5+
6+
---
7+
include/opcode/aarch64.h | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
11+
index 4425dd4..bf4129c 100644
12+
--- a/include/opcode/aarch64.h
13+
+++ b/include/opcode/aarch64.h
14+
@@ -361,10 +361,10 @@ typedef uint64_t aarch64_feature_word;
15+
not otherwise used). */
16+
#define AA64_REPVAL(ELT, VAL) VAL
17+
18+
-/* static_assert requires C11 (or C++11) or later. Support older
19+
+/* static_assert requires C23 (or C++11) or later. Support older
20+
versions by disabling this check since compilers without this are
21+
pretty uncommon these days. */
22+
-#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L) \
23+
+#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 202311L) \
24+
|| (defined __cplusplus && __cplusplus >= 201103L))
25+
static_assert ((AA64_REPLICATE (REP_PLUS, AA64_REPVAL,
26+
AARCH64_BITS_PER_FEATURE_WORD))
27+
--
28+
2.25.1
29+

0 commit comments

Comments
 (0)