From f0c5b9b28280118cfa140fe4b1079a8cb2728ab8c26ab0fb78667d12f002f645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 2 Jan 2025 17:39:43 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main binutils revision ab879af3bb114c9afd50612eae423956 --- binutils-2.43-branch.diff.gz | 4 +-- binutils-fix-branch.diff | 22 +++++++++++++ binutils.changes | 31 ++++++++++++++++++ binutils.spec | 23 +++++++------ ld-relro.diff | 63 ------------------------------------ 5 files changed, 69 insertions(+), 74 deletions(-) create mode 100644 binutils-fix-branch.diff delete mode 100644 ld-relro.diff diff --git a/binutils-2.43-branch.diff.gz b/binutils-2.43-branch.diff.gz index 2e93059..149dd9e 100644 --- a/binutils-2.43-branch.diff.gz +++ b/binutils-2.43-branch.diff.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:900843788bb54f1e28ecf8f9bf2c4e785ec83246a6d8055f9c8f438f8300783b -size 31775 +oid sha256:6d541618e25f85bf7207ffa30b4ebb60448b50cf46c2572dedd82bc3971b4ea7 +size 57614 diff --git a/binutils-fix-branch.diff b/binutils-fix-branch.diff new file mode 100644 index 0000000..6e410eb --- /dev/null +++ b/binutils-fix-branch.diff @@ -0,0 +1,22 @@ +This is used to manually patch the bison generated files when +the binutils-X.YZ-branch.diff touches them. That diff is generated +directly from git and doesn't contain the generated .c/h files. +The base tarball does contain them, but generated from the unpatched state. +In SLE12 and older we can't regenerate them due to too old versions +of flex and bison. +So, when the branch diff _does_ touch them we need to do the regeneration +via such a manual patch. +Index: binutils-2.43/ld/ldgram.c +=================================================================== +--- binutils-2.43.orig/ld/ldgram.c 2024-08-04 01:00:00.000000000 +0200 ++++ binutils-2.43/ld/ldgram.c 2024-12-09 16:41:08.089715376 +0100 +@@ -2839,7 +2839,7 @@ yyreduce: + + case 73: /* ifile_p1: SEARCH_DIR '(' filename ')' */ + #line 324 "ldgram.y" +- { ldfile_add_library_path ((yyvsp[-1].name), search_dir_linker_script); } ++ { ldfile_add_library_path ((yyvsp[-1].name), false); } + #line 2844 "ldgram.c" + break; + + diff --git a/binutils.changes b/binutils.changes index 79ff1c9..c1a5f03 100644 --- a/binutils.changes +++ b/binutils.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Mon Dec 9 14:49:46 UTC 2024 - Michael Matz + +- Update to current 2.43.1 branch [PED-10254, PED-10306]: + * s390 - Add arch15 instructions + * various fixes from upstream: PR32153, PR32171, PR32189, + PR32196, PR32191, PR32109, PR32372, PR32387 +- Adjusted binutils-2.43-branch.diff.gz. +- Disable zstd-by-default again (needs adjustments in at least + golang,llvm15,llvm17 first) +- Add binutils-fix-branch.diff. +- Check non-changing of flex/bison inputs only after applying + branch and fix-branch diffs. + +------------------------------------------------------------------- +Wed Nov 20 14:59:28 UTC 2024 - Jiri Slaby + +- drop ld-relro.diff (relro is the default for some time) + and it warns on avr spuriously (bsc#1233520) + +------------------------------------------------------------------- +Mon Nov 18 18:12:05 UTC 2024 - John Paul Adrian Glaubitz + +- Add loongarch64 as new target + +------------------------------------------------------------------- +Tue Sep 10 05:25:27 UTC 2024 - Martin Liška + +- Enable zstd compression algorithm (instead of zlib) + for debug info sections by default. + ------------------------------------------------------------------- Wed Aug 28 13:18:28 UTC 2024 - Michael Matz diff --git a/binutils.spec b/binutils.spec index c6f4001..b099b61 100644 --- a/binutils.spec +++ b/binutils.spec @@ -104,7 +104,7 @@ Release: 0 %else %define build_multitarget 0 %endif -%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa +%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 loongarch64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa %define build_gprofng 0 @@ -132,11 +132,11 @@ Source2: binutils-%{version}.tar.bz2.sig Source3: binutils.keyring Source4: baselibs.conf Patch1: binutils-2.43-branch.diff.gz +Patch2: binutils-fix-branch.diff Patch3: binutils-skip-rpaths.patch Patch4: s390-biarch.diff Patch5: x86-64-biarch.patch Patch6: unit-at-a-time.patch -Patch8: ld-relro.diff Patch9: testsuite.diff Patch10: enable-targets-gold.diff Patch12: s390-pic-dso.diff @@ -245,19 +245,23 @@ The next generation profiling tool for Linux echo "make check will return with %{make_check_handling} in case of testsuite failures." %setup -q -n binutils-%{version} -# Backup flex and biscon files for later verification. -cp ld/ldlex.l ld/ldlex.l.orig -cp ld/ldgram.y ld/ldgram.y.orig - # Patch is outside test_vanilla because it's supposed to be the # patch bringing the tarball to the newest upstream version %patch -P 1 -p1 +%patch -P 2 -p1 + +# Backup flex and biscon files for later verification. Do this +# after branch and fix-branch patches are applied (which are assumed +# to manual fixup generated files, in case the branch diff touches +# the flex/bison source files) +cp ld/ldlex.l ld/ldlex.l.orig +cp ld/ldgram.y ld/ldgram.y.orig + %if !%{test_vanilla} %patch -P 3 -p1 %patch -P 4 %patch -P 5 %patch -P 6 -%patch -P 8 %patch -P 9 %patch -P 10 %patch -P 12 @@ -388,8 +392,9 @@ cd build-dir --enable-warn-execstack=yes \ --enable-warn-rwx-segments=yes -#FIXME: enable in the future -#%if %{suse_version} > 1550 +# FIXME: enable in future, when at least llvm15,llvm17,golang are +# fixed to accept zstd +#%if %{suse_version} > 1600 # --enable-default-compressed-debug-sections-algorithm=zstd \ #%endif diff --git a/ld-relro.diff b/ld-relro.diff deleted file mode 100644 index 23e727b..0000000 --- a/ld-relro.diff +++ /dev/null @@ -1,63 +0,0 @@ -Index: ld/lexsup.c -=================================================================== ---- ld/lexsup.c.orig 2024-08-04 01:00:00.000000000 +0200 -+++ ld/lexsup.c 2024-08-06 16:02:35.554864901 +0200 -@@ -772,6 +772,9 @@ parse_args (unsigned argc, char **argv) - } - } - -+ optarg = "relro"; -+ ldemul_handle_option ('z'); -+ - last_optind = -1; - while (1) - { -Index: ld/testsuite/config/default.exp -=================================================================== ---- ld/testsuite/config/default.exp.orig 2024-08-04 01:00:00.000000000 +0200 -+++ ld/testsuite/config/default.exp 2024-08-06 16:05:13.860859897 +0200 -@@ -39,7 +39,7 @@ if [info exists env(LD_UNDER_TEST)] { - } - - if ![info exists ld] then { -- set ld [findfile $base_dir/ld-new $base_dir/ld-new [transform ld]] -+ set ld "[findfile $base_dir/ld-new $base_dir/ld-new [transform ld]] -znorelro" - } - - if ![info exists as] then { -@@ -92,7 +92,7 @@ if {[info exists ld_testsuite_bindir]} { - } - catch "exec ln -s ld tmpdir/ld/collect-ld" status - catch "exec ln -s ../../../gas/as-new tmpdir/ld/as" status -- set gcc_B_opt "-B[pwd]/tmpdir/ld/" -+ set gcc_B_opt "-B[pwd]/tmpdir/ld/ -Wl,-z,norelro" - } - - # load the linker path -@@ -343,7 +343,7 @@ if ![info exists ELFEDIT] then { - } - - if ![info exists LD] then { -- set LD [findfile $base_dir/ld-new ./ld-new [transform ld]] -+ set LD "[findfile $base_dir/ld-new ./ld-new [transform ld]] -znorelro" - } - - if ![info exists LDFLAGS] then { -Index: ld/testsuite/ld-bootstrap/bootstrap.exp -=================================================================== ---- ld/testsuite/ld-bootstrap/bootstrap.exp.orig 2024-08-04 01:00:00.000000000 +0200 -+++ ld/testsuite/ld-bootstrap/bootstrap.exp 2024-08-06 16:02:35.554864901 +0200 -@@ -112,7 +112,12 @@ foreach flags $test_flags { - - # This test can only be run if we have the ld build directory, - # since we need the object files. -- if {[file normalize $ld] != [file normalize $objdir/ld-new]} { -+ set ldexe $ld -+ set ldparm [string first " " $ld] -+ if { $ldparm > 0 } then { -+ set ldexe [string range $ld 0 $ldparm] -+ } -+ if {[file normalize $ldexe] != [file normalize $objdir/ld-new]} { - untested $testname - continue - }