Enable GOLD for PPC64 and s390x. (#1173780)
- Retire: binutils-2.20.51.0.10-sec-merge-emit.patch. (It has been redundant for a long time now...) Relates: 1173780
This commit is contained in:
parent
2ed6d815cc
commit
38cc40a5fe
@ -1,11 +0,0 @@
|
||||
--- binutils-2.26.orig/bfd/merge.c 2016-01-25 10:11:33.505289018 +0000
|
||||
+++ binutils-2.26/bfd/merge.c 2016-01-25 10:19:56.961381656 +0000
|
||||
@@ -334,7 +334,7 @@ sec_merge_emit (bfd *abfd, struct sec_me
|
||||
|
||||
/* Trailing alignment needed? */
|
||||
off = sec->size - off;
|
||||
- if (off != 0)
|
||||
+ if (off != 0 && alignment_power)
|
||||
{
|
||||
if (contents)
|
||||
memcpy (contents + offset, pad, off);
|
@ -2265,157 +2265,6 @@ diff -rup binutils-2.26.orig/ld/scripttempl/pe.sc binutils-2.26/ld/scripttempl/p
|
||||
}
|
||||
|
||||
.idata ${RELOCATING+BLOCK(__section_alignment__)} :
|
||||
diff -rup binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.26/ld/testsuite/ld-plugin/lto.exp
|
||||
--- binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp 2016-02-19 09:35:36.807003892 +0000
|
||||
+++ binutils-2.26/ld/testsuite/ld-plugin/lto.exp 2016-02-19 09:36:15.450223025 +0000
|
||||
@@ -79,6 +79,15 @@ set lto_link_tests [list \
|
||||
[list "Build liblto-3.a" \
|
||||
"" "-flto $lto_fat" \
|
||||
{lto-3b.c} {} "liblto-3.a"] \
|
||||
+ [list "Compile 4a" \
|
||||
+ "" "-flto $lto_fat" \
|
||||
+ {lto-4a.c} {} ""] \
|
||||
+ [list "Compile 4b" \
|
||||
+ "" "-O2" \
|
||||
+ {lto-4b.c} {} ""] \
|
||||
+ [list "Compile 4c" \
|
||||
+ "" "-O2" \
|
||||
+ {lto-4c.c} {} ""] \
|
||||
[list "Compile 5a" \
|
||||
"" "-flto $lto_fat" \
|
||||
{lto-5a.c} {} ""] \
|
||||
@@ -94,6 +103,12 @@ set lto_link_tests [list \
|
||||
[list "Compile 9" \
|
||||
"" "-O2 -finline -flto" \
|
||||
{lto-9.cc} {} "" "c++"] \
|
||||
+ [list "Compile 10a" \
|
||||
+ "" "-O2" \
|
||||
+ {lto-10a.c} {} ""] \
|
||||
+ [list "Compile 10b" \
|
||||
+ "" "-O2 -flto $lto_fat" \
|
||||
+ {lto-10b.c} {} ""] \
|
||||
[list "Compile 11a" \
|
||||
"" "-O -flto" \
|
||||
{lto-11a.c} {} ""] \
|
||||
@@ -291,9 +306,21 @@ set lto_run_tests [list \
|
||||
[list "LTO 3c" \
|
||||
"-O2 -flto -fuse-linker-plugin tmpdir/lto-3a.o tmpdir/lto-3c.o -Wl,--whole-archive tmpdir/liblto-3.a -Wl,--no-whole-archive tmpdir/liblto-3.a" "" \
|
||||
{dummy.c} "lto-3d.exe" "lto-3.out" "" "c"] \
|
||||
+ [list "LTO 4a" \
|
||||
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-a.o" "" \
|
||||
+ {dummy.c} "lto-4a.exe" "lto-4.out" "" "c"] \
|
||||
+ [list "LTO 4c" \
|
||||
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-c.o" "" \
|
||||
+ {dummy.c} "lto-4c.exe" "lto-4.out" "" "c"] \
|
||||
+ [list "LTO 4d" \
|
||||
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-d.o" "" \
|
||||
+ {dummy.c} "lto-4d.exe" "lto-4.out" "" "c"] \
|
||||
[list "LTO 5" \
|
||||
"-O2 -flto -fuse-linker-plugin tmpdir/lto-5.o" "" \
|
||||
{dummy.c} "lto-5.exe" "lto-5.out" "" "c"] \
|
||||
+ [list "LTO 10" \
|
||||
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-10.o" "" \
|
||||
+ {dummy.c} "lto-10.exe" "lto-10.out" "" "c"] \
|
||||
[list "LTO 11" \
|
||||
"-O -flto -fuse-linker-plugin tmpdir/liblto-11.a" "" \
|
||||
{dummy.c} "lto-11.exe" "lto-11.out" "" "c"] \
|
||||
@@ -378,6 +405,15 @@ if { [is_elf_format] && [check_lto_share
|
||||
}
|
||||
}
|
||||
|
||||
+set testname "Build liblto-4.a"
|
||||
+remote_file host delete "tmpdir/liblto-4.a"
|
||||
+set catch_output [run_host_cmd "$ar" "rc tmpdir/liblto-4.a tmpdir/lto-4a.o tmpdir/lto-4b.o tmpdir/lto-4c.o"]
|
||||
+if {![string match "" $catch_output]} {
|
||||
+ unresolved $testname
|
||||
+ restore_notify
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
set testname "Build liblto-11.a"
|
||||
remote_file host delete "tmpdir/liblto-11.a"
|
||||
set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
|
||||
@@ -424,8 +460,30 @@ return
|
||||
# Run "ld -r" to generate inputs for complex LTO tests.
|
||||
run_dump_test "lto-3r"
|
||||
remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
|
||||
+run_dump_test "lto-4r-a"
|
||||
+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-a.o"
|
||||
+run_dump_test "lto-4r-b"
|
||||
+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-b.o"
|
||||
+run_dump_test "lto-4r-c"
|
||||
+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-c.o"
|
||||
+run_dump_test "lto-4r-d"
|
||||
+remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-d.o"
|
||||
run_dump_test "lto-5r"
|
||||
remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
|
||||
+run_dump_test "lto-10r"
|
||||
+remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
|
||||
+set testname "nm mixed object"
|
||||
+set lto_plugin [run_host_cmd "$CC" "-print-prog-name=liblto_plugin.so tmpdir/lto-10.o"]
|
||||
+if { [ regexp "liblto_plugin.so" $lto_plugin ] } {
|
||||
+ set exec_output [run_host_cmd "$NM" "--plugin $lto_plugin tmpdir/lto-10.o"]
|
||||
+ if { [ regexp "T main" $exec_output ] } {
|
||||
+ pass $testname
|
||||
+ } {
|
||||
+ fail $testname
|
||||
+ }
|
||||
+} {
|
||||
+ fail $testname
|
||||
+ }
|
||||
|
||||
run_cc_link_tests $lto_link_symbol_tests
|
||||
|
||||
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
|
||||
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4a.c 2016-08-19 12:14:15.685818046 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+extern void foo(void);
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ foo();
|
||||
+ return 0;
|
||||
+}
|
||||
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
|
||||
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4b.c 2016-08-19 12:14:19.603842115 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+extern void bar (void);
|
||||
+
|
||||
+void foo(void)
|
||||
+{
|
||||
+ bar ();
|
||||
+ printf ("hello foo\n");
|
||||
+}
|
||||
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
|
||||
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-4c.c 2016-08-19 12:14:21.987856760 +0100
|
||||
@@ -0,0 +1,6 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+void bar (void)
|
||||
+{
|
||||
+ printf ("hello bar\n");
|
||||
+}
|
||||
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
|
||||
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-10a.c 2016-08-19 12:14:27.670891671 +0100
|
||||
@@ -0,0 +1,6 @@
|
||||
+extern int foo(void);
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ return foo();
|
||||
+}
|
||||
--- /dev/null 2016-08-19 08:03:37.292222041 +0100
|
||||
+++ binutils-2.27/ld/testsuite/ld-plugin/lto-10b.c 2016-08-19 12:14:33.380926748 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+int foo(void)
|
||||
+{
|
||||
+ printf ("hello\n");
|
||||
+ return 0;
|
||||
+}
|
||||
--- binutils.orig/bfd/bfd-in2.h 2017-03-02 11:14:48.572979573 +0000
|
||||
+++ binutils-2.28/bfd/bfd-in2.h 2017-03-02 11:21:39.828458555 +0000
|
||||
@@ -1118,6 +1118,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_se
|
||||
|
@ -19,6 +19,8 @@
|
||||
# Default to read-only-relocations (relro) in shared binaries.
|
||||
%define default_relro 1
|
||||
|
||||
#----End of Configure Options------------------------------------------------
|
||||
|
||||
# Default: Not bootstrapping.
|
||||
%bcond_with bootstrap
|
||||
# Default: Not debug
|
||||
@ -37,8 +39,6 @@
|
||||
%undefine with_testsuite
|
||||
%endif
|
||||
|
||||
#----End of Configure Options------------------------------------------------
|
||||
|
||||
%if 0%{!?binutils_target:1}
|
||||
%define binutils_target %{_target_platform}
|
||||
%define isnative 1
|
||||
@ -54,7 +54,7 @@
|
||||
Summary: A GNU collection of binary utilities
|
||||
Name: %{?cross}binutils%{?_with_debug:-debug}
|
||||
Version: 2.29.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Development/Tools
|
||||
URL: http://sources.redhat.com/binutils
|
||||
@ -81,17 +81,10 @@ Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
|
||||
# Lifetime: Permanent. This is a RHEL/Fedora specific patch.
|
||||
Patch02: binutils-2.25-version.patch
|
||||
|
||||
# Purpose: Prevent a seg-fault when attempting to pad a section with a NULL
|
||||
# padding pointer.
|
||||
# Lifetime: Permanent - but should be contributed upstream and fixed.
|
||||
# FIXME: Need a test case to reproduce the potential bug so
|
||||
# that the patch can be contributes.
|
||||
Patch03: binutils-2.20.51.0.10-sec-merge-emit.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.
|
||||
Patch04: binutils-2.22.52.0.1-export-demangle.h.patch
|
||||
Patch03: binutils-2.22.52.0.1-export-demangle.h.patch
|
||||
|
||||
# Purpose: Disables the check in the BFD library's header file that config.h
|
||||
# has been included before the bfd.h header. See BZ #845084 for
|
||||
@ -101,33 +94,32 @@ Patch04: binutils-2.22.52.0.1-export-demangle.h.patch
|
||||
# the order of inclusion is important.
|
||||
# FIXME: It would be better if the packages using the BFD header were
|
||||
# fixed so that they do include the header files in the correct
|
||||
# order. It may also be necessary to add a way for a package to
|
||||
# tell the bfd.h header that this check is not necessary.
|
||||
Patch05: binutils-2.22.52.0.4-no-config-h-check.patch
|
||||
# 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....
|
||||
Patch06: binutils-2.26-lto.patch
|
||||
Patch05: binutils-2.26-lto.patch
|
||||
|
||||
# Purpose: Skip PR14918 linker test for ARM native targets.
|
||||
# Lifetime: Permanent - but it should not be.
|
||||
# FIXME: This patch should be contributed upstream.
|
||||
Patch07: binutils-2.29-skip-rp14918-test-for-arm.patch
|
||||
# Lifetime: Fixed in 2.30.
|
||||
Patch06: binutils-2.29-skip-rp14918-test-for-arm.patch
|
||||
|
||||
# Purpose: Include the filename concerned in readelf error messages.
|
||||
# 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.
|
||||
Patch08: binutils-2.29-filename-in-error-messages.patch
|
||||
Patch07: binutils-2.29-filename-in-error-messages.patch
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
Provides: bundled(libiberty)
|
||||
|
||||
# BZ 1173780: Building GOLD for PPC is not working at the moment.
|
||||
%define gold_arches %ix86 x86_64 %arm aarch64
|
||||
%define gold_arches %ix86 x86_64 %arm aarch64 %{power64} s390x
|
||||
|
||||
%if %{with bootstrap}
|
||||
%define build_gold no
|
||||
@ -252,7 +244,6 @@ using libelf instead of BFD.
|
||||
%patch05 -p1
|
||||
%patch06 -p1
|
||||
%patch07 -p1
|
||||
%patch08 -p1
|
||||
|
||||
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
|
||||
|
||||
@ -652,6 +643,11 @@ exit 0
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Tue Sep 26 2017 Nick Clifton <nickc@redhat.com> 2.29.1-2
|
||||
- Enable GOLD for PPC64 and s390x. (#1173780)
|
||||
- Retire: binutils-2.20.51.0.10-sec-merge-emit.patch.
|
||||
(It has been redundant for a long time now...)
|
||||
|
||||
* Tue Sep 26 2017 Nick Clifton <nickc@redhat.com> 2.29.1-1
|
||||
- Rebase on FSF binutils 2.29.1 release.
|
||||
- Retire: binutils-2.29-ppc64-plt-localentry0-disable.patch
|
||||
@ -2697,4 +2693,3 @@ exit 0
|
||||
* Wed Oct 22 1997 Erik Troan <ewt@redhat.com>
|
||||
- added 2.8.1.0.1 patch from hj
|
||||
- added patch for alpha palcode form rth
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user