Hello community,

here is the log from the commit of package binutils for openSUSE:Factory 
checked in at 2019-09-23 11:58:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/binutils (Old)
 and      /work/SRC/openSUSE:Factory/.binutils.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "binutils"

Mon Sep 23 11:58:17 2019 rev:138 rq:729929 version:2.32

Changes:
--------
--- /work/SRC/openSUSE:Factory/binutils/binutils.changes        2019-08-05 
10:28:32.643457932 +0200
+++ /work/SRC/openSUSE:Factory/.binutils.new.7948/binutils.changes      
2019-09-23 11:58:23.673994689 +0200
@@ -1,0 +2,35 @@
+Mon Sep  9 17:19:56 UTC 2019 - m...@suse.com
+
+- Update to current 2.32 branch @7b468db3 adding
+  binutils-2.32-branch.diff.gz [jsc#ECO-368].
+- Includes fixes for these CVEs:
+  bsc#1109412 aka CVE-2018-17358 aka PR23686 
+  bsc#1109413 aka CVE-2018-17359 aka PR23686 
+  bsc#1109414 aka CVE-2018-17360 aka PR23685 
+  bsc#1111996 aka CVE-2018-18309 aka PR23770 
+  bsc#1112534 aka CVE-2018-18484 aka GCC PR87636
+  bsc#1112535 aka CVE-2018-18483 aka PR23767
+  bsc#1113247 aka CVE-2018-18607 aka PR23805 
+  bsc#1113252 aka CVE-2018-18606 aka PR23806 
+  bsc#1113255 aka CVE-2018-18605 aka PR23804 
+  bsc#1116827 aka CVE-2018-17985 aka GCC PR87335 
+  bsc#1118830 aka CVE-2018-19932 aka PR23932 
+  bsc#1118831 aka CVE-2018-19931 aka PR23942 
+  bsc#1120640 aka CVE-2018-1000876 aka PR23994
+  bsc#1121034 aka CVE-2018-20651 aka PR24041
+  bsc#1121035 aka CVE-2018-20623 aka PR24049 
+  bsc#1121056 aka CVE-2018-20671 aka PR24005
+  bsc#1142772 aka CVE-2019-1010180 aka PR23657
+- Refresh s390-biarch.diff and
+  binutils-revert-plt32-in-branches.diff .
+- For the SLE12 package this also removes patches
+  binutils-z13-1.diff, binutils-z13-2.diff,
+  binutils-z13-3.diff, binutils-z13-4.diff and binutils-z13-5.diff .
+
+-------------------------------------------------------------------
+Sat Aug 31 14:50:57 UTC 2019 - Dirk Mueller <dmuel...@suse.com>
+
+- enable xtensa architecture (Tensilica lc6 and related)
+- Fix SUSE typo in README package name
+
+-------------------------------------------------------------------
@@ -5,0 +41,9 @@
+
+-------------------------------------------------------------------
+Mon Jun  3 14:20:07 UTC 2019 - m...@suse.com
+
+Fake entry for SLE12 package variant only:
+- Add support for new z13 instructions. [fate#327074, jsc#SLE-6206,
+  bsc#1137271]
+  Adds patches binutils-z13-1.diff, binutils-z13-2.diff,
+  binutils-z13-3.diff, binutils-z13-4.diff and binutils-z13-5.diff .
cross-aarch64-binutils.changes: same change
cross-arm-binutils.changes: same change
cross-avr-binutils.changes: same change
cross-epiphany-binutils.changes: same change
cross-hppa-binutils.changes: same change
cross-hppa64-binutils.changes: same change
cross-i386-binutils.changes: same change
cross-ia64-binutils.changes: same change
cross-m68k-binutils.changes: same change
cross-mips-binutils.changes: same change
cross-ppc-binutils.changes: same change
cross-ppc64-binutils.changes: same change
cross-ppc64le-binutils.changes: same change
cross-riscv64-binutils.changes: same change
cross-rx-binutils.changes: same change
cross-s390-binutils.changes: same change
cross-s390x-binutils.changes: same change
cross-sparc-binutils.changes: same change
cross-sparc64-binutils.changes: same change
cross-spu-binutils.changes: same change
cross-x86_64-binutils.changes: same change
New Changes file:

--- /dev/null   2019-08-07 02:59:15.679220339 +0200
+++ /work/SRC/openSUSE:Factory/.binutils.new.7948/cross-xtensa-binutils.changes 
2019-09-23 11:58:27.857993998 +0200
@@ -0,0 +1,3498 @@
+-------------------------------------------------------------------
+Mon Sep  9 17:19:56 UTC 2019 - m...@suse.com
+
+- Update to current 2.32 branch @7b468db3 adding
+  binutils-2.32-branch.diff.gz [jsc#ECO-368].
+- Includes fixes for these CVEs:
+  bsc#1109412 aka CVE-2018-17358 aka PR23686 
+  bsc#1109413 aka CVE-2018-17359 aka PR23686 
+  bsc#1109414 aka CVE-2018-17360 aka PR23685 
+  bsc#1111996 aka CVE-2018-18309 aka PR23770 
+  bsc#1112534 aka CVE-2018-18484 aka GCC PR87636
+  bsc#1112535 aka CVE-2018-18483 aka PR23767
+  bsc#1113247 aka CVE-2018-18607 aka PR23805 
+  bsc#1113252 aka CVE-2018-18606 aka PR23806 
+  bsc#1113255 aka CVE-2018-18605 aka PR23804 
+  bsc#1116827 aka CVE-2018-17985 aka GCC PR87335 
+  bsc#1118830 aka CVE-2018-19932 aka PR23932 
+  bsc#1118831 aka CVE-2018-19931 aka PR23942 
+  bsc#1120640 aka CVE-2018-1000876 aka PR23994
+  bsc#1121034 aka CVE-2018-20651 aka PR24041
+  bsc#1121035 aka CVE-2018-20623 aka PR24049 
+  bsc#1121056 aka CVE-2018-20671 aka PR24005
+  bsc#1142772 aka CVE-2019-1010180 aka PR23657
+- Refresh s390-biarch.diff and
+  binutils-revert-plt32-in-branches.diff .
+- For the SLE12 package this also removes patches
+  binutils-z13-1.diff, binutils-z13-2.diff,
+  binutils-z13-3.diff, binutils-z13-4.diff and binutils-z13-5.diff .
+
+-------------------------------------------------------------------
+Sat Aug 31 14:50:57 UTC 2019 - Dirk Mueller <dmuel...@suse.com>
+
+- enable xtensa architecture (Tensilica lc6 and related)
+- Fix SUSE typo in README package name
+
+-------------------------------------------------------------------
+Mon Jul 22 10:41:14 UTC 2019 - Martin Liška <mli...@suse.cz>
+
+- Use -ffat-lto-objects in order to provide assembly for static libs
+  (boo#1141913).
+
+-------------------------------------------------------------------
+Mon Jun  3 14:20:07 UTC 2019 - m...@suse.com
+
+Fake entry for SLE12 package variant only:
+- Add support for new z13 instructions. [fate#327074, jsc#SLE-6206,
+  bsc#1137271]
+  Adds patches binutils-z13-1.diff, binutils-z13-2.diff,
+  binutils-z13-3.diff, binutils-z13-4.diff and binutils-z13-5.diff .
+
+-------------------------------------------------------------------
+Mon Apr 29 11:10:11 UTC 2019 - Martin Liška <mli...@suse.cz>
+
+- Add binutils-pr24486.patch: fix for PR24486 (boo#1133131 boo#1133232).
+
+-------------------------------------------------------------------
+Tue Apr 23 07:46:10 UTC 2019 - Martin Liška <mli...@suse.cz>
+
+- Add rx-gas-padding-pr24464.patch: fix for PR24464.
+
+-------------------------------------------------------------------
+Wed Apr  3 14:00:22 UTC 2019 - Andreas Schwab <sch...@suse.de>
+
+- riscv-abi-check.patch: Don't check ABI flags if no code section
+
+-------------------------------------------------------------------
+Tue Feb 19 10:47:00 UTC 2019 - Martin Liška <mli...@suse.cz>
+
+- Add binutils.keyring and verify signature.
+
+-------------------------------------------------------------------
+Tue Feb  5 09:17:34 UTC 2019 - Martin Liška <mli...@suse.cz>
+
+- Add disk and RAM (for ppc, ppc64 and ppc64le) constraint with _constraints.
+
+-------------------------------------------------------------------
+Mon Feb  4 14:04:40 UTC 2019 - Martin Liška <mli...@suse.cz>
+
+- Update to binutils 2.32:
+    * The binutils now support for the C-SKY processor series.
+    * The x86 assembler now supports a -mvexwig=[0|1] option to control
+      encoding of VEX.W-ignored (WIG) VEX instructions.
+      It also has a new -mx86-used-note=[yes|no] option to generate (or
+      not) x86 GNU property notes.  
+    * The MIPS assembler now supports the Loongson EXTensions R2 (EXT2),
+      the Loongson EXTensions (EXT) instructions, the Loongson Content
+      Address Memory (CAM) ASE and the Loongson MultiMedia extensions
+      Instructions (MMI) ASE.
+    * The addr2line, c++filt, nm and objdump tools now have a default
+      limit on the maximum amount of recursion that is allowed whilst
+      demangling strings.  This limit can be disabled if necessary.
+    * Objdump's --disassemble option can now take a parameter,
+      specifying the starting symbol for disassembly.  Disassembly will
+      continue from this symbol up to the next symbol or the end of the
+      function.
+    * The BFD linker will now report property change in linker map file
+      when merging GNU properties.
+    * The BFD linker's -t option now doesn't report members within
+      archives, unless -t is given twice.  This makes it more useful
+      when generating a list of files that should be packaged for a
+      linker bug report.
+    * The GOLD linker has improved warning messages for relocations that
+      refer to discarded sections.
+- Remove binutils-2.31-branch.diff.gz, fix-pr23919-1.diff,
+  fix-pr23919-2.diff, fix-pr23919-3.diff,
+  gold-depend-on-opcodes.diff and s390-relro.diff.
+- Refresh binutils-skip-rpaths.patch, s390-biarch.diff, cross-avr-size.patch
+  and binutils-revert-plt32-in-branches.diff.
+
+-------------------------------------------------------------------
+Thu Jan 24 14:10:56 UTC 2019 - m...@suse.com
+
+- Add s390-relro.diff to improve relro support on s390
+  [fate#326356]
+
+-------------------------------------------------------------------
+Thu Dec  6 13:53:51 UTC 2018 - m...@suse.com
+
+- Fix the fix for PR23919 [bsc#1118644]:
+  rename handle-ELF-compressed-header-alignment-correctly-by-.patch
+  to fix-pr23919-1.diff and add fix-pr23919-2.diff
+  and fix-pr23919-3.diff .
+
+-------------------------------------------------------------------
+Tue Nov 27 12:43:42 UTC 2018 - Martin Liška <mli...@suse.cz>
+
+- Add handle-ELF-compressed-header-alignment-correctly-by-.patch:
+  PR23919.
+
+-------------------------------------------------------------------
+Tue Aug 28 14:07:15 UTC 2018 - m...@suse.com
+
+- Update to binutils-2_31-branch @e51abf7e3, minor bugfixes in
+  the support for the X86_ISA_1_* notes.  Adds
+  patch binutils-2.31-branch.diff.gz .
+- Add binutils-revert-plt32-in-branches.diff on anything older
+  than Tumbleweed to not break old tools not expecting
+  PLT32 instead of PC32 relocs on x86_64.
+- Includes fixes for these CVEs:
+  * from 2.30:
+    bnc#1065643 aka CVE-2017-15996 aka PR22361
+    bnc#1065689 aka CVE-2017-15939 aka PR22205
+    bnc#1065693 aka CVE-2017-15938 aka PR22209
+    bnc#1068640 aka CVE-2017-16826 aka PR22376
+    bnc#1068643 aka CVE-2017-16832 aka PR22373
+    bnc#1068887 aka CVE-2017-16831 aka PR22385
+    bnc#1068888 aka CVE-2017-16830 aka PR22384
+    bnc#1068950 aka CVE-2017-16829 aka PR22307
+    bnc#1069176 aka CVE-2017-16828 aka PR22386
+    bnc#1069202 aka CVE-2017-16827 aka PR22306
+  * from 2.31:
+    bnc#1077745 aka CVE-2018-6323  aka PR22746
+    bnc#1079103 aka CVE-2018-6543  aka PR22769
+    bnc#1079741 aka CVE-2018-6759  aka PR22794
+    bnc#1080556 aka CVE-2018-6872  aka PR22788
+    bnc#1081527 aka CVE-2018-7208  aka PR22741
+    bnc#1083528 aka CVE-2018-7570  aka PR22881
+    bnc#1083532 aka CVE-2018-7569  aka PR22895
+    bnc#1086608 aka CVE-2018-8945  aka PR22809
+    bnc#1086784 aka CVE-2018-7643  aka PR22905
+    bnc#1086786 aka CVE-2018-7642  aka PR22887
+    bnc#1086788 aka CVE-2018-7568  aka PR22894
+    bnc#1090997 aka CVE-2018-10373 aka PR23065
+    bnc#1091015 aka CVE-2018-10372 aka PR23064
+    bnc#1091365 aka CVE-2018-10535 aka PR23113
+    bnc#1091368 aka CVE-2018-10534 aka PR23110
+- Removes binutils-fix-pr21964.diff as it's included in 2.31.
+  Rebase testsuite.diff and aarch64-common-pagesize.patch .
+
+-------------------------------------------------------------------
+Tue Jul 31 11:45:27 UTC 2018 - rguent...@suse.com
+
+- Disable -z separate-code everywhere but in Tumbleweed.
+
+-------------------------------------------------------------------
+Mon Jul 16 07:55:51 UTC 2018 - rguent...@suse.com
+
+- Update to binutils 2.31
+  * The AArch64 port now supports showing disassembly notes which are emitted
+    when inconsistencies are found with the instruction that may result in the
+    instruction being invalid.  These can be turned on with the option -M notes
+    to objdump.
+  * The AArch64 port now emits warnings when a combination of an instruction 
and
+    a named register could be invalid.
+  * Added O modifier to ar to display member offsets inside an archive
+  * The ADR and ADRL pseudo-instructions supported by the ARM assembler
+    now only set the bottom bit of the address of thumb function symbols
+    if the -mthumb-interwork command line option is active.
+  * Add --generate-missing-build-notes=[yes|no] option to create (or not) GNU
+    Build Attribute notes if none are present in the input sources.  Add a
+    --enable-generate-build-notes=[yes|no] configure time option to set the
+    default behaviour.  Set the default if the configure option is not used
+    to "no".
+  * Remove -mold-gcc command-line option for x86 targets.
+  * Add -O[2|s] command-line options to x86 assembler to enable alternate
+    shorter instruction encoding.
+  * Add support for .nops directive.  It is currently supported only for
++++ 3301 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:Factory/.binutils.new.7948/cross-xtensa-binutils.changes

Old:
----
  README.First-for.SuSE.packagers

New:
----
  README.First-for.SUSE.packagers
  binutils-2.32-branch.diff.gz
  cross-xtensa-binutils.changes
  cross-xtensa-binutils.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ binutils.spec ++++++
--- /var/tmp/diff_new_pack.kPI0uw/_old  2019-09-23 11:58:29.901993660 +0200
+++ /var/tmp/diff_new_pack.kPI0uw/_new  2019-09-23 11:58:29.905993660 +0200
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
 
@@ -55,13 +55,13 @@
 %if %{run_tests}
 %define        make_check_handling     false
 %endif
-# handle all binary object formats supported by SuSE (and a few more)
+# handle all binary object formats supported by SUSE (and a few more)
 %ifarch %ix86 %arm aarch64 ia64 ppc ppc64 ppc64le s390 s390x x86_64
 %define build_multitarget 1
 %else
 %define build_multitarget 0
 %endif
-%define target_list aarch64 alpha armv5l armv6l armv7l armv8l hppa hppa64 i686 
ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 s390 s390x sh4 sparc 
sparc64 x86_64
+%define target_list aarch64 alpha armv5l armv6l armv7l armv8l hppa hppa64 i686 
ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 s390 s390x sh4 sparc 
sparc64 x86_64 xtensa
 #
 #
 #
@@ -79,8 +79,9 @@
 Source4:        binutils-%{version}.tar.bz2.sig
 Source5:        binutils.keyring
 Source1:        pre_checkin.sh
-Source2:        README.First-for.SuSE.packagers
+Source2:        README.First-for.SUSE.packagers
 Source3:        baselibs.conf
+Patch1:         binutils-2.32-branch.diff.gz
 Patch3:         binutils-skip-rpaths.patch
 Patch4:         s390-biarch.diff
 Patch5:         x86-64-biarch.patch
@@ -152,6 +153,7 @@
 %setup -q -n binutils-%{version}
 # Patch is outside test_vanilla because it's supposed to be the
 # patch bringing the tarball to the newest upstream version
+%patch1 -p1
 %if !%{test_vanilla}
 %patch3
 %patch4
@@ -183,7 +185,10 @@
 
 %build
 sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' 
bfd/version.h
-RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error -ffat-lto-objects"
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
+%if 0%{suse_version} > 1110
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffat-lto-objects"
+%endif
 
 %if 0%{!?cross:1}
 # Building native binutils

++++++ cross-aarch64-binutils.spec ++++++
--- /var/tmp/diff_new_pack.kPI0uw/_old  2019-09-23 11:58:29.937993655 +0200
+++ /var/tmp/diff_new_pack.kPI0uw/_new  2019-09-23 11:58:29.937993655 +0200
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
 
@@ -58,13 +58,13 @@
 %if %{run_tests}
 %define        make_check_handling     false
 %endif
-# handle all binary object formats supported by SuSE (and a few more)
+# handle all binary object formats supported by SUSE (and a few more)
 %ifarch %ix86 %arm aarch64 ia64 ppc ppc64 ppc64le s390 s390x x86_64
 %define build_multitarget 1
 %else
 %define build_multitarget 0
 %endif
-%define target_list aarch64 alpha armv5l armv6l armv7l armv8l hppa hppa64 i686 
ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 s390 s390x sh4 sparc 
sparc64 x86_64
+%define target_list aarch64 alpha armv5l armv6l armv7l armv8l hppa hppa64 i686 
ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 s390 s390x sh4 sparc 
sparc64 x86_64 xtensa
 #
 #
 #
@@ -82,8 +82,9 @@
 Source4:        binutils-%{version}.tar.bz2.sig
 Source5:        binutils.keyring
 Source1:        pre_checkin.sh
-Source2:        README.First-for.SuSE.packagers
+Source2:        README.First-for.SUSE.packagers
 Source3:        baselibs.conf
+Patch1:         binutils-2.32-branch.diff.gz
 Patch3:         binutils-skip-rpaths.patch
 Patch4:         s390-biarch.diff
 Patch5:         x86-64-biarch.patch
@@ -155,6 +156,7 @@
 %setup -q -n binutils-%{version}
 # Patch is outside test_vanilla because it's supposed to be the
 # patch bringing the tarball to the newest upstream version
+%patch1 -p1
 %if !%{test_vanilla}
 %patch3
 %patch4
@@ -186,7 +188,10 @@
 
 %build
 sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' 
bfd/version.h
-RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error -ffat-lto-objects"
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
+%if 0%{suse_version} > 1110
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffat-lto-objects"
+%endif
 
 %if 0%{!?cross:1}
 # Building native binutils

cross-arm-binutils.spec: same change
cross-avr-binutils.spec: same change
cross-epiphany-binutils.spec: same change
cross-hppa-binutils.spec: same change
cross-hppa64-binutils.spec: same change
cross-i386-binutils.spec: same change
cross-ia64-binutils.spec: same change
cross-m68k-binutils.spec: same change
cross-mips-binutils.spec: same change
cross-ppc-binutils.spec: same change
cross-ppc64-binutils.spec: same change
cross-ppc64le-binutils.spec: same change
cross-riscv64-binutils.spec: same change
cross-rx-binutils.spec: same change
cross-s390-binutils.spec: same change
cross-s390x-binutils.spec: same change
cross-sparc-binutils.spec: same change
cross-sparc64-binutils.spec: same change
cross-spu-binutils.spec: same change
cross-x86_64-binutils.spec: same change
++++++ cross-xtensa-binutils.spec ++++++
#
# spec file for package cross-xtensa-binutils
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           cross-xtensa-binutils
ExcludeArch:    xtensa
%define cross 1
%define TARGET xtensa
BuildRequires:  bison
BuildRequires:  dejagnu
BuildRequires:  flex
BuildRequires:  gcc-c++
# for the testsuite
%if 0%{suse_version} >= 1210
BuildRequires:  glibc-devel-static
%endif
%if 0%{suse_version} > 1220
BuildRequires:  makeinfo
%endif
%if 0%{suse_version} > 1110
BuildRequires:  zlib-devel-static
%else
BuildRequires:  zlib-devel
%endif
Version:        2.32
Release:        0
#
# RUN_TESTS
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
# check the vanilla binutils, with no patches applied
# TEST_VANILLA
%define test_vanilla %(test ! -f %_sourcedir/TEST_VANILLA ; echo $?)
#
# handle test suite failures
#
%ifarch alpha %arm aarch64 hppa mips sh4 %sparc
%define make_check_handling     true
%else
# XXX check again
# XXX disabled because gold is seriously broken for now
%define make_check_handling     true
%endif
# let make check fail anyway if RUN_TESTS was requested
%if %{run_tests}
%define make_check_handling     false
%endif
# handle all binary object formats supported by SUSE (and a few more)
%ifarch %ix86 %arm aarch64 ia64 ppc ppc64 ppc64le s390 s390x x86_64
%define build_multitarget 1
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l hppa hppa64 i686 
ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 s390 s390x sh4 sparc 
sparc64 x86_64 xtensa
#
#
#
Url:            http://www.gnu.org/software/binutils/
PreReq:         %{install_info_prereq}
# bug437293
%ifarch ppc64
Obsoletes:      binutils-64bit
%endif
#
Summary:        GNU Binutils
License:        GFDL-1.3-only AND GPL-3.0-or-later
Group:          Development/Tools/Building
Source:         binutils-%{version}.tar.bz2
Source4:        binutils-%{version}.tar.bz2.sig
Source5:        binutils.keyring
Source1:        pre_checkin.sh
Source2:        README.First-for.SUSE.packagers
Source3:        baselibs.conf
Patch1:         binutils-2.32-branch.diff.gz
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
Patch14:        binutils-build-as-needed.diff
Patch22:        binutils-bfd_h.patch
Patch34:        aarch64-common-pagesize.patch
Patch36:        binutils-pr22868.diff
Patch37:        binutils-revert-plt32-in-branches.diff
Patch38:        riscv-abi-check.patch
Patch39:        rx-gas-padding-pr24464.patch
Patch40:        binutils-pr24486.patch
Patch90:        cross-avr-nesc-as.patch
Patch92:        cross-avr-omit_section_dynsym.patch
Patch93:        cross-avr-size.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         update-alternatives

%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.


%package gold
Summary:        The gold linker
License:        GPL-3.0-or-later
Group:          Development/Tools/Building
Requires:       binutils = %{version}-%{release}
PreReq:         update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
%endif

%description gold
gold is an ELF linker.  It is intended to have complete support for ELF
and to run as fast as possible on modern systems.  For normal use it is
a drop-in replacement for the older GNU linker.

%package devel
Summary:        GNU binutils (BFD development files)
License:        GPL-3.0-or-later
Group:          Development/Libraries/C and C++
Requires:       binutils = %{version}-%{release}
Requires:       zlib-devel
Provides:       binutils:/usr/include/bfd.h

%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.


%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
%define HOST %(echo %{_target_cpu} | sed -e "s/parisc/hppa/" -e "s/i.86/i586/" 
-e "s/ppc/powerpc/" -e "s/sparc64v.*/sparc64/" -e 
"s/sparcv.*/sparc/")-suse-linux
%endif
%define DIST %(echo '%distribution' | sed 's/ (.*)//')

%prep
echo "make check will return with %{make_check_handling} in case of testsuite 
failures."
%setup -q -n binutils-%{version}
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
%if !%{test_vanilla}
%patch3
%patch4
%patch5
%patch6
%patch8
%patch9
%patch10
%patch12
%patch14
%patch22
%patch34 -p1
%patch36 -p1
%if %{suse_version} < 1550
%patch37 -p1
%endif
%patch38 -p1
%patch39 -p1
%patch40 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90
%patch92
%patch93
%endif
#
# test_vanilla
%endif

%build
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' 
bfd/version.h
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if 0%{suse_version} > 1110
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffat-lto-objects"
%endif

%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
EXTRA_TARGETS="%(printf ,%%s-suse-linux %target_list)"
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc-macos,powerpc-macos10,spu-elf,x86_64-pep"
%else
EXTRA_TARGETS=
%ifarch sparc
EXTRA_TARGETS="$EXTRA_TARGETS,sparc64-suse-linux"
%endif
%ifarch ppc
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc64-suse-linux"
%endif
%ifarch s390
EXTRA_TARGETS="$EXTRA_TARGETS,s390x-suse-linux"
%endif
%ifarch s390x
EXTRA_TARGETS="$EXTRA_TARGETS,s390-suse-linux"
%endif
%ifarch %ix86
EXTRA_TARGETS="$EXTRA_TARGETS,x86_64-suse-linux"
%endif
%ifarch ppc ppc64 ppc64le
EXTRA_TARGETS="$EXTRA_TARGETS,spu-elf"
%endif
%ifarch %arm
EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%endif
%ifarch aarch64
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%endif
# Normally we'd like to add --enable-deterministic-archives
# here (which by default makes uid/mtime be zero for archive
# members), to increase chances of getting a reproducable build
# But this breaks Makefile rules when directly accessing archives:
# rebuilding the same archive from unchanged .o files recreates
# it, because timestamps in the .a are 0, unequal to the actual timestamp
# of the .o files :-/
%define common_flags CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" \\\
        --prefix=%{_prefix} --libdir=%{_libdir} \\\
        --infodir=%{_infodir} --mandir=%{_mandir} \\\
        --with-bugurl=http://bugs.opensuse.org/ \\\
        --with-pkgversion="GNU Binutils; %{DIST}" \\\
        --with-separate-debug-dir=%{_prefix}/lib/debug \\\
        --with-pic --with-system-zlib --build=%{HOST}
mkdir build-dir
cd build-dir
../configure %common_flags \
        ${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
        --enable-plugins \
%ifarch %gold_archs
        --enable-gold \
        --enable-threads \
%endif
%if %{suse_version} <= 1320
        --disable-x86-relax-relocations \
        --disable-compressed-debug-sections \
%endif
%if %{suse_version} > 1320
        --enable-compressed-debug-sections=gas \
%endif
%if %{suse_version} < 1550
        --disable-separate-code \
%endif
        --enable-new-dtags \
%if "%{TARGET}" != "mips"
        --enable-default-hash-style=both \
%endif
        --enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}

%else
# building cross-TARGET-binutils
echo "Building cross binutils."
mkdir build-dir
cd build-dir
EXTRA_TARGETS=
%if "%{TARGET}" == "sparc"
EXTRA_TARGETS="$EXTRA_TARGETS,sparc64-suse-linux"
%endif
%if "%{TARGET}" == "powerpc"
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc64-suse-linux"
%endif
%if "%{TARGET}" == "s390"
EXTRA_TARGETS="$EXTRA_TARGETS,s390x-suse-linux"
%endif
%if "%{TARGET}" == "s390x"
EXTRA_TARGETS="$EXTRA_TARGETS,s390-suse-linux"
%endif
%if "%{TARGET}" == "i586"
EXTRA_TARGETS="$EXTRA_TARGETS,x86_64-suse-linux"
%endif
%if "%{TARGET}" == "hppa"
EXTRA_TARGETS="$EXTRA_TARGETS,hppa64-suse-linux"
%endif
%if "%{TARGET}" == "arm"
EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%endif
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
%define TARGET_OS %{TARGET}-elf
%else
%if "%{TARGET}" == "arm"
%define TARGET_OS %{TARGET}-suse-linux-gnueabi
%else
%define TARGET_OS %{TARGET}-suse-linux
%endif
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
  --prefix=%{_prefix} \
  --with-bugurl=http://bugs.opensuse.org/ \
  --with-pkgversion="GNU Binutils; %{DIST}" \
  --with-system-zlib \
  --disable-nls \
  --enable-new-dtags \
%if %{suse_version} <= 1320
  --disable-x86-relax-relocations \
%endif
  --build=%{HOST} --target=%{TARGET_OS} \
%if "%{TARGET}" == "spu"
  --with-sysroot=/usr/spu \
%else
  --with-sysroot=%{_prefix}/%{TARGET_OS}/sys-root \
%endif
%if "%{TARGET}" != "mips"
  --enable-default-hash-style=both \
%endif
  ${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif

%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif

%install
cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
  mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
  rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} 
$RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include 
DESTDIR=$RPM_BUILD_ROOT
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* 
$RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 
$RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
%find_lang gas binutils.lang
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
   ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
  for p in arm-none-eabi; do
    ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
  done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
  for p in riscv64-elf; do
    ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
  done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as 
$RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif

%if 0%{!?cross:1}
%post
/sbin/ldconfig
"%_sbindir/update-alternatives" --install \
        "%_bindir/ld" ld "%_bindir/ld.bfd" 2
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz

%post gold
"%_sbindir/update-alternatives" --install \
        "%_bindir/ld" ld "%_bindir/ld.gold" 1

%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
if [ "$1" = 0 ]; then
        "%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;

%preun gold
if [ "$1" = 0 ]; then
        "%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;

%postun
/sbin/ldconfig
%endif

%files -f binutils.lang
%defattr(-,root,root)
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%{_prefix}/%{TARGET_OS}
%{_prefix}/bin/*
%endif

%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif

%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif

%changelog
++++++ README.First-for.SUSE.packagers ++++++
IMPORTANT: Please change binutils.spec and then run ./pre_checkin.sh!
Do not change cross-*.spec directly!

The spec file triggers by it's %name if it compiles the native or the
cross version and pre_checkin.sh (called automatically by checkin too)
copies over the binutils.spec and changes the Name field, so you shouldn't
need to worry too much about the cross packages

Updating to some branch head:
> cvs -z 9 -d :pserver:anoncvs@stravinsky:/cvs/src export -r 
> binutils-2_23-branch binutils

Thanks,
Stephan Kulow

++++++ binutils-2.32-branch.diff.gz ++++++
++++ 27587 lines (skipped)


++++++ binutils-revert-plt32-in-branches.diff ++++++
--- /var/tmp/diff_new_pack.kPI0uw/_old  2019-09-23 11:58:30.621993542 +0200
+++ /var/tmp/diff_new_pack.kPI0uw/_new  2019-09-23 11:58:30.621993542 +0200
@@ -3,6 +3,10 @@
 update several packages/tools that can't handle them.  I.e.
 a compatibility patch.
 
+The patch isn't exactly the reverse of commit bd7ab16b
+because commit 83924b38 later moved the checking code
+around somewhat.
+
 The changes in nop-[345].d and pr22842b.S are followups to
 not break the testsuite because of this revert.
 
@@ -74,12 +78,12 @@
        * testsuite/ld-x86-64/pr22791-2c.s: Likewise.
        * testsuite/ld-x86-64/x86-64.exp: Run PR ld/22791 tests.
 
-diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
-index c7d8bca710..033907d7e4 100644
---- a/bfd/elf64-x86-64.c
-+++ b/bfd/elf64-x86-64.c
-@@ -2359,6 +2359,24 @@ elf_x86_64_tpoff (struct bfd_link_info *info, bfd_vma 
address)
-   return address - static_tls_size - htab->tls_sec->vma;
+Index: binutils-2.32/bfd/elf64-x86-64.c
+===================================================================
+--- binutils-2.32.orig/bfd/elf64-x86-64.c      2019-09-09 18:29:44.000000000 
+0200
++++ binutils-2.32/bfd/elf64-x86-64.c   2019-09-09 18:31:48.000000000 +0200
+@@ -1789,6 +1789,24 @@ rewrite_modrm_rex:
+   return TRUE;
  }
  
 +/* Is the instruction before OFFSET in CONTENTS a 32bit relative
@@ -100,68 +104,64 @@
 +            && (contents [offset - 1] & 0xf0) == 0x80));
 +}
 +
- /* Relocate an x86_64 ELF section.  */
- 
- static bfd_boolean
-@@ -3066,18 +3084,14 @@ use_plt:
-       case R_X86_64_PC32:
-       case R_X86_64_PC32_BND:
-         /* Don't complain about -fPIC if the symbol is undefined when
--           building executable unless it is unresolved weak symbol,
--           references a dynamic definition in PIE or -z nocopyreloc
--           is used.  */
-+           building executable unless it is unresolved weak symbol or
-+           -z nocopyreloc is used.  */
-         if ((input_section->flags & SEC_ALLOC) != 0
-             && (input_section->flags & SEC_READONLY) != 0
-             && h != NULL
-             && ((bfd_link_executable (info)
-                  && ((h->root.type == bfd_link_hash_undefweak
-                       && !resolved_to_zero)
--                     || (bfd_link_pie (info)
--                         && !h->def_regular
--                         && h->def_dynamic)
-                      || ((info->nocopyreloc
-                           || (eh->def_protected
-                               && elf_has_no_copy_on_protected 
(h->root.u.def.section->owner)))
-@@ -3086,21 +3100,26 @@ use_plt:
-                 || bfd_link_dll (info)))
-           {
-             bfd_boolean fail = FALSE;
-+            bfd_boolean branch
-+              = ((r_type == R_X86_64_PC32
-+                  || r_type == R_X86_64_PC32_BND)
-+                 && is_32bit_relative_branch (contents, rel->r_offset));
-+
-             if (SYMBOL_REFERENCES_LOCAL_P (info, h))
-               {
-                 /* Symbol is referenced locally.  Make sure it is
--                   defined locally.  */
--                fail = !(h->def_regular || ELF_COMMON_DEF_P (h));
-+                   defined locally or for a branch.  */
-+                fail = (!(h->def_regular || ELF_COMMON_DEF_P (h))
-+                        && !branch);
-               }
-             else if (!(bfd_link_pie (info)
-                        && (h->needs_copy || eh->needs_copy)))
+ /* Look through the relocs for a section during the first phase, and
+    calculate needed space in the global offset table, procedure
+    linkage table, and dynamic reloc sections.  */
+@@ -2248,28 +2266,30 @@ check_pic:
+                           && (eh == NULL
+                               || !UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+                                                                    eh)))
+-                         || (bfd_link_pie (info)
+-                             && !SYMBOL_DEFINED_NON_SHARED_P (h)
+-                             && h->def_dynamic)
+                          || (no_copyreloc_p
+                              && h->def_dynamic
+                              && !(h->root.u.def.section->flags & SEC_CODE))))
+                     || bfd_link_dll (info)))
                {
-                 /* Symbol doesn't need copy reloc and isn't referenced
--                   locally.  Address of protected function may not be
--                   reachable at run-time.  */
--                fail = (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
--                        || (ELF_ST_VISIBILITY (h->other) == STV_PROTECTED
--                            && h->type == STT_FUNC));
-+                   locally.  We only allow branch to symbol with
-+                   non-default visibility. */
-+                fail = (!branch
-+                        || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT);
-               }
- 
-             if (fail)
-diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
-index d31ee6abdd..d6f53df335 100644
---- a/gas/config/tc-i386.c
-+++ b/gas/config/tc-i386.c
+                 bfd_boolean fail = FALSE;
++                bfd_boolean branch
++                  = ((r_type == R_X86_64_PC32
++                      || r_type == R_X86_64_PC32_BND)
++                     && is_32bit_relative_branch (contents, rel->r_offset));
++
+                 if (SYMBOL_REFERENCES_LOCAL_P (info, h))
+                   {
+                     /* Symbol is referenced locally.  Make sure it is
+-                       defined locally.  */
+-                    fail = !SYMBOL_DEFINED_NON_SHARED_P (h);
++                       defined locally or for a branch.  */
++                    fail = !SYMBOL_DEFINED_NON_SHARED_P (h) && !branch;
+                   }
+                 else if (bfd_link_pie (info))
+                   {
+                     /* We can only use PC-relative relocations in PIE
+-                       from non-code sections.  */
++                       from non-code sections or branches.  */
+                     if (h->type == STT_FUNC
+                         && (sec->flags & SEC_CODE) != 0)
+-                      fail = TRUE;
++                      fail = !branch;
+                   }
+                 else if (no_copyreloc_p || bfd_link_dll (info))
+                   {
+@@ -2278,9 +2298,10 @@ check_pic:
+                        relocations against default and protected
+                        symbols since address of protected function
+                        and location of protected data may not be in
+-                       the shared object.   */
++                       the shared object.  We do allow branch to symbol
++                       with non-default visibility.  */
+                     fail = (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+-                            || ELF_ST_VISIBILITY (h->other) == STV_PROTECTED);
++                            || !branch);
+                   }
+ 
+                 if (fail)
+Index: binutils-2.32/gas/config/tc-i386.c
+===================================================================
+--- binutils-2.32.orig/gas/config/tc-i386.c    2019-01-19 17:01:33.000000000 
+0100
++++ binutils-2.32/gas/config/tc-i386.c 2019-09-09 18:29:44.000000000 +0200
 @@ -7690,46 +7690,12 @@ output_branch (void)
    frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p);
  }
@@ -228,7 +228,7 @@
  
    /* All jumps handled here are signed, but don't use a signed limit
       check for 32 and 16 bit jumps as we want to allow wrap around at
-@@ -10236,10 +10193,6 @@ md_estimate_size_before_relax (fragS *fragP, segT 
segment)
+@@ -10236,10 +10193,6 @@ md_estimate_size_before_relax (fragS *fr
        reloc_type = (enum bfd_reloc_code_real) fragP->fr_var;
        else if (size == 2)
        reloc_type = BFD_RELOC_16_PCREL;
@@ -239,10 +239,10 @@
        else
        reloc_type = BFD_RELOC_32_PCREL;
  
-diff --git a/gas/testsuite/gas/i386/ilp32/reloc64.d 
b/gas/testsuite/gas/i386/ilp32/reloc64.d
-index 5865ab0ae1..824c771f2b 100644
---- a/gas/testsuite/gas/i386/ilp32/reloc64.d
-+++ b/gas/testsuite/gas/i386/ilp32/reloc64.d
+Index: binutils-2.32/gas/testsuite/gas/i386/ilp32/reloc64.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/ilp32/reloc64.d  2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/ilp32/reloc64.d       2019-09-09 
18:29:44.000000000 +0200
 @@ -17,7 +17,7 @@ Disassembly of section \.text:
  .*[   ]+R_X86_64_PC8[         ]+xtrn\+0x0*1
  .*[   ]+R_X86_64_PC32[        ]+xtrn-0x0*4
@@ -252,10 +252,10 @@
  .*[   ]+R_X86_64_PC8[         ]+xtrn-0x0*1
  .*[   ]+R_X86_64_GOT32[       ]+xtrn
  .*[   ]+R_X86_64_GOT32[       ]+xtrn
-diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d 
b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
-index 45ab6178b9..915dbf3f1c 100644
---- a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
-+++ b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
+Index: binutils-2.32/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/ilp32/x86-64-branch.d    
2019-01-19 17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/ilp32/x86-64-branch.d 2019-09-09 
18:29:44.000000000 +0200
 @@ -20,9 +20,9 @@ Disassembly of section .text:
  [     ]*[a-f0-9]+:    66 ff 20                data16 jmpq \*\(%rax\)
  [     ]*[a-f0-9]+:    e8 00 00 00 00          callq  0x1f     1b: 
R_X86_64_PC32       \*ABS\*\+0x10003c
@@ -269,10 +269,10 @@
  [     ]*[a-f0-9]+:    ff d0                   callq  \*%rax
  [     ]*[a-f0-9]+:    ff d0                   callq  \*%rax
  [     ]*[a-f0-9]+:    66 ff d0                data16 callq \*%rax
-diff --git a/gas/testsuite/gas/i386/reloc64.d 
b/gas/testsuite/gas/i386/reloc64.d
-index 59e02b4800..77252c1ad2 100644
---- a/gas/testsuite/gas/i386/reloc64.d
-+++ b/gas/testsuite/gas/i386/reloc64.d
+Index: binutils-2.32/gas/testsuite/gas/i386/reloc64.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/reloc64.d        2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/reloc64.d     2019-09-09 
18:29:44.000000000 +0200
 @@ -19,7 +19,7 @@ Disassembly of section \.text:
  .*[   ]+R_X86_64_PC8[         ]+xtrn\+0x0*1
  .*[   ]+R_X86_64_PC32[        ]+xtrn-0x0*4
@@ -282,10 +282,10 @@
  .*[   ]+R_X86_64_PC8[         ]+xtrn-0x0*1
  .*[   ]+R_X86_64_GOT64[       ]+xtrn
  .*[   ]+R_X86_64_GOT32[       ]+xtrn
-diff --git a/gas/testsuite/gas/i386/x86-64-jump.d 
b/gas/testsuite/gas/i386/x86-64-jump.d
-index 9f7b4b4848..edb34e6aa8 100644
---- a/gas/testsuite/gas/i386/x86-64-jump.d
-+++ b/gas/testsuite/gas/i386/x86-64-jump.d
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-jump.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-jump.d    2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-jump.d 2019-09-09 
18:29:44.000000000 +0200
 @@ -8,7 +8,7 @@ Disassembly of section .text:
  
  0+ <.text>:
@@ -304,10 +304,10 @@
  [     ]*[a-f0-9]+:    ff 14 25 00 00 00 00    callq  \*0x0    3d: 
R_X86_64_32S        xxx
  [     ]*[a-f0-9]+:    ff d7                   callq  \*%rdi
  [     ]*[a-f0-9]+:    ff 17                   callq  \*\(%rdi\)
-diff --git a/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d 
b/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
-index d44841e745..c07002911c 100644
---- a/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
-+++ b/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d    
2019-01-19 17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d 2019-09-09 
18:29:44.000000000 +0200
 @@ -20,9 +20,9 @@ Disassembly of section .text:
  [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 24 <foo2>
  
@@ -321,10 +321,10 @@
  [     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 3d <foo2\+0x19>        
39: R_X86_64_PLT32      foo-0x4
  [     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 44 <foo2\+0x20>  40: 
R_X86_64_PLT32      foo-0x4
  [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 4a <foo2\+0x26>       
46: R_X86_64_PLT32      foo-0x4
-diff --git a/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d 
b/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d
-index 514c34363e..5bb6a57c1e 100644
---- a/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d
-+++ b/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d    
2019-01-19 17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-mpx-branch-2.d 2019-09-09 
18:29:44.000000000 +0200
 @@ -20,9 +20,9 @@ Disassembly of section .text:
  [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 24 <foo2>
  
@@ -338,10 +338,10 @@
  [     ]*[a-f0-9]+:    f2 e9 00 00 00 00       bnd jmpq 3d <foo2\+0x19>        
39: R_X86_64_PLT32      foo-0x4
  [     ]*[a-f0-9]+:    f2 0f 82 00 00 00 00    bnd jb 44 <foo2\+0x20>  40: 
R_X86_64_PLT32      foo-0x4
  [     ]*[a-f0-9]+:    f2 e8 00 00 00 00       bnd callq 4a <foo2\+0x26>       
46: R_X86_64_PLT32      foo-0x4
-diff --git a/gas/testsuite/gas/i386/x86-64-nop-3.d 
b/gas/testsuite/gas/i386/x86-64-nop-3.d
-index 1dc9505b4f..19c450eb9f 100644
---- a/gas/testsuite/gas/i386/x86-64-nop-3.d
-+++ b/gas/testsuite/gas/i386/x86-64-nop-3.d
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-3.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-nop-3.d   2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-3.d        2019-09-09 
18:29:44.000000000 +0200
 @@ -17,5 +17,5 @@ Disassembly of section .text:
  Disassembly of section .altinstr_replacement:
  
@@ -349,32 +349,32 @@
 - +[a-f0-9]+:  e9 00 00 00 00          jmpq   5 <_start\+0x5>  1: 
R_X86_64_PLT32       foo-0x4
 + +[a-f0-9]+:  e9 00 00 00 00          jmpq   5 <_start\+0x5>  1: 
R_X86_64_PC32        foo-0x4
  #pass
-diff --git a/gas/testsuite/gas/i386/x86-64-nop-4.d 
b/gas/testsuite/gas/i386/x86-64-nop-4.d
-index 25927ca222..0fc7da7422 100644
---- a/gas/testsuite/gas/i386/x86-64-nop-4.d
-+++ b/gas/testsuite/gas/i386/x86-64-nop-4.d
-@@ -20,5 +20,5 @@ Disassembly of section .altinstr_replacement:
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-4.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-nop-4.d   2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-4.d        2019-09-09 
18:29:44.000000000 +0200
+@@ -20,5 +20,5 @@ Disassembly of section .altinstr_replace
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
 - +[a-f0-9]+:  e9 00 00 00 00          jmpq   b <_start\+0xb>  7: 
R_X86_64_PLT32       foo-0x4
 + +[a-f0-9]+:  e9 00 00 00 00          jmpq   b <_start\+0xb>  7: 
R_X86_64_PC32        foo-0x4
  #pass
-diff --git a/gas/testsuite/gas/i386/x86-64-nop-5.d 
b/gas/testsuite/gas/i386/x86-64-nop-5.d
-index 6036be30d3..45fb4e5f9b 100644
---- a/gas/testsuite/gas/i386/x86-64-nop-5.d
-+++ b/gas/testsuite/gas/i386/x86-64-nop-5.d
-@@ -23,5 +23,5 @@ Disassembly of section .altinstr_replacement:
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-5.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-nop-5.d   2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-nop-5.d        2019-09-09 
18:29:44.000000000 +0200
+@@ -23,5 +23,5 @@ Disassembly of section .altinstr_replace
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
   +[a-f0-9]+:  89 c0                   mov    %eax,%eax
 - +[a-f0-9]+:  e9 00 00 00 00          jmpq   d <_start\+0xd>  9: 
R_X86_64_PLT32       foo-0x4
 + +[a-f0-9]+:  e9 00 00 00 00          jmpq   d <_start\+0xd>  9: 
R_X86_64_PC32        foo-0x4
  #pass
-diff --git a/gas/testsuite/gas/i386/x86-64-relax-2.d 
b/gas/testsuite/gas/i386/x86-64-relax-2.d
-index c9eba8452a..c124102982 100644
---- a/gas/testsuite/gas/i386/x86-64-relax-2.d
-+++ b/gas/testsuite/gas/i386/x86-64-relax-2.d
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-2.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-relax-2.d 2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-2.d      2019-09-09 
18:29:44.000000000 +0200
 @@ -10,12 +10,12 @@ Disassembly of section .text:
  0+ <foo>:
  [     ]*[a-f0-9]+:    eb 24                   jmp    26 <local>
@@ -393,10 +393,10 @@
  
  0+22 <hidden_def>:
  [     ]*[a-f0-9]+:    c3                      retq   
-diff --git a/gas/testsuite/gas/i386/x86-64-relax-3.d 
b/gas/testsuite/gas/i386/x86-64-relax-3.d
-index 28ab5dd3f7..98fd28dd11 100644
---- a/gas/testsuite/gas/i386/x86-64-relax-3.d
-+++ b/gas/testsuite/gas/i386/x86-64-relax-3.d
+Index: binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-3.d
+===================================================================
+--- binutils-2.32.orig/gas/testsuite/gas/i386/x86-64-relax-3.d 2019-01-19 
17:01:33.000000000 +0100
++++ binutils-2.32/gas/testsuite/gas/i386/x86-64-relax-3.d      2019-09-09 
18:29:44.000000000 +0200
 @@ -11,10 +11,10 @@ Disassembly of section .text:
  [     ]*[a-f0-9]+:    eb 1b                   jmp    1f <hidden_def>
  [     ]*[a-f0-9]+:    eb 1b                   jmp    21 <global_def>
@@ -412,38 +412,35 @@
  
  0+1f <hidden_def>:
  [     ]*[a-f0-9]+:    c3                      retq   
-diff --git a/ld/testsuite/ld-x86-64/mpx1c.rd b/ld/testsuite/ld-x86-64/mpx1c.rd
-index d66524c883..d3b292cbdc 100644
---- a/ld/testsuite/ld-x86-64/mpx1c.rd
-+++ b/ld/testsuite/ld-x86-64/mpx1c.rd
+Index: binutils-2.32/ld/testsuite/ld-x86-64/mpx1c.rd
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/mpx1c.rd 2019-01-19 
17:01:34.000000000 +0100
++++ binutils-2.32/ld/testsuite/ld-x86-64/mpx1c.rd      2019-09-09 
18:29:44.000000000 +0200
 @@ -1,3 +1,3 @@
  #...
 -[0-9a-f ]+R_X86_64_PLT32 +0+ +.*
 +[0-9a-f ]+R_X86_64_PC32 +0+ +.*
  #...
-diff --git a/ld/testsuite/ld-x86-64/pr22791-1.err 
b/ld/testsuite/ld-x86-64/pr22791-1.err
-deleted file mode 100644
-index 5500fa55ce..0000000000
---- a/ld/testsuite/ld-x86-64/pr22791-1.err
-+++ /dev/null
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-1.err
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-1.err    2019-01-19 
17:01:34.000000000 +0100
++++ /dev/null  1970-01-01 00:00:00.000000000 +0000
 @@ -1,2 +0,0 @@
 -.*relocation R_X86_64_PC32 against symbol `foo' can not be used when making a 
PIE object; recompile with -fPIC
 -#...
-diff --git a/ld/testsuite/ld-x86-64/pr22791-1a.c 
b/ld/testsuite/ld-x86-64/pr22791-1a.c
-deleted file mode 100644
-index cd0130cacd..0000000000
---- a/ld/testsuite/ld-x86-64/pr22791-1a.c
-+++ /dev/null
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-1a.c
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-1a.c     2019-01-19 
17:01:34.000000000 +0100
++++ /dev/null  1970-01-01 00:00:00.000000000 +0000
 @@ -1,4 +0,0 @@
 -void
 -foo (void)
 -{
 -}
-diff --git a/ld/testsuite/ld-x86-64/pr22791-1b.s 
b/ld/testsuite/ld-x86-64/pr22791-1b.s
-deleted file mode 100644
-index 9751db49aa..0000000000
---- a/ld/testsuite/ld-x86-64/pr22791-1b.s
-+++ /dev/null
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-1b.s
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-1b.s     2019-01-19 
17:01:34.000000000 +0100
++++ /dev/null  1970-01-01 00:00:00.000000000 +0000
 @@ -1,6 +0,0 @@
 -      .text
 -      .globl  main
@@ -451,11 +448,10 @@
 -main:
 -      movl    foo(%rip), %eax
 -      .size   main, .-main
-diff --git a/ld/testsuite/ld-x86-64/pr22791-2.rd 
b/ld/testsuite/ld-x86-64/pr22791-2.rd
-deleted file mode 100644
-index 70deb30d84..0000000000
---- a/ld/testsuite/ld-x86-64/pr22791-2.rd
-+++ /dev/null
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2.rd
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2.rd     2019-01-19 
17:01:34.000000000 +0100
++++ /dev/null  1970-01-01 00:00:00.000000000 +0000
 @@ -1,6 +0,0 @@
 -#failif
 -#...
@@ -463,11 +459,10 @@
 -#...
 -[0-9a-f ]+R_X86_64_NONE.*
 -#...
-diff --git a/ld/testsuite/ld-x86-64/pr22791-2a.s 
b/ld/testsuite/ld-x86-64/pr22791-2a.s
-deleted file mode 100644
-index 0a855024d7..0000000000
---- a/ld/testsuite/ld-x86-64/pr22791-2a.s
-+++ /dev/null
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2a.s
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2a.s     2019-01-19 
17:01:34.000000000 +0100
++++ /dev/null  1970-01-01 00:00:00.000000000 +0000
 @@ -1,8 +0,0 @@
 -      .text
 -      .p2align 4,,15
@@ -477,11 +472,10 @@
 -      jmp     bar
 -      .size   foo, .-foo
 -      .section        .note.GNU-stack,"",@progbits
-diff --git a/ld/testsuite/ld-x86-64/pr22791-2b.c 
b/ld/testsuite/ld-x86-64/pr22791-2b.c
-deleted file mode 100644
-index 79ef27c085..0000000000
---- a/ld/testsuite/ld-x86-64/pr22791-2b.c
-+++ /dev/null
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2b.c
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2b.c     2019-01-19 
17:01:34.000000000 +0100
++++ /dev/null  1970-01-01 00:00:00.000000000 +0000
 @@ -1,7 +0,0 @@
 -#include <stdio.h>
 -
@@ -490,11 +484,10 @@
 -{
 -  puts ("PASS");
 -}
-diff --git a/ld/testsuite/ld-x86-64/pr22791-2c.s 
b/ld/testsuite/ld-x86-64/pr22791-2c.s
-deleted file mode 100644
-index 1460d1b828..0000000000
---- a/ld/testsuite/ld-x86-64/pr22791-2c.s
-+++ /dev/null
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22791-2c.s
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22791-2c.s     2019-01-19 
17:01:34.000000000 +0100
++++ /dev/null  1970-01-01 00:00:00.000000000 +0000
 @@ -1,12 +0,0 @@
 -      .text
 -      .p2align 4,,15
@@ -508,10 +501,10 @@
 -      ret
 -      .size   main, .-main
 -      .section        .note.GNU-stack,"",@progbits
-diff --git a/ld/testsuite/ld-x86-64/pr22842b.S 
b/ld/testsuite/ld-x86-64/pr22842b.S
-index f0659cd901..b9dd81345b 100644
---- a/ld/testsuite/ld-x86-64/pr22842b.S
-+++ b/ld/testsuite/ld-x86-64/pr22842b.S
+Index: binutils-2.32/ld/testsuite/ld-x86-64/pr22842b.S
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/pr22842b.S       2019-01-19 
17:01:34.000000000 +0100
++++ binutils-2.32/ld/testsuite/ld-x86-64/pr22842b.S    2019-09-09 
18:29:44.000000000 +0200
 @@ -7,7 +7,7 @@ main:
          leaq    bar(%rip), %rdi
        addq    %rax, %rdi
@@ -521,15 +514,14 @@
        xorl    %eax, %eax
        popq    %rcx
        retq
-diff --git a/ld/testsuite/ld-x86-64/x86-64.exp 
b/ld/testsuite/ld-x86-64/x86-64.exp
-index 86b163fc7a..8cfe7c918a 100644
---- a/ld/testsuite/ld-x86-64/x86-64.exp
-+++ b/ld/testsuite/ld-x86-64/x86-64.exp
-@@ -1197,44 +1197,6 @@ if { [isnative] && [which $CC] != 0 } {
-            {readelf -lW pr22393-3b.rd}} \
+Index: binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp
+===================================================================
+--- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp       2019-09-09 
18:29:44.000000000 +0200
++++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp    2019-09-09 
18:29:44.000000000 +0200
+@@ -1208,44 +1208,6 @@ if { [isnative] && [which $CC] != 0 } {
            "pr22393-3-static" \
        ] \
--      [list \
+       [list \
 -          "Build pr22791-1.so" \
 -          "-shared" \
 -          "-fPIC -Wa,-mx86-used-note=yes" \
@@ -567,14 +559,14 @@
 -          {{readelf -drW pr22791-2.rd}} \
 -          "pr22791-2" \
 -      ] \
-       [list \
+-      [list \
            "Build pr22842.so" \
            "-shared" \
-@@ -1577,15 +1539,6 @@ if { [isnative] && [which $CC] != 0 } {
-           "pr22393-3-static" \
+           "-fPIC -Wa,-mx86-used-note=yes" \
+@@ -1588,15 +1550,6 @@ if { [isnative] && [which $CC] != 0 } {
            "pass.out" \
        ] \
--      [list \
+       [list \
 -          "Run pr22791-2" \
 -          "-pie -Wl,--no-as-needed tmpdir/pr22791-2.so" \
 -          "-Wa,-mx86-used-note=yes" \
@@ -583,6 +575,7 @@
 -          "pass.out" \
 -          "$NOPIE_CFLAGS" \
 -      ] \
-       [list \
+-      [list \
            "Run pr22842" \
            "-pie -Wl,--no-as-needed tmpdir/pr22842.so" \
+           "-Wa,-mx86-used-note=yes" \


++++++ pre_checkin.sh ++++++
--- /var/tmp/diff_new_pack.kPI0uw/_old  2019-09-23 11:58:30.693993530 +0200
+++ /var/tmp/diff_new_pack.kPI0uw/_new  2019-09-23 11:58:30.693993530 +0200
@@ -5,7 +5,7 @@
 rm -f cross-*-binutils.spec cross-*-binutils.changes
 
 # sh4 is stuck in the testsuite
-for arch in aarch64 hppa hppa64 arm i386 x86_64 s390 s390x ppc ppc64 ppc64le 
ia64 sparc sparc64 spu avr mips m68k epiphany rx riscv64; do
+for arch in aarch64 hppa hppa64 arm i386 x86_64 s390 s390x ppc ppc64 ppc64le 
ia64 sparc sparc64 spu avr mips m68k epiphany rx riscv64 xtensa; do
 
    echo -n "Building package for $arch --> cross-$arch-binutils ..."
 

++++++ s390-biarch.diff ++++++
--- /var/tmp/diff_new_pack.kPI0uw/_old  2019-09-23 11:58:30.709993527 +0200
+++ /var/tmp/diff_new_pack.kPI0uw/_new  2019-09-23 11:58:30.709993527 +0200
@@ -1,10 +1,10 @@
-diff --git a/ld/emulparams/elf_s390.sh b/ld/emulparams/elf_s390.sh
-index 39c746c866..6e25a01e70 100644
---- ld/emulparams/elf_s390.sh
-+++ ld/emulparams/elf_s390.sh
-@@ -13,3 +13,18 @@ GENERATE_PIE_SCRIPT=yes
+Index: ld/emulparams/elf_s390.sh
+===================================================================
+--- ld/emulparams/elf_s390.sh.orig     2019-09-09 18:48:59.000000000 +0200
++++ ld/emulparams/elf_s390.sh  2019-09-09 18:49:02.000000000 +0200
+@@ -12,3 +12,18 @@ GENERATE_SHLIB_SCRIPT=yes
+ GENERATE_PIE_SCRIPT=yes
  NO_SMALL_DATA=yes
- SEPARATE_GOTPLT=12
  IREL_IN_PLT=
 +
 +# Treat a host that matches the target with the possible exception of "x"


Reply via email to