|
@@ -3,15 +3,39 @@
|
|
# --without testsuite: Do not run the testsuite. Default is to run it.
|
|
# --without testsuite: Do not run the testsuite. Default is to run it.
|
|
# --with testsuite: Run the testsuite. Default --with debug is not to run it.
|
|
# --with testsuite: Run the testsuite. Default --with debug is not to run it.
|
|
|
|
|
|
|
|
+# Enable support for GCC LTO compilation.
|
|
|
|
+%define enable_lto 1
|
|
|
|
+
|
|
|
|
+# Disable the default generation of compressed debug sections.
|
|
|
|
+%define default_compress_debug 0
|
|
|
|
+
|
|
|
|
+# Default to read-only-relocations (relro) in shared binaries.
|
|
|
|
+%define default_relro 1
|
|
|
|
+
|
|
|
|
+# Disable the default generation of GNU Build notes by the assembler.
|
|
|
|
+# This has turned out to be problematic for the i686 architecture.
|
|
|
|
+# although the exact reason has not been determined. (See BZ 1572485)
|
|
|
|
+# It also breaks building EFI binaries on AArch64, as these cannot have
|
|
|
|
+# relocations against absolute symbols.
|
|
|
|
+%define default_generate_notes 0
|
|
|
|
+
|
|
|
|
+# Enable thread support in the GOLD linker. This is particularly
|
|
|
|
+# important if plugins to the linker intend to use threads themselves.
|
|
|
|
+# See BZ 1636479 for more details. This option is made configurable
|
|
|
|
+# in case there is ever a need to disable thread support.
|
|
|
|
+%define enable_threading 1
|
|
|
|
+
|
|
%define binutils_target %{_target_platform}
|
|
%define binutils_target %{_target_platform}
|
|
%define isnative 1
|
|
%define isnative 1
|
|
%define enable_shared 1
|
|
%define enable_shared 1
|
|
|
|
|
|
|
|
+%bcond_without docs
|
|
|
|
+
|
|
Summary: A GNU collection of binary utilities.
|
|
Summary: A GNU collection of binary utilities.
|
|
Summary(ja): GNU 版バイナリユーティリティ集
|
|
Summary(ja): GNU 版バイナリユーティリティ集
|
|
Name: binutils
|
|
Name: binutils
|
|
-Version: 2.26
|
|
+Version: 2.31.1
|
|
-Release: 4%{?_dist_release}
|
|
+Release: 1%{?_dist_release}
|
|
License: GPLv3+
|
|
License: GPLv3+
|
|
Group: Development/Tools
|
|
Group: Development/Tools
|
|
URL: http://sources.redhat.com/binutils
|
|
URL: http://sources.redhat.com/binutils
|
|
@@ -24,15 +48,145 @@ Packager: kenta, shaolin, inagaki
|
|
# The ftp.kernel.org/pub/linux/devel/binutils/ page is (temporarily) unavailable
|
|
# The ftp.kernel.org/pub/linux/devel/binutils/ page is (temporarily) unavailable
|
|
# so we use the GNU site instead.
|
|
# so we use the GNU site instead.
|
|
# Source: ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
|
|
# Source: ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
|
|
-Source: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
|
|
+Source: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz
|
|
Source2: binutils-2.19.50.0.1-output-format.sed
|
|
Source2: binutils-2.19.50.0.1-output-format.sed
|
|
-Patch01: binutils-2.20.51.0.12-libtool-lib64.patch
|
|
+
|
|
-Patch03: binutils-2.20.51.0.2-ia64-lib64.patch
|
|
+#----------------------------------------------------------------------------
|
|
-Patch04: binutils-2.26-version.patch
|
|
+
|
|
-Patch05: binutils-2.26-set-long-long.patch
|
|
+# Purpose: Use /lib64 and /usr/lib64 instead of /lib and /usr/lib in the
|
|
-Patch07: binutils-2.26-copy-osabi.patch
|
|
+# default library search path of 64-bit targets.
|
|
-Patch08: binutils-2.26-sec-merge-emit.patch
|
|
+# Lifetime: Permanent, but it should not be. This is a bug in the libtool
|
|
-Patch09: binutils-2.26-symbol-version.patch
|
|
+# sources used in both binutils and gcc, (specifically the
|
|
|
|
+# libtool.m4 file). These are based on a version released in 2009
|
|
|
|
+# (2.2.6?) rather than the latest version. (Definitely fixed in
|
|
|
|
+# libtool version 2.4.6).
|
|
|
|
+Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Appends a RHEL or Fedora release string to the generic binutils
|
|
|
|
+# version string.
|
|
|
|
+# Lifetime: Permanent. This is a RHEL/Fedora specific patch.
|
|
|
|
+Patch02: binutils-2.25-version.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Exports the demangle.h header file (associated with the libiberty
|
|
|
|
+# sources) with the binutils-devel rpm.
|
|
|
|
+# Lifetime: Permanent. This is a RHEL/Fedora specific patch.
|
|
|
|
+Patch03: binutils-2.31-export-demangle.h.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Disables the check in the BFD library's bfd.h header file that
|
|
|
|
+# config.h has been included before the bfd.h header. See BZ
|
|
|
|
+# #845084 for more details.
|
|
|
|
+# Lifetime: Permanent - but it should not be. The bfd.h header defines
|
|
|
|
+# various types that are dependent upon configuration options, so
|
|
|
|
+# the order of inclusion is important.
|
|
|
|
+# FIXME: It would be better if the packages using the bfd.h header were
|
|
|
|
+# fixed so that they do include the header files in the correct
|
|
|
|
+# order.
|
|
|
|
+Patch04: binutils-2.22.52.0.4-no-config-h-check.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Import H.J.Lu's Kernel LTO patch.
|
|
|
|
+# Lifetime: Permanent, but needs continual updating.
|
|
|
|
+# FIXME: Try removing....
|
|
|
|
+# Patch05: binutils-2.26-lto.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Include the filename concerned in readelf error messages. This
|
|
|
|
+# makes readelf's output more helpful when it is run on multiple
|
|
|
|
+# input files.
|
|
|
|
+# Lifetime: Permanent. This patch changes the format of readelf's output,
|
|
|
|
+# making it better (IMHO) but also potentially breaking tools that
|
|
|
|
+# depend upon readelf's current format. Hence it remains a local
|
|
|
|
+# patch.
|
|
|
|
+Patch06: binutils-2.29-filename-in-error-messages.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Disable an x86/x86_64 optimization that moves functions from the
|
|
|
|
+# PLT into the GOTPLT for faster access. This optimization is
|
|
|
|
+# problematic for tools that want to intercept PLT entries, such
|
|
|
|
+# as ltrace and LD_AUDIT. See BZs 1452111 and 1333481.
|
|
|
|
+# Lifetime: Permanent. But it should not be.
|
|
|
|
+# FIXME: Replace with a configure time option.
|
|
|
|
+Patch07: binutils-2.29-revert-PLT-elision.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Changes readelf so that when it displays extra information about
|
|
|
|
+# a symbol, this information is placed at the end of the line.
|
|
|
|
+# Lifetime: Permanent.
|
|
|
|
+# FIXME: The proper fix would be to update the scripts that are expecting
|
|
|
|
+# a fixed output from readelf. But it seems that some of them are
|
|
|
|
+# no longer being maintained.
|
|
|
|
+Patch08: binutils-readelf-other-sym-info.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Do not create PLT entries for AARCH64 IFUNC symbols referenced in
|
|
|
|
+# debug sections.
|
|
|
|
+# Lifetime: Permanent.
|
|
|
|
+# FIXME: Find related bug. Decide on permanency.
|
|
|
|
+Patch09: binutils-2.27-aarch64-ifunc.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Fix linker testsuite failures
|
|
|
|
+# Lifetime: Fixed in 2.32 (probably)
|
|
|
|
+Patch10: binutils-fix-testsuite-failures.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Revert fix for PR 23161 which was placing unversioned section
|
|
|
|
+# symbols (_edata, _end, __bss_start) into shared libraries.
|
|
|
|
+# See also PR 23499 and BZ 1614920
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+# Patch11: binutils-do-not-provide-shared-section-symbols.patch
|
|
|
|
+Patch11: binutils-clear-version-info.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Stop gold from complaining about relocs in the .gnu.build.attribute
|
|
|
|
+# section that reference symbols in discarded sections.
|
|
|
|
+# Lifetime: Fixed in 2.32 (maybe)
|
|
|
|
+Patch12: binutils-gold-ignore-discarded-note-relocs.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Improve partial relro support for 64-bit s/390.
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+Patch13: binutils-s390-partial-relro.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Merge .gnu.build.attribute sections into a single section.
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+Patch14: binutils-merge-attribute-sections.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Improve objcopy's --merge-notes option.
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+Patch15: binutils-note-merge-improvements.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Detect and report corrupt symbol version information.
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+Patch16: binutils-detect-corrupt-sym-version-info.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Delay the evaluation of linker script constants until
|
|
|
|
+# after the configuration options have been set.
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+Patch17: binutils-delay-ld-script-constant-eval.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Stop readelf's reports of gaps in build notes - they are unreliable.
|
|
|
|
+# Lifetime: Unknown.
|
|
|
|
+Patch18: binutils-disable-readelf-gap-reports.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Stop the binutils from statically linking with libstdc++.
|
|
|
|
+# Lifetime: Permanent.
|
|
|
|
+Patch20: binutils-do-not-link-with-static-libstdc++.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Add a .attach_to_group pseudo-op to the assembler for
|
|
|
|
+# use by the annobin gcc plugin.
|
|
|
|
+# Lifetime: Permanent.
|
|
|
|
+Patch21: binutils-attach-to-group.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Fix a potential buffer overrun when parsing a corrupt ELF file.
|
|
|
|
+# Lifetime: Fixed in 2.32.
|
|
|
|
+Patch22: binutils-CVE-2018-17358.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Allow OS specific sections in section groups.
|
|
|
|
+# Lifetime: Might be fixed in 2.32
|
|
|
|
+Patch23: binutils-special-sections-in-groups.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Stop gold from issuing warnings about dropped version
|
|
|
|
+# information, unless explicitly requested otherwise.
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+Patch24: binutils-gold-discard-version-info.patch
|
|
|
|
+
|
|
|
|
+# Purpose: Fix a memory leak reading minisymbols.
|
|
|
|
+# Lifetime: Fixed in 2.32
|
|
|
|
+Patch25: binutils-CVE-2018-20002.patch
|
|
|
|
+
|
|
|
|
+#----------------------------------------------------------------------------
|
|
|
|
|
|
Patch1001: binutils-2.26-uio-vine.patch
|
|
Patch1001: binutils-2.26-uio-vine.patch
|
|
|
|
|
|
@@ -66,8 +220,8 @@ Obsoletes: gnupro
|
|
%endif
|
|
%endif
|
|
|
|
|
|
# The higher of these two numbers determines the default ld.
|
|
# The higher of these two numbers determines the default ld.
|
|
-%{!?ld_bfd_priority: %define ld_bfd_priority 50}
|
|
+%{!?ld_bfd_priority: %global ld_bfd_priority 50}
|
|
-%{!?ld_gold_priority:%define ld_gold_priority 30}
|
|
+%{!?ld_gold_priority:%global ld_gold_priority 30}
|
|
|
|
|
|
%ifarch %gold_arches
|
|
%ifarch %gold_arches
|
|
Requires(post): coreutils
|
|
Requires(post): coreutils
|
|
@@ -120,25 +274,15 @@ to consider using libelf instead of BFD.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
%prep
|
|
-%setup -q
|
|
+%autosetup -p1
|
|
-%patch01 -p0 -b .libtool-lib64~
|
|
|
|
-%ifarch ia64
|
|
|
|
-%if "%{_lib}" == "lib64"
|
|
|
|
-%patch03 -p0 -b .ia64-lib64~
|
|
|
|
-%endif
|
|
|
|
-%endif
|
|
|
|
-%patch04 -p1 -b .version~
|
|
|
|
-%patch05 -p1 -b .set-long-long~
|
|
|
|
-%patch07 -p1 -b .copy-osabi~
|
|
|
|
-%patch08 -p1 -b .sec-merge-emit~
|
|
|
|
-%patch09 -p1 -b .symbol-version
|
|
|
|
-
|
|
|
|
-%patch1001 -p1 -b .vine
|
|
|
|
|
|
|
|
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
|
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
|
|
|
|
|
-# On ppc64 we might use 64KiB pages
|
|
+# On ppc64 and aarch64, we might use 64KiB pages
|
|
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c
|
|
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c
|
|
|
|
+sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c
|
|
|
|
+sed -i -e '/common_pagesize/s/4 /64 /' gold/powerpc.cc
|
|
|
|
+sed -i -e '/pagesize/s/0x1000,/0x10000,/' gold/aarch64.cc
|
|
# LTP sucks
|
|
# LTP sucks
|
|
perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf*
|
|
perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf*
|
|
sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
|
|
sed -i -e 's/%''{release}/%{release}/g' bfd/Makefile{.am,.in}
|
|
@@ -148,7 +292,8 @@ if gcc %{optflags} -v --help 2>&1 | grep -q -- -Bsymbolic-functions; then
|
|
sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in}
|
|
sed -i -e 's/^libbfd_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' bfd/Makefile.{am,in}
|
|
sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in}
|
|
sed -i -e 's/^libopcodes_la_LDFLAGS = /&-Wl,-Bsymbolic-functions /' opcodes/Makefile.{am,in}
|
|
fi
|
|
fi
|
|
-
|
|
+# $PACKAGE is used for the gettext catalog name.
|
|
|
|
+sed -i -e 's/^ PACKAGE=/ PACKAGE=%{?cross}/' */configure
|
|
# Undo the name change to run the testsuite.
|
|
# Undo the name change to run the testsuite.
|
|
for tool in binutils gas ld
|
|
for tool in binutils gas ld
|
|
do
|
|
do
|
|
@@ -156,6 +301,13 @@ do
|
|
sed -i -e "s/^DEJATOOL = .*/DEJATOOL = $tool/" $tool/Makefile.in
|
|
sed -i -e "s/^DEJATOOL = .*/DEJATOOL = $tool/" $tool/Makefile.in
|
|
done
|
|
done
|
|
touch */configure
|
|
touch */configure
|
|
|
|
+# Touch the .info files so that they are newer then the .texi files and
|
|
|
|
+# hence do not need to be rebuilt. This eliminates the need for makeinfo.
|
|
|
|
+# The -print is there just to confirm that the command is working.
|
|
|
|
+%if %{without docs}
|
|
|
|
+ find . -name *.info -print -exec touch {} \;
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
|
|
%build
|
|
%build
|
|
echo target is %{binutils_target}
|
|
echo target is %{binutils_target}
|
|
@@ -177,6 +329,12 @@ case %{binutils_target} in ppc*|ppc64*)
|
|
;;
|
|
;;
|
|
esac
|
|
esac
|
|
|
|
|
|
|
|
+%if %{default_relro}
|
|
|
|
+ CARGS="$CARGS --enable-relro=yes"
|
|
|
|
+%else
|
|
|
|
+ CARGS="$CARGS --enable-relro=no"
|
|
|
|
+%endif
|
|
|
|
+
|
|
%if 0%{?_with_debug:1}
|
|
%if 0%{?_with_debug:1}
|
|
CFLAGS="$CFLAGS -O0 -ggdb2"
|
|
CFLAGS="$CFLAGS -O0 -ggdb2"
|
|
%define enable_shared 0
|
|
%define enable_shared 0
|
|
@@ -192,17 +350,47 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
|
|
%else
|
|
%else
|
|
--enable-gold=no \
|
|
--enable-gold=no \
|
|
%endif
|
|
%endif
|
|
|
|
+%if %{isnative}
|
|
|
|
+ --with-sysroot=/ \
|
|
|
|
+%else
|
|
|
|
+ --enable-targets=%{_host} \
|
|
|
|
+ --with-sysroot=%{_prefix}/%{binutils_target}/sys-root \
|
|
|
|
+ --program-prefix=%{cross} \
|
|
|
|
+%endif
|
|
%if %{enable_shared}
|
|
%if %{enable_shared}
|
|
--enable-shared \
|
|
--enable-shared \
|
|
%else
|
|
%else
|
|
--disable-shared \
|
|
--disable-shared \
|
|
|
|
+%endif
|
|
|
|
+%if %{enable_lto}
|
|
|
|
+ --enable-lto \
|
|
|
|
+%endif
|
|
|
|
+%if %{default_compress_debug}
|
|
|
|
+ --enable-compressed-debug-sections=all \
|
|
|
|
+%else
|
|
|
|
+ --enable-compressed-debug-sections=none \
|
|
|
|
+%endif
|
|
|
|
+%if %{default_generate_notes}
|
|
|
|
+ --enable-generate-build-notes=yes \
|
|
|
|
+%else
|
|
|
|
+ --enable-generate-build-notes=no \
|
|
|
|
+%endif
|
|
|
|
+%if %{enable_threading}
|
|
|
|
+ --enable-threads=yes \
|
|
|
|
+%else
|
|
|
|
+ --enable-threads=no \
|
|
%endif
|
|
%endif
|
|
$CARGS \
|
|
$CARGS \
|
|
--enable-plugins \
|
|
--enable-plugins \
|
|
--disable-werror \
|
|
--disable-werror \
|
|
--with-bugurl=http://bugzilla.redhat.com/bugzilla/
|
|
--with-bugurl=http://bugzilla.redhat.com/bugzilla/
|
|
|
|
+
|
|
|
|
+%if %{with docs}
|
|
make %{_smp_mflags} tooldir=%{_prefix} all
|
|
make %{_smp_mflags} tooldir=%{_prefix} all
|
|
make %{_smp_mflags} tooldir=%{_prefix} info
|
|
make %{_smp_mflags} tooldir=%{_prefix} info
|
|
|
|
+%else
|
|
|
|
+%make_build %{_smp_mflags} tooldir=%{_prefix} MAKEINFO=true all
|
|
|
|
+%endif
|
|
|
|
|
|
# Do not use %%check as it is run after %%install where libbfd.so is rebuild
|
|
# Do not use %%check as it is run after %%install where libbfd.so is rebuild
|
|
# with -fvisibility=hidden no longer being usable in its shared form.
|
|
# with -fvisibility=hidden no longer being usable in its shared form.
|
|
@@ -212,21 +400,39 @@ echo ====================TESTSUITE DISABLED=========================
|
|
make -k check < /dev/null || :
|
|
make -k check < /dev/null || :
|
|
echo ====================TESTING=========================
|
|
echo ====================TESTING=========================
|
|
cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum
|
|
cat {gas/testsuite/gas,ld/ld,binutils/binutils}.sum
|
|
|
|
+if [ -f gold/test-suite.log ]; then
|
|
|
|
+ cat gold/test-suite.log
|
|
|
|
+fi
|
|
|
|
+if [ -f gold/testsuite/test-suite.log ]; then
|
|
|
|
+ cat gold/testsuite/*.log
|
|
|
|
+fi
|
|
echo ====================TESTING END=====================
|
|
echo ====================TESTING END=====================
|
|
for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log}
|
|
for file in {gas/testsuite/gas,ld/ld,binutils/binutils}.{sum,log}
|
|
do
|
|
do
|
|
ln $file binutils-%{_target_platform}-$(basename $file) || :
|
|
ln $file binutils-%{_target_platform}-$(basename $file) || :
|
|
done
|
|
done
|
|
-tar cjf binutils-%{_target_platform}.tar.bz2 binutils-%{_target_platform}-*.{sum,log}
|
|
+tar cjf binutils-%{_target_platform}.tar.xz binutils-%{_target_platform}-*.{sum,log}
|
|
-uuencode binutils-%{_target_platform}.tar.bz2 binutils-%{_target_platform}.tar.bz2
|
|
+uuencode binutils-%{_target_platform}.tar.xz binutils-%{_target_platform}.tar.xz
|
|
-rm -f binutils-%{_target_platform}.tar.bz2 binutils-%{_target_platform}-*.{sum,log}
|
|
+rm -f binutils-%{_target_platform}.tar.xz binutils-%{_target_platform}-*.{sum,log}
|
|
|
|
+if [ -f gold/testsuite/test-suite.log ]; then
|
|
|
|
+ tar cjf binutils-%{_target_platform}-gold.log.tar.xz gold/testsuite/*.log
|
|
|
|
+ uuencode binutils-%{_target_platform}-gold.log.tar.xz binutils-%{_target_platform}-gold.log.tar.xz
|
|
|
|
+ rm -f binutils-%{_target_platform}-gold.log.tar.xz
|
|
|
|
+fi
|
|
%endif
|
|
%endif
|
|
|
|
|
|
%install
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
-make install DESTDIR=$RPM_BUILD_ROOT
|
|
+%if %{with docs}
|
|
|
|
+%make_install DESTDIR=%{buildroot}
|
|
|
|
+%else
|
|
|
|
+%make_install DESTDIR=%{buildroot} MAKEINFO=true
|
|
|
|
+%endif
|
|
|
|
|
|
-make prefix=$RPM_BUILD_ROOT%{_prefix} infodir=$RPM_BUILD_ROOT%{_infodir} install-info
|
|
+%if %{isnative}
|
|
|
|
+%if %{with docs}
|
|
|
|
+make prefix=%{buildroot}%{_prefix} infodir=%{buildroot}%{_infodir} install-info
|
|
|
|
+%endif
|
|
|
|
|
|
# Rebuild libiberty.a with -fPIC.
|
|
# Rebuild libiberty.a with -fPIC.
|
|
# Future: Remove it together with its header file, projects should bundle it.
|
|
# Future: Remove it together with its header file, projects should bundle it.
|
|
@@ -248,7 +454,11 @@ install -m 644 libiberty/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
|
install -m 644 include/libiberty.h $RPM_BUILD_ROOT%{_prefix}/include
|
|
install -m 644 include/libiberty.h $RPM_BUILD_ROOT%{_prefix}/include
|
|
install -m 644 opcodes/libopcodes.a %{buildroot}%{_libdir}
|
|
install -m 644 opcodes/libopcodes.a %{buildroot}%{_libdir}
|
|
# Remove Windows/Novell only man pages
|
|
# Remove Windows/Novell only man pages
|
|
-rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{dlltool,nlmconv,windres}*
|
|
+rm -f %{buildroot}%{_mandir}/man1/{dlltool,nlmconv,windres,windmc}*
|
|
|
|
+%if %{without docs}
|
|
|
|
+rm -f %{buildroot}%{_mandir}/man1/{addr2line,ar,as,c++filt,elfedit,gprof,ld,nm,objcopy,objdump,ranlib,readelf,size,strings,strip}*
|
|
|
|
+rm -f %{buildroot}%{_infodir}/{as,bfd,binutils,gprof,ld}*
|
|
|
|
+%endif
|
|
|
|
|
|
%if %{enable_shared}
|
|
%if %{enable_shared}
|
|
chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so*
|
|
chmod +x $RPM_BUILD_ROOT%{_libdir}/lib*.so*
|
|
@@ -262,9 +472,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
|
|
|
|
|
# Sanity check --enable-64-bit-bfd really works.
|
|
# Sanity check --enable-64-bit-bfd really works.
|
|
-grep '^#define BFD_ARCH_SIZE 64$' $RPM_BUILD_ROOT%{_prefix}/include/bfd.h
|
|
+grep '^#define BFD_ARCH_SIZE 64$' %{buildroot}%{_prefix}/include/bfd.h
|
|
# Fix multilib conflicts of generated values by __WORDSIZE-based expressions.
|
|
# Fix multilib conflicts of generated values by __WORDSIZE-based expressions.
|
|
-%ifarch %{ix86} x86_64 ppc ppc64 s390 s390x sh3 sh4 sparc sparc64
|
|
+%ifarch %{ix86} x86_64 ppc %{power64} s390 s390x sh3 sh4 sparc sparc64 arm
|
|
sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include <bits/wordsize.h>~;}' \
|
|
sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include <bits/wordsize.h>~;}' \
|
|
-e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \
|
|
-e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \
|
|
-e 's/^#define BFD_HOST_64BIT_LONG [01] *$/#define BFD_HOST_64BIT_LONG (__WORDSIZE == 64)/' \
|
|
-e 's/^#define BFD_HOST_64BIT_LONG [01] *$/#define BFD_HOST_64BIT_LONG (__WORDSIZE == 64)/' \
|
|
@@ -274,9 +484,9 @@ sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include <bits/wordsize.h>~;}' \
|
|
#define BFD_HOST_64_BIT long\
|
|
#define BFD_HOST_64_BIT long\
|
|
#endif/' \
|
|
#endif/' \
|
|
-e 's/^#define BFD_HOST_U_64_BIT unsigned \(long \)\?long *$/#define BFD_HOST_U_64_BIT unsigned BFD_HOST_64_BIT/' \
|
|
-e 's/^#define BFD_HOST_U_64_BIT unsigned \(long \)\?long *$/#define BFD_HOST_U_64_BIT unsigned BFD_HOST_64_BIT/' \
|
|
- $RPM_BUILD_ROOT%{_prefix}/include/bfd.h
|
|
+ %{buildroot}%{_prefix}/include/bfd.h
|
|
%endif
|
|
%endif
|
|
-touch -r bfd/bfd-in2.h $RPM_BUILD_ROOT%{_prefix}/include/bfd.h
|
|
+touch -r bfd/bfd-in2.h %{buildroot}%{_prefix}/include/bfd.h
|
|
|
|
|
|
# Generate .so linker scripts for dependencies; imported from glibc/Makerules:
|
|
# Generate .so linker scripts for dependencies; imported from glibc/Makerules:
|
|
|
|
|
|
@@ -293,16 +503,18 @@ tee $RPM_BUILD_ROOT%{_libdir}/libbfd.so <<EOH
|
|
$OUTPUT_FORMAT
|
|
$OUTPUT_FORMAT
|
|
|
|
|
|
/* The libz dependency is unexpected by legacy build scripts. */
|
|
/* The libz dependency is unexpected by legacy build scripts. */
|
|
-INPUT ( %{_libdir}/libbfd.a -liberty -lz )
|
|
+/* The libdl dependency is for plugin support. (BZ 889134) */
|
|
|
|
+INPUT ( %{_libdir}/libbfd.a -liberty -lz -ldl )
|
|
EOH
|
|
EOH
|
|
|
|
|
|
-tee $RPM_BUILD_ROOT%{_libdir}/libopcodes.so <<EOH
|
|
+tee %{buildroot}%{_libdir}/libopcodes.so <<EOH
|
|
/* GNU ld script */
|
|
/* GNU ld script */
|
|
|
|
|
|
$OUTPUT_FORMAT
|
|
$OUTPUT_FORMAT
|
|
|
|
|
|
INPUT ( %{_libdir}/libopcodes.a -lbfd )
|
|
INPUT ( %{_libdir}/libopcodes.a -lbfd )
|
|
EOH
|
|
EOH
|
|
|
|
+%endif # !isnative
|
|
|
|
|
|
# This one comes from gcc
|
|
# This one comes from gcc
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|
@@ -411,6 +623,11 @@ fi
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Tue Jan 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2.31.1-1
|
|
|
|
+- updated to 2.31.1.
|
|
|
|
+- dropped Patch1-9.
|
|
|
|
+- imported Patch01-25 from rawhide.
|
|
|
|
+
|
|
* Sun Jun 26 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.26-4
|
|
* Sun Jun 26 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.26-4
|
|
- rebuild with gcc-5.4.0
|
|
- rebuild with gcc-5.4.0
|
|
|
|
|