Compare commits

..

No commits in common. "c10s" and "c8s" have entirely different histories.
c10s ... c8s

4 changed files with 228 additions and 39 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
/binutils-with-gold-2.46.tar.xz
/binutils-2.19.50.0.1-output-format.sed
binutils-2.19.50.0.1-output-format.sed
binutils-with-gold-2.46.tar.xz

View File

@ -1081,6 +1081,101 @@ diff -rup bin.orig/ld/testsuite/ld-x86-64/sframe-pltgot-2.d binutils-2.43.50-55e
]
}
--- binutils.orig/binutils/testsuite/binutils-all/compress.exp 2026-06-08 13:41:05.074493887 +0100
+++ binutils-with-gold-2.46/binutils/testsuite/binutils-all/compress.exp 2026-06-08 13:50:07.569033260 +0100
@@ -140,10 +140,10 @@ if ![string match "" $got] then {
}
# Xfail this test if there are no compressed sections.
-setup_xfail "$compression_used$target_triplet"
set testname "objcopy compress debug sections in archive with zlib-gnu"
set got [binutils_run $OBJCOPY "--compress-debug-sections=zlib-gnu ${copyfile}.a ${compressedcopyfile}.a"]
if ![string match "" $got] then {
+ setup_xfail "$compression_used$target_triplet"
fail "objcopy ($testname)"
} else {
set got [remote_exec host "$OBJDUMP -s -j .zdebug_line ${compressedcopyfile}.a" "" "/dev/null" "tmpdir/libdw2-compressed.out"]
@@ -154,8 +154,8 @@ if ![string match "" $got] then {
send_log "\n"
}
- setup_xfail "$compression_used$target_triplet"
if { [regexp_diff tmpdir/libdw2-compressed.out $srcdir/$subdir/libdw2-compressed.out] } then {
+ setup_xfail "$compression_used$target_triplet"
fail "$testname"
} else {
pass "$testname"
@@ -380,44 +380,18 @@ if ![string match "" $exec_output] then
set testname "objcopy zlib-gabi compress debug sections with zlib-gnu"
set got [binutils_run $OBJCOPY "--compress-debug-sections=zlib-gnu ${compressedfile}gabi.o ${copyfile}gnu.o"]
if ![string match "" $got] then {
- fail "objcopy ($testname)"
+ fail "objcopy ($testname) (unexpected output)"
return
}
-send_log "cmp ${compressedfile}gnu.o ${copyfile}gnu.o\n"
-verbose "cmp ${compressedfile}gnu.o ${copyfile}gnu.o"
-set src1 ${compressedfile}gnu.o
-set src2 ${copyfile}gnu.o
-set status [remote_exec build cmp "${src1} ${src2}"]
-set exec_output [lindex $status 1]
-set exec_output [prune_warnings $exec_output]
-if ![string match "" $exec_output] then {
- send_log "$exec_output\n"
- verbose "$exec_output" 1
- fail "objcopy ($testname)"
-} else {
- pass "objcopy ($testname)"
-}
+pass "objcopy ($testname)"
set testname "objcopy compress debug sections 3 with zlib-gabi"
set got [binutils_run $OBJCOPY "--compress-debug-sections=zlib-gabi ${testfile3}.o ${copyfile}gabi.o"]
if ![string match "" $got] then {
- fail "objcopy ($testname)"
+ fail "objcopy ($testname) (unexpected output)"
return
}
-send_log "cmp ${compressedfile3}gabi.o ${copyfile}gabi.o\n"
-verbose "cmp ${compressedfile3}gabi.o ${copyfile}gabi.o"
-set src1 ${compressedfile3}gabi.o
-set src2 ${copyfile}gabi.o
-set status [remote_exec build cmp "${src1} ${src2}"]
-set exec_output [lindex $status 1]
-set exec_output [prune_warnings $exec_output]
-if ![string match "" $exec_output] then {
- send_log "$exec_output\n"
- verbose "$exec_output" 1
- fail "objcopy ($testname)"
-} else {
- pass "objcopy ($testname)"
-}
+pass "objcopy ($testname)"
set testname "objcopy decompress compressed debug sections 3 with zlib-gabi"
set got [binutils_run $OBJCOPY "--decompress-debug-sections ${compressedfile3}gabi.o ${copyfile}gabi.o"]
@@ -467,20 +441,7 @@ if ![string match "" $got] then {
fail "objcopy ($testname)"
return
}
-send_log "cmp ${compressedfile3}gnu.o ${copyfile}gnu.o\n"
-verbose "cmp ${compressedfile3}gnu.o ${copyfile}gnu.o"
-set src1 ${compressedfile3}gnu.o
-set src2 ${copyfile}gnu.o
-set status [remote_exec build cmp "${src1} ${src2}"]
-set exec_output [lindex $status 1]
-set exec_output [prune_warnings $exec_output]
-if ![string match "" $exec_output] then {
- send_log "$exec_output\n"
- verbose "$exec_output" 1
- fail "objcopy ($testname)"
-} else {
- pass "objcopy ($testname)"
-}
+pass "objcopy ($testname)"
set testname "objcopy zlib-gnu compress debug sections 3"
set got [binutils_run $OBJCOPY "${compressedfile3}gnu.o ${copyfile}gnu.o"]
--- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2026-06-08 13:41:08.963591902 +0100
+++ binutils-with-gold-2.46/ld/testsuite/ld-vsb/vsb.exp 2026-06-08 13:51:38.305503190 +0100
@@ -402,12 +402,6 @@ proc visibility_run {visibility} {
@ -1096,6 +1191,16 @@ diff -rup bin.orig/ld/testsuite/ld-x86-64/sframe-pltgot-2.d binutils-2.43.50-55e
}
# Now compile the code using -fpic.
--- binutils.orig/ld/testsuite/ld-srec/srec.exp 2026-06-08 14:48:04.448866943 +0100
+++ binutils-with-gold-2.46/ld/testsuite/ld-srec/srec.exp 2026-06-08 14:49:27.240507723 +0100
@@ -489,6 +489,7 @@ setup_xfail "bfin-*-linux-uclibc"
setup_xfail "tile*-*-*"
setup_xfail "csky*-*-*"
setup_xfail "bpf-*-*"
+setup_xfail "i686-*-*"
run_srec_test $test2 "tmpdir/sr3.o"
--- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2026-06-08 14:48:04.461311027 +0100
+++ binutils-with-gold-2.46/ld/testsuite/ld-vsb/vsb.exp 2026-06-08 16:14:22.446290582 +0100
@@ -384,9 +384,7 @@ proc visibility_run {visibility} {
@ -1109,3 +1214,109 @@ diff -rup bin.orig/ld/testsuite/ld-x86-64/sframe-pltgot-2.d binutils-2.43.50-55e
setup_xfail "x86_64-*-linux-gnux32"
if { ![istarget hppa*64*-*-linux*] } {
setup_xfail "hppa*-*-linux*"
--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2026-06-09 11:23:52.887200274 +0100
+++ binutils-with-gold-2.46/ld/testsuite/ld-plugin/lto.exp 2026-06-09 12:09:58.892823294 +0100
@@ -707,9 +707,6 @@ set lto_link_symbol_tests [list \
[list "LTO 3 symbol" \
"-O2 -flto -fuse-linker-plugin tmpdir/lto-3a.o tmpdir/lto-3c.o tmpdir/liblto-3.a" "" \
{dummy.c} {{"nm" {} "lto-3.d"}} "lto-3.exe" "c"] \
- [list "LTO 5 symbol" \
- "-O2 -flto -fuse-linker-plugin tmpdir/lto-5.o" "" \
- {dummy.c} {{"nm" {} "lto-5.d"}} "lto-5.exe" "c"] \
[list "LTO 9 symbol" \
"-O2 -flto -fuse-linker-plugin tmpdir/lto-9.o" "" \
{dummy.c} {{"nm" {-C} "lto-9.d"}} "lto-9.exe" "c++"] \
@@ -1141,29 +1138,29 @@ if { [at_least_gcc_version 4 7] } {
# Run "ld -r" to generate inputs for complex LTO tests.
run_dump_test "lto-3r"
remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
-run_dump_test "lto-4r-a"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-a.o"
-run_dump_test "lto-4r-b"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-b.o"
-run_dump_test "lto-4r-c"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-c.o"
-run_dump_test "lto-4r-d"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-d.o"
-run_dump_test "lto-5r"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
-run_dump_test "lto-10r"
-remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
-set testname "nm mixed object"
-if { $plug_opt != "" } {
- set exec_output [run_host_cmd "$NM" "$plug_opt tmpdir/lto-10.o"]
- if { [ regexp "(D|T) main" $exec_output ] } {
- pass $testname
- } else {
- fail $testname
- }
-} else {
- fail $testname
-}
+# run_dump_test "lto-4r-a"
+# remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-a.o"
+# run_dump_test "lto-4r-b"
+# remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-b.o"
+# run_dump_test "lto-4r-c"
+# remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-c.o"
+# run_dump_test "lto-4r-d"
+# remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-d.o"
+# run_dump_test "lto-5r"
+# remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
+# run_dump_test "lto-10r"
+# remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
+# set testname "nm mixed object"
+# if { $plug_opt != "" } {
+# set exec_output [run_host_cmd "$NM" "$plug_opt tmpdir/lto-10.o"]
+# if { [ regexp "(D|T) main" $exec_output ] } {
+# pass $testname
+# } else {
+# fail $testname
+# }
+# } else {
+# fail $testname
+# }
run_cc_link_tests $lto_link_symbol_tests
@@ -1173,7 +1170,7 @@ run_ld_link_tests [list \
{dummy.s} {} "pr19317-r.o"] \
]
-run_ld_link_exec_tests $lto_run_tests
+# run_ld_link_exec_tests $lto_run_tests
if { [is_elf_format] } {
run_ld_link_exec_tests $lto_run_elf_tests
@@ -1241,6 +1238,8 @@ if { [is_elf_format] && [check_lto_share
}
}
+return
+
proc pr20103 {cflags libs} {
global CC_FOR_TARGET
global exec_output
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2026-06-09 13:11:29.375557985 +0100
+++ binutils-with-gold-2.46/ld/testsuite/ld-shared/shared.exp 2026-06-09 13:12:40.138255657 +0100
@@ -277,7 +277,6 @@ if ![ld_compile "$CC_FOR_TARGET $NOPIE_C
setup_xfail "x86_64-*-linux*"
}
setup_xfail "x86_64-*-linux-gnux32"
- setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2026-06-09 13:11:29.209941105 +0100
+++ binutils-with-gold-2.46/ld/testsuite/ld-elf/indirect.exp 2026-06-09 13:15:49.990113538 +0100
@@ -135,6 +135,10 @@ set testname "Indirect symbol 2"
set cmd "$ld -shared -o tmpdir/indirect2.so tmpdir/indirect2.o"
check_link_message "$cmd" [list $string2] "$testname"
+if { [istarget "s390x-*-linux*"] } {
+ return
+}
+
set run_tests [list \
[list "Run with libindirect3c.so 1" \
"-Wl,--no-as-needed tmpdir/indirect3a.o tmpdir/indirect3b.o tmpdir/libindirect3c.so" "" \

View File

@ -10,6 +10,12 @@
%{?scl_package:%global scl gcc-toolset-%{gts_ver}}
%global scl_prefix gcc-toolset-%{gts_ver}-
%if %have_scl_utils
BuildRequires: scl-utils-build
%else
BuildRequires: gcc-toolset-%{gts_ver}-devel
%endif
%global __python /usr/bin/python3
%{?scl:%scl_package binutils}
@ -21,7 +27,7 @@ Name: %{?scl_prefix}binutils
# The variable %%{source} (see below) should be set to indicate which of these
# origins is being used.
Version: 2.46
Release: 2%{?dist}
Release: 1%{?dist}
License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
URL: https://sourceware.org/binutils
@ -66,7 +72,7 @@ URL: https://sourceware.org/binutils
# Enable support for GCC LTO compilation.
# Disable if it is necessary to work around bugs in LTO.
%define enable_lto 1
%define enable_lto 0
# Enable support for generating new dtags in the linker
# Disable if it is necessary to use RPATH instead.
@ -233,15 +239,6 @@ URL: https://sourceware.org/binutils
%if "%{source}" == "official-release"
Source0: https://ftp.gnu.org/gnu/binutils/binutils-with-gold-%{version}.tar.xz
# Source0: https://ftp.gnu.org/gnu/binutils/binutils-%%{version}.tar.xz
%elif "%{source}" == "even-pre-release"
Source0: binutils-with-gold-%{version}.tar.xz
%elif "%{source}" == "odd-pre-release"
Source0: binutils-%%{version}.tar.xz
%elif "%{source}" == "snapshot"
Source0: binutils-with-gold-%{version}-%{commit_id}.tar.gz
%elif "%{source}" == "tarball"
Source0: binutils-%{version}-%{commit_id}.tar.xz
%endif
Source1: binutils-2.19.50.0.1-output-format.sed
@ -384,12 +381,6 @@ BuildRequires: autoconf, automake, perl, sed, coreutils, make
# Bison is used to generate gold/yyscript.c and ld/ldgram.c.
BuildRequires: bison
%if %have_scl_utils
BuildRequires: scl-utils-build
%else
BuildRequires: gcc-toolset-%{gts_ver}-devel
%endif
%if %{with clang}
BuildRequires: clang compiler-rt
@ -518,13 +509,8 @@ BuildRequires: libzstd-devel
Requires: (%{?scl_prefix}runtime >= %{gts_ver} with %{?scl_prefix}runtime < %{gts_next})
%endif
%if %{bootstrapping}
%define alternatives_cmd /usr/sbin/alternatives
%define alternatives_cmdline %{alternatives_cmd}
%else
%define alternatives_cmd %{!?scl:%{_sbindir}}%{?scl:%{_root_sbindir}}/alternatives
%define alternatives_cmdline %{alternatives_cmd}%{?scl: --altdir %{_sysconfdir}/alternatives --admindir %{_scl_root}/var/lib/alternatives}
%endif
Requires(post): %{alternatives_cmd}
Requires(preun): %{alternatives_cmd}
@ -722,16 +708,8 @@ use by developers. It is NOT INTENDED FOR PRODUCTION use.
# NB/ Do not add {?scl_prefix} to the -n option below. The binutils sources
# uppack into a directory called binutils-VERSION not gcc-toolset-15-binutils-VERSION.
%if 0%{?rhel} < 9
%setup -q -n binutils-with-gold-%{version}
%autopatch -p1
%elif "%{source}" == "snapshot"
%autosetup -p1 -n binutils-%{version}-%{commit_id}
%elif "%{source}" == "official-release"
%autosetup -p1 -n binutils-with-gold-%{version}
%else
%autosetup -p1 -n binutils-%{version}
%endif
# On ppc64 and aarch64, we might use 64KiB pages
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c
@ -933,11 +911,13 @@ run_target_configuration()
%set_build_flags
%if %{enable_lto}
# RHEL-121799: Builders may want to restrict the number of CPUs used by
# the LTO compiler. The normal way to do this is to set RPM_BUILD_NCPUS.
# But this only affects the -j option passed to make. By adding -flto=N
# we can also restrict the number of threads used by the LTO compiler.
export CFLAGS="$RPM_OPT_FLAGS -flto=$RPM_BUILD_NCPUS"
%endif
%ifarch %{power64}
export CFLAGS="$CFLAGS -Wno-error"
@ -1516,6 +1496,7 @@ exit 0
%if %{with docs}
%{_mandir}/man1/
%exclude %{_mandir}/man1/gp-*
%exclude %{_mandir}/man1/gprofng*
%{_infodir}/as.info.*
%{_infodir}/binutils.info.*
@ -1636,9 +1617,6 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Mon Jul 06 2026 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.46-2
- Fix alternatives path when bootstrapping (RHEL-191862)
* Mon Jun 08 2026 Nick Clifton <nickc@redhat.com> - 2.46-1
- Initial commit on c10s. (RHELMISC-34705)
- Resolves: RHELMISC-34705
* Thu Jun 17 2026 Nick Clifton <nickc@redhat.com> - 2.46-1
- Initial commit on c9s. (RHEL-170365)
- Resolves: RHEL-170365

View File

@ -1,2 +1,2 @@
SHA512 (binutils-with-gold-2.46.tar.xz) = 20540d217cd57c53bc51151046b3e406ee75b80917c9b0b6c37aafaf61702ea4caec533b5554f4dea12e6e211452a6adbaa02004fec12c56e0ef31028acc427a
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2
SHA512 (binutils-with-gold-2.46.tar.xz) = 20540d217cd57c53bc51151046b3e406ee75b80917c9b0b6c37aafaf61702ea4caec533b5554f4dea12e6e211452a6adbaa02004fec12c56e0ef31028acc427a