Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 885cad8096 | |||
| 0845853341 |
1
.gcc-toolset-14-binutils.metadata
Normal file
1
.gcc-toolset-14-binutils.metadata
Normal file
@ -0,0 +1 @@
|
||||
0e008260a958bbd10182ee3384672ae0a310eece SOURCES/binutils-2.41.tar.xz
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
/binutils-2.41.tar.xz
|
||||
/binutils-2.19.50.0.1-output-format.sed
|
||||
SOURCES/binutils-2.41.tar.xz
|
||||
|
||||
38
SOURCES/binutils-2.19.50.0.1-output-format.sed
Normal file
38
SOURCES/binutils-2.19.50.0.1-output-format.sed
Normal file
@ -0,0 +1,38 @@
|
||||
# Generate OUTPUT_FORMAT line for .so files from the system linker output.
|
||||
# Imported from glibc/Makerules.
|
||||
|
||||
/ld.*[ ]-E[BL]/b f
|
||||
/collect.*[ ]-E[BL]/b f
|
||||
/OUTPUT_FORMAT[^)]*$/{N
|
||||
s/\n[ ]*/ /
|
||||
}
|
||||
t o
|
||||
: o
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
|
||||
t s
|
||||
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
d
|
||||
: s
|
||||
s/"//g
|
||||
G
|
||||
s/\n//
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
|
||||
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
|
||||
q
|
||||
: q
|
||||
s/"//g
|
||||
p
|
||||
q
|
||||
: f
|
||||
s/^.*[ ]-E\([BL]\)[ ].*$/,\1/
|
||||
t h
|
||||
s/^.*[ ]-E\([BL]\)$/,\1/
|
||||
t h
|
||||
d
|
||||
: h
|
||||
h
|
||||
293
SOURCES/binutils-LTO-plugin-common-symbols.patch
Normal file
293
SOURCES/binutils-LTO-plugin-common-symbols.patch
Normal file
@ -0,0 +1,293 @@
|
||||
From a6f8fe0a9e9cbe871652e46ba7c22d5e9fb86208 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Wed, 14 Aug 2024 20:50:02 -0700
|
||||
Subject: [PATCH] lto: Don't include unused LTO archive members in output
|
||||
|
||||
When plugin_object_p is called by elf_link_is_defined_archive_symbol to
|
||||
check if a symbol in archive is a real definition, set archive member
|
||||
plugin_format to bfd_plugin_yes_unused to avoid including the unused LTO
|
||||
archive members in linker output. When plugin_object_p is called as
|
||||
known used, call plugin claim_file if plugin_format is bfd_plugin_unknown
|
||||
or bfd_plugin_yes_unused.
|
||||
|
||||
To get the proper support for archives with LTO common symbols with GCC,
|
||||
the GCC fix for
|
||||
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116361
|
||||
|
||||
is needed.
|
||||
|
||||
bfd/
|
||||
|
||||
PR ld/32083
|
||||
* archures.c (bfd_arch_get_compatible): Treat bfd_plugin_yes_unused
|
||||
the same as bfd_plugin_yes.
|
||||
* elflink.c (elf_link_is_defined_archive_symbol): Likewise.
|
||||
* bfd.c (bfd_plugin_format): Add bfd_plugin_yes_unused.
|
||||
* plugin.c (try_claim): Try claim_file_v2 first.
|
||||
* bfd-in2.h: Regenerated.
|
||||
|
||||
ld/
|
||||
|
||||
PR ld/32083
|
||||
* plugin.c (plugin_call_claim_file): Add an argument to return
|
||||
if LDPT_REGISTER_CLAIM_FILE_HOOK_V2 is used.
|
||||
(plugin_object_p): When KNOWN_USED is false, we call plugin
|
||||
claim_file if plugin_format is bfd_plugin_unknown and set
|
||||
plugin_format to bfd_plugin_yes_unused on LTO object. When
|
||||
KNOWN_USED is true, we call plugin claim_file if plugin_format
|
||||
is bfd_plugin_unknown or bfd_plugin_yes_unused.
|
||||
|
||||
commit c839a44c39161c9932d58c28c2949ab3bb94ea6f
|
||||
Author: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Sun Sep 8 17:27:00 2024 -0700
|
||||
|
||||
bfd: Pass true to ld_plugin_object_p
|
||||
|
||||
Since linker calls bfd_plugin_object_p, which calls ld_plugin_object_p,
|
||||
only for command-line input objects, pass true to ld_plugin_object_p so
|
||||
that the same input IR file won't be included twice if the new LTO hook,
|
||||
LDPT_REGISTER_CLAIM_FILE_HOOK_V2 isn't used.
|
||||
|
||||
PR ld/32153
|
||||
* plugin.c (bfd_plugin_object_p): Pass true to ld_plugin_object_p.
|
||||
|
||||
diff -rup binutils.orig/bfd/archures.c binutils-2.41/bfd/archures.c
|
||||
--- binutils.orig/bfd/archures.c 2025-02-20 16:28:36.178833667 +0000
|
||||
+++ binutils-2.41/bfd/archures.c 2025-02-20 20:20:34.505422221 +0000
|
||||
@@ -931,6 +931,7 @@ bfd_arch_get_compatible (const bfd *abfd
|
||||
to assume that they know what they are doing. */
|
||||
if (accept_unknowns
|
||||
|| ubfd->plugin_format == bfd_plugin_yes
|
||||
+ || ubfd->plugin_format == bfd_plugin_yes_unused
|
||||
|| strcmp (bfd_get_target (ubfd), "binary") == 0)
|
||||
return kbfd->arch_info;
|
||||
return NULL;
|
||||
diff -rup binutils.orig/bfd/bfd-in2.h binutils-2.41/bfd/bfd-in2.h
|
||||
--- binutils.orig/bfd/bfd-in2.h 2025-02-20 16:28:36.284833929 +0000
|
||||
+++ binutils-2.41/bfd/bfd-in2.h 2025-02-20 20:21:33.281519583 +0000
|
||||
@@ -1912,7 +1912,8 @@ enum bfd_plugin_format
|
||||
{
|
||||
bfd_plugin_unknown = 0,
|
||||
bfd_plugin_yes = 1,
|
||||
- bfd_plugin_no = 2
|
||||
+ bfd_plugin_yes_unused = 2,
|
||||
+ bfd_plugin_no = 3
|
||||
};
|
||||
|
||||
struct bfd_build_id
|
||||
diff -rup binutils.orig/bfd/bfd.c binutils-2.41/bfd/bfd.c
|
||||
--- binutils.orig/bfd/bfd.c 2025-02-20 16:28:36.178833667 +0000
|
||||
+++ binutils-2.41/bfd/bfd.c 2025-02-20 20:20:12.473385721 +0000
|
||||
@@ -57,7 +57,8 @@ EXTERNAL
|
||||
. {
|
||||
. bfd_plugin_unknown = 0,
|
||||
. bfd_plugin_yes = 1,
|
||||
-. bfd_plugin_no = 2
|
||||
+. bfd_plugin_yes_unused = 2,
|
||||
+. bfd_plugin_no = 3
|
||||
. };
|
||||
.
|
||||
.struct bfd_build_id
|
||||
diff -rup binutils.orig/bfd/elflink.c binutils-2.41/bfd/elflink.c
|
||||
--- binutils.orig/bfd/elflink.c 2025-02-20 16:28:36.284833929 +0000
|
||||
+++ binutils-2.41/bfd/elflink.c 2025-02-20 20:21:00.217464813 +0000
|
||||
@@ -3581,6 +3581,7 @@ elf_link_is_defined_archive_symbol (bfd
|
||||
object file is an IR object, give linker LTO plugin a chance to
|
||||
get the correct symbol table. */
|
||||
if (abfd->plugin_format == bfd_plugin_yes
|
||||
+ || abfd->plugin_format == bfd_plugin_yes_unused
|
||||
#if BFD_SUPPORTS_PLUGINS
|
||||
|| (abfd->plugin_format == bfd_plugin_unknown
|
||||
&& bfd_link_plugin_object_p (abfd))
|
||||
diff -rup binutils.orig/bfd/plugin.c binutils-2.41/bfd/plugin.c
|
||||
--- binutils.orig/bfd/plugin.c 2025-02-20 16:28:36.241833823 +0000
|
||||
+++ binutils-2.41/bfd/plugin.c 2025-02-20 20:14:43.601840910 +0000
|
||||
@@ -329,13 +329,23 @@ try_claim (bfd *abfd)
|
||||
struct ld_plugin_input_file file;
|
||||
|
||||
file.handle = abfd;
|
||||
- if (bfd_plugin_open_input (abfd, &file)
|
||||
- && current_plugin->claim_file)
|
||||
+ if (bfd_plugin_open_input (abfd, &file))
|
||||
{
|
||||
- current_plugin->claim_file (&file, &claimed);
|
||||
- bfd_plugin_close_file_descriptor ((abfd->my_archive != NULL
|
||||
- ? abfd : NULL),
|
||||
- file.fd);
|
||||
+ bool claim_file_called = false;
|
||||
+ if (current_plugin->claim_file_v2)
|
||||
+ {
|
||||
+ current_plugin->claim_file_v2 (&file, &claimed, false);
|
||||
+ claim_file_called = true;
|
||||
+ }
|
||||
+ else if (current_plugin->claim_file)
|
||||
+ {
|
||||
+ current_plugin->claim_file (&file, &claimed);
|
||||
+ claim_file_called = true;
|
||||
+ }
|
||||
+ if (claim_file_called)
|
||||
+ bfd_plugin_close_file_descriptor ((abfd->my_archive != NULL
|
||||
+ ? abfd : NULL),
|
||||
+ file.fd);
|
||||
}
|
||||
|
||||
return claimed;
|
||||
@@ -586,8 +596,12 @@ load_plugin (bfd *abfd)
|
||||
static bfd_cleanup
|
||||
bfd_plugin_object_p (bfd *abfd)
|
||||
{
|
||||
+ /* Since ld_plugin_object_p is called only for linker command-line input
|
||||
+ objects, pass true to ld_plugin_object_p so that the same input IR
|
||||
+ file won't be included twice if the LDPT_REGISTER_CLAIM_FILE_HOOK_V2
|
||||
+ isn't used. */
|
||||
if (ld_plugin_object_p)
|
||||
- return ld_plugin_object_p (abfd, false);
|
||||
+ return ld_plugin_object_p (abfd, true);
|
||||
|
||||
if (abfd->plugin_format == bfd_plugin_unknown && !load_plugin (abfd))
|
||||
return NULL;
|
||||
diff -rup binutils.orig/ld/plugin.c binutils-2.41/ld/plugin.c
|
||||
--- binutils.orig/ld/plugin.c 2025-02-20 16:28:37.210836204 +0000
|
||||
+++ binutils-2.41/ld/plugin.c 2025-02-20 20:23:41.314731681 +0000
|
||||
@@ -773,14 +773,17 @@ get_symbols (const void *handle, int nsy
|
||||
if (syms[n].def != LDPK_UNDEF && syms[n].def != LDPK_WEAKUNDEF)
|
||||
{
|
||||
blhe = h;
|
||||
- if (blhe && link_info.wrap_hash != NULL)
|
||||
+ /* Check if a symbol is a wrapper symbol. */
|
||||
+ if (blhe)
|
||||
{
|
||||
- /* Check if a symbol is a wrapper symbol. */
|
||||
- struct bfd_link_hash_entry *unwrap
|
||||
- = unwrap_hash_lookup (&link_info, (bfd *) abfd, blhe);
|
||||
- if (unwrap && unwrap != h)
|
||||
- wrap_status = wrapper;
|
||||
- }
|
||||
+ if (link_info.wrap_hash != NULL)
|
||||
+ {
|
||||
+ struct bfd_link_hash_entry *unwrap
|
||||
+ = unwrap_hash_lookup (&link_info, (bfd *) abfd, blhe);
|
||||
+ if (unwrap != NULL && unwrap != h)
|
||||
+ wrap_status = wrapper;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1159,10 +1162,11 @@ plugin_load_plugins (void)
|
||||
/* Call 'claim file' hook for all plugins. */
|
||||
static int
|
||||
plugin_call_claim_file (const struct ld_plugin_input_file *file, int *claimed,
|
||||
- bool known_used)
|
||||
+ int *claim_file_handler_v2, bool known_used)
|
||||
{
|
||||
plugin_t *curplug = plugins_list;
|
||||
*claimed = false;
|
||||
+ *claim_file_handler_v2 = false;
|
||||
while (curplug && !*claimed)
|
||||
{
|
||||
if (curplug->claim_file_handler)
|
||||
@@ -1171,7 +1175,11 @@ plugin_call_claim_file (const struct ld_
|
||||
|
||||
called_plugin = curplug;
|
||||
if (curplug->claim_file_handler_v2)
|
||||
- rv = (*curplug->claim_file_handler_v2) (file, claimed, known_used);
|
||||
+ {
|
||||
+ rv = (*curplug->claim_file_handler_v2) (file, claimed,
|
||||
+ known_used);
|
||||
+ *claim_file_handler_v2 = true;
|
||||
+ }
|
||||
else
|
||||
rv = (*curplug->claim_file_handler) (file, claimed);
|
||||
called_plugin = NULL;
|
||||
@@ -1180,6 +1188,7 @@ plugin_call_claim_file (const struct ld_
|
||||
}
|
||||
curplug = curplug->next;
|
||||
}
|
||||
+
|
||||
return plugin_error_p () ? -1 : 0;
|
||||
}
|
||||
|
||||
@@ -1207,7 +1216,7 @@ plugin_cleanup (bfd *abfd ATTRIBUTE_UNUS
|
||||
static bfd_cleanup
|
||||
plugin_object_p (bfd *ibfd, bool known_used)
|
||||
{
|
||||
- int claimed;
|
||||
+ int claimed, claim_file_handler_v2;
|
||||
plugin_input_file_t *input;
|
||||
struct ld_plugin_input_file file;
|
||||
bfd *abfd;
|
||||
@@ -1216,12 +1225,17 @@ plugin_object_p (bfd *ibfd, bool known_u
|
||||
if ((ibfd->flags & BFD_PLUGIN) != 0)
|
||||
return NULL;
|
||||
|
||||
- if (ibfd->plugin_format != bfd_plugin_unknown)
|
||||
+ /* When KNOWN_USED is false, we call plugin claim_file if plugin_format
|
||||
+ is bfd_plugin_unknown and set plugin_format to bfd_plugin_yes_unused
|
||||
+ on LTO object. When KNOWN_USED is true, we call plugin claim_file
|
||||
+ if plugin_format is bfd_plugin_unknown or bfd_plugin_yes_unused. */
|
||||
+ if (ibfd->plugin_format != bfd_plugin_unknown
|
||||
+ && (!known_used || ibfd->plugin_format != bfd_plugin_yes_unused))
|
||||
{
|
||||
- if (ibfd->plugin_format == bfd_plugin_yes)
|
||||
- return plugin_cleanup;
|
||||
- else
|
||||
+ if (ibfd->plugin_format == bfd_plugin_no)
|
||||
return NULL;
|
||||
+ else
|
||||
+ return plugin_cleanup;
|
||||
}
|
||||
|
||||
/* We create a dummy BFD, initially empty, to house whatever symbols
|
||||
@@ -1257,7 +1271,8 @@ plugin_object_p (bfd *ibfd, bool known_u
|
||||
|
||||
claimed = 0;
|
||||
|
||||
- if (plugin_call_claim_file (&file, &claimed, known_used))
|
||||
+ if (plugin_call_claim_file (&file, &claimed, &claim_file_handler_v2,
|
||||
+ known_used))
|
||||
einfo (_("%F%P: %s: plugin reported error claiming file\n"),
|
||||
plugin_error_plugin ());
|
||||
|
||||
@@ -1277,7 +1292,13 @@ plugin_object_p (bfd *ibfd, bool known_u
|
||||
|
||||
if (claimed)
|
||||
{
|
||||
- ibfd->plugin_format = bfd_plugin_yes;
|
||||
+ /* Set plugin_format to bfd_plugin_yes_unused if KNOWN_USED is
|
||||
+ false for plugin claim_file_v2 to avoid including the unused
|
||||
+ LTO archive members in linker output. */
|
||||
+ if (known_used || !claim_file_handler_v2)
|
||||
+ ibfd->plugin_format = bfd_plugin_yes;
|
||||
+ else
|
||||
+ ibfd->plugin_format = bfd_plugin_yes_unused;
|
||||
ibfd->plugin_dummy_bfd = abfd;
|
||||
bfd_make_readable (abfd);
|
||||
abfd->no_export = ibfd->no_export;
|
||||
@@ -1363,14 +1384,17 @@ plugin_call_cleanup (void)
|
||||
{
|
||||
if (curplug->cleanup_handler && !curplug->cleanup_done)
|
||||
{
|
||||
- enum ld_plugin_status rv;
|
||||
- curplug->cleanup_done = true;
|
||||
- called_plugin = curplug;
|
||||
- rv = (*curplug->cleanup_handler) ();
|
||||
- called_plugin = NULL;
|
||||
- if (rv != LDPS_OK)
|
||||
- info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"),
|
||||
- curplug->name, rv);
|
||||
+ if (1)
|
||||
+ {
|
||||
+ enum ld_plugin_status rv;
|
||||
+ curplug->cleanup_done = true;
|
||||
+ called_plugin = curplug;
|
||||
+ rv = (*curplug->cleanup_handler) ();
|
||||
+ called_plugin = NULL;
|
||||
+ if (rv != LDPS_OK)
|
||||
+ info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"),
|
||||
+ curplug->name, rv);
|
||||
+ }
|
||||
dlclose (curplug->dlhandle);
|
||||
}
|
||||
curplug = curplug->next;
|
||||
47
SOURCES/binutils-PPC64-LD-ASSERT.patch
Normal file
47
SOURCES/binutils-PPC64-LD-ASSERT.patch
Normal file
@ -0,0 +1,47 @@
|
||||
diff -rup binutils.orig/gold/Makefile.am binutils-2.41/gold/Makefile.am
|
||||
--- binutils.orig/gold/Makefile.am 2025-02-24 09:38:42.201892521 +0000
|
||||
+++ binutils-2.41/gold/Makefile.am 2025-02-24 11:02:18.892145832 +0000
|
||||
@@ -207,7 +207,7 @@ dwp_SOURCES = dwp.cc
|
||||
dwp_DEPENDENCIES = libgold.a $(LIBIBERTY) $(LIBINTL_DEP)
|
||||
dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADLIBS) \
|
||||
$(LIBDL) $(ZLIB) $(ZSTD_LIBS) $(JANSSON_LIBS)
|
||||
-dwp_LDFLAGS = $(GOLD_LDFLAGS)
|
||||
+dwp_LDFLAGS = $(GOLD_LDFLAGS) -fno-lto
|
||||
|
||||
CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh
|
||||
|
||||
diff -rup binutils.orig/gold/Makefile.in binutils-2.41/gold/Makefile.in
|
||||
--- binutils.orig/gold/Makefile.in 2025-02-24 09:38:42.201892521 +0000
|
||||
+++ binutils-2.41/gold/Makefile.in 2025-02-24 11:02:11.812124673 +0000
|
||||
@@ -835,7 +835,7 @@ dwp_DEPENDENCIES = libgold.a $(LIBIBERTY
|
||||
dwp_LDADD = libgold.a $(LIBIBERTY) $(GOLD_LDADD) $(LIBINTL) $(THREADLIBS) \
|
||||
$(LIBDL) $(ZLIB) $(ZSTD_LIBS) $(JANSSON_LIBS)
|
||||
|
||||
-dwp_LDFLAGS = $(GOLD_LDFLAGS)
|
||||
+dwp_LDFLAGS = $(GOLD_LDFLAGS) -fno-lto
|
||||
CONFIG_STATUS_DEPENDENCIES = $(srcdir)/../bfd/development.sh
|
||||
POTFILES = $(CCFILES) $(HFILES) $(TARGETSOURCES)
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ld1_SOURCES = $(sources_var)
|
||||
diff -rup binutils.orig/ld/ldlang.c binutils-2.41/ld/ldlang.c
|
||||
--- binutils.orig/ld/ldlang.c 2025-02-24 09:38:42.413893857 +0000
|
||||
+++ binutils-2.41/ld/ldlang.c 2025-02-24 09:39:34.394224393 +0000
|
||||
@@ -7947,6 +7947,19 @@ lang_list_remove_tail (lang_statement_li
|
||||
lang_statement_list_type *origlist)
|
||||
{
|
||||
union lang_statement_union **savetail;
|
||||
+
|
||||
+ if (getenv ("LD_DEBUG_NEVER") != NULL)
|
||||
+ {
|
||||
+ /* FIXME: RHEL-49348: For some reason building this function for the
|
||||
+ PowerPC architecture on RHEL-10 is resulting in a linker that
|
||||
+ triggers the ASSERT below - because the origlist pointer is
|
||||
+ corrupt. These fprintf statements, even if they will never be
|
||||
+ used, are enough to cause the compiler to build the function
|
||||
+ correctly, thus avoiding the problem. */
|
||||
+ fprintf (stderr, "origlist %p destlist %p\n", origlist, destlist);
|
||||
+ fprintf (stderr, "heads: %p %p\n", origlist->head, destlist->head);
|
||||
+ }
|
||||
+
|
||||
/* Check that ORIGLIST really is an earlier state of DESTLIST. */
|
||||
ASSERT (origlist->head == destlist->head);
|
||||
savetail = origlist->tail;
|
||||
@ -9,7 +9,7 @@ BuildRequires: scl-utils-build
|
||||
Summary: A GNU collection of binary utilities
|
||||
Name: %{?scl_prefix}binutils
|
||||
Version: 2.41
|
||||
Release: 3%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
|
||||
URL: https://sourceware.org/binutils
|
||||
|
||||
@ -344,6 +344,13 @@ Patch39: binutils-multilib.am.patch
|
||||
# Lifetime: Fixed in 2.42
|
||||
Patch40: binutils-Intel-APX-CODE_6_GOTTPOFF.patch
|
||||
|
||||
Patch41: binutils-LTO-plugin-common-symbols.patch
|
||||
|
||||
# Purpose: Workaround for an unresolved bug in ppc gcc
|
||||
# which generates bad code in the linker. cf RHEL-49348
|
||||
# Lifetime: TEMPORARY
|
||||
Patch98: binutils-PPC64-LD-ASSERT.patch
|
||||
|
||||
# Purpose: Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10
|
||||
# Lifetime: TEMPORARY
|
||||
Patch99: binutils-suppress-ld-align-tests.patch
|
||||
@ -940,7 +947,12 @@ build_target()
|
||||
|
||||
%if %{with docs}
|
||||
# Because of parallel building, info has to be made after all.
|
||||
%make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils all
|
||||
|
||||
# FIXME: Setting CXXFLAGS is a workaround for the PPC64 compiler bug (cf RHEL-49348).
|
||||
# It allows the binutils to build using a version of gcc-toolset-14-ld that is already affected by the bug.
|
||||
# Once built and installed into the buildroot, this fix will no longer be needed.
|
||||
# Although whilst the bug in the PPC64 compiler remains Patch98 will still be needed.
|
||||
%make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils all CXXFLAGS="$RPM_OPT_FLAGS -fno-lto"
|
||||
%make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils info
|
||||
%else
|
||||
%make_build %{_smp_mflags} tooldir=%{_prefix} CC=%gcc_for_binutils CXX=%gxx_for_binutils MAKEINFO=true all
|
||||
@ -1491,6 +1503,12 @@ exit 0
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Mon Feb 24 2025 Nick Clifton <nickc@redhat.com> - 2.41-5
|
||||
- Fix assertion failure in ppc64 ld due to compiler miscompilation.
|
||||
|
||||
* Thu Feb 20 2025 Nick Clifton <nickc@redhat.com> - 2.41-4
|
||||
- Backport fixes for PR 32082 and PR 32153 in order to fix the PR 20267 linker tests. (RHEL-80372)
|
||||
|
||||
* Fri Aug 16 2024 Nick Clifton <nickc@redhat.com> - 2.41-3
|
||||
- Fix restoring contect to gprofng.rc file. (RHEL-54563)
|
||||
|
||||
@ -1,180 +0,0 @@
|
||||
diff -rup binutils.orig/gold/gdb-index.cc binutils-2.34.0/gold/gdb-index.cc
|
||||
--- binutils.orig/gold/gdb-index.cc 2020-07-24 09:12:29.241306445 +0100
|
||||
+++ binutils-2.34.0/gold/gdb-index.cc 2020-07-24 09:15:48.332095898 +0100
|
||||
@@ -817,7 +817,7 @@ Gdb_index_info_reader::get_qualified_nam
|
||||
void
|
||||
Gdb_index_info_reader::record_cu_ranges(Dwarf_die* die)
|
||||
{
|
||||
- unsigned int shndx;
|
||||
+ unsigned int shndx = 0;
|
||||
unsigned int shndx2;
|
||||
|
||||
off_t ranges_offset = die->ref_attribute(elfcpp::DW_AT_ranges, &shndx);
|
||||
diff -rup binutils.orig/gold/layout.cc binutils-2.34.0/gold/layout.cc
|
||||
--- binutils.orig/gold/layout.cc 2020-07-24 09:12:29.243306433 +0100
|
||||
+++ binutils-2.34.0/gold/layout.cc 2020-07-24 09:15:11.464320064 +0100
|
||||
@@ -1986,7 +1986,7 @@ Layout::attach_allocated_section_to_segm
|
||||
seg_flags |= os->extra_segment_flags();
|
||||
|
||||
// Check for --section-start.
|
||||
- uint64_t addr;
|
||||
+ uint64_t addr = 0;
|
||||
bool is_address_set = parameters->options().section_start(os->name(), &addr);
|
||||
|
||||
// In general the only thing we really care about for PT_LOAD
|
||||
diff -rup binutils.orig/binutils/dlltool.c binutils-2.34.0/binutils/dlltool.c
|
||||
--- binutils.orig/binutils/dlltool.c 2020-07-24 09:12:28.974308069 +0100
|
||||
+++ binutils-2.34.0/binutils/dlltool.c 2020-07-24 12:09:37.527121295 +0100
|
||||
@@ -1305,7 +1305,7 @@ run (const char *what, char *args)
|
||||
int pid, wait_status;
|
||||
int i;
|
||||
const char **argv;
|
||||
- char *errmsg_fmt, *errmsg_arg;
|
||||
+ char *errmsg_fmt = "", *errmsg_arg = "";
|
||||
char *temp_base = choose_temp_base ();
|
||||
|
||||
inform (_("run: %s %s"), what, args);
|
||||
diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c
|
||||
--- binutils.orig/gas/config/tc-arm.c 2020-07-24 09:12:32.368287432 +0100
|
||||
+++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:14:19.842360634 +0100
|
||||
@@ -28416,9 +28416,12 @@ md_apply_fix (fixS * fixP,
|
||||
perform relaxation. */
|
||||
if (value == -2)
|
||||
{
|
||||
- newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
- newval = 0xbf00; /* NOP encoding T1 */
|
||||
- md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
+ if (fixP->fx_done || !seg->use_rela_p)
|
||||
+ {
|
||||
+ newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
+ newval = 0xbf00; /* NOP encoding T1 */
|
||||
+ md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -28631,17 +28634,14 @@ md_apply_fix (fixS * fixP,
|
||||
case BFD_RELOC_ARM_GOTFUNCDESC:
|
||||
case BFD_RELOC_ARM_GOTOFFFUNCDESC:
|
||||
case BFD_RELOC_ARM_FUNCDESC:
|
||||
- if (arm_fdpic)
|
||||
- {
|
||||
- if (fixP->fx_done || !seg->use_rela_p)
|
||||
- md_number_to_chars (buf, 0, 4);
|
||||
- }
|
||||
- else
|
||||
+ if (!arm_fdpic)
|
||||
{
|
||||
as_bad_where (fixP->fx_file, fixP->fx_line,
|
||||
_("Relocation supported only in FDPIC mode"));
|
||||
- }
|
||||
- break;
|
||||
+ break;
|
||||
+ }
|
||||
+ value = 0;
|
||||
+ /* Fall through. */
|
||||
#endif
|
||||
|
||||
case BFD_RELOC_RVA:
|
||||
diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c
|
||||
--- binutils.orig/gas/config/tc-arm.c 2020-07-24 12:16:02.099719884 +0100
|
||||
+++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:34:17.690858328 +0100
|
||||
@@ -28641,7 +28641,7 @@ md_apply_fix (fixS * fixP,
|
||||
break;
|
||||
}
|
||||
value = 0;
|
||||
- /* Fall through. */
|
||||
+ goto fred;
|
||||
#endif
|
||||
|
||||
case BFD_RELOC_RVA:
|
||||
@@ -28653,6 +28653,7 @@ md_apply_fix (fixS * fixP,
|
||||
#ifdef TE_PE
|
||||
case BFD_RELOC_32_SECREL:
|
||||
#endif
|
||||
+ fred:
|
||||
if (fixP->fx_done || !seg->use_rela_p)
|
||||
#ifdef TE_WINCE
|
||||
/* For WinCE we only do this for pcrel fixups. */
|
||||
diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c
|
||||
--- binutils.orig/gas/config/tc-arm.c 2020-07-24 13:28:26.926553452 +0100
|
||||
+++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 13:31:57.835215763 +0100
|
||||
@@ -28416,12 +28416,8 @@ md_apply_fix (fixS * fixP,
|
||||
perform relaxation. */
|
||||
if (value == -2)
|
||||
{
|
||||
- if (fixP->fx_done || !seg->use_rela_p)
|
||||
- {
|
||||
- newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
- newval = 0xbf00; /* NOP encoding T1 */
|
||||
- md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
- }
|
||||
+ newval = 0xbf00; /* NOP encoding T1 */
|
||||
+ goto jim;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -28432,6 +28428,7 @@ md_apply_fix (fixS * fixP,
|
||||
{
|
||||
newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
newval |= ((value & 0x3e) << 2) | ((value & 0x40) << 3);
|
||||
+ jim:
|
||||
md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
}
|
||||
}
|
||||
diff -rup binutils.orig/binutils/mclex.c binutils-2.34.0/binutils/mclex.c
|
||||
--- binutils.orig/binutils/mclex.c 2020-07-24 13:28:26.297557441 +0100
|
||||
+++ binutils-2.34.0/binutils/mclex.c 2020-07-24 14:46:53.587940149 +0100
|
||||
@@ -207,7 +207,7 @@ enum_severity (int e)
|
||||
static void
|
||||
mc_add_keyword_ascii (const char *sz, int rid, const char *grp, rc_uint_type nv, const char *sv)
|
||||
{
|
||||
- unichar *usz, *usv = NULL;
|
||||
+ unichar *usz = NULL, *usv = NULL;
|
||||
rc_uint_type usz_len;
|
||||
|
||||
unicode_from_codepage (&usz_len, &usz, sz, CP_ACP);
|
||||
diff -rup binutils.orig/binutils/windmc.c binutils-2.34.0/binutils/windmc.c
|
||||
--- binutils.orig/binutils/windmc.c 2020-07-24 13:28:26.279557556 +0100
|
||||
+++ binutils-2.34.0/binutils/windmc.c 2020-07-24 14:48:05.460477478 +0100
|
||||
@@ -338,7 +338,7 @@ mc_add_node_lang (mc_node *root, const m
|
||||
static char *
|
||||
convert_unicode_to_ACP (const unichar *usz)
|
||||
{
|
||||
- char *s;
|
||||
+ char *s = NULL;
|
||||
rc_uint_type l;
|
||||
|
||||
if (! usz)
|
||||
@@ -607,10 +607,10 @@ mc_generate_bin_item (mc_node_lang *n, r
|
||||
else
|
||||
{
|
||||
rc_uint_type txt_len, l;
|
||||
- char *cvt_txt;
|
||||
+ char *cvt_txt = NULL;
|
||||
|
||||
codepage_from_unicode( &l, n->message, &cvt_txt, n->lang->lang_info.wincp);
|
||||
- if (! cvt_txt)
|
||||
+ if (cvt_txt == NULL)
|
||||
fatal ("Failed to convert message to language codepage.\n");
|
||||
txt_len = strlen (cvt_txt);
|
||||
if (mcset_automatic_null_termination && txt_len > 0)
|
||||
@@ -1107,7 +1107,7 @@ main (int argc, char **argv)
|
||||
|
||||
/* Load the input file and do code page transformations to UTF16. */
|
||||
{
|
||||
- unichar *u;
|
||||
+ unichar *u = NULL;
|
||||
rc_uint_type ul;
|
||||
char *buff;
|
||||
bfd_size_type flen;
|
||||
--- binutils.orig/binutils/srconv.c 2020-07-24 15:37:25.847459208 +0100
|
||||
+++ binutils-2.34.0/binutils/srconv.c 2020-07-24 15:39:12.853773423 +0100
|
||||
@@ -316,6 +316,7 @@ wr_hd (struct coff_ofile *p)
|
||||
struct IT_hd hd;
|
||||
|
||||
hd.spare1 = 0;
|
||||
+ hd.spare2 = 0;
|
||||
if (bfd_get_file_flags (abfd) & EXEC_P)
|
||||
hd.mt = MTYPE_ABS_LM;
|
||||
else
|
||||
@ -1,70 +0,0 @@
|
||||
#! /usr/bin/perl
|
||||
# Compare build logs for the testsuite results regressions.
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Data::Dumper;
|
||||
|
||||
my $reverse=shift @ARGV if ($ARGV[0]||"") eq "-r";
|
||||
|
||||
sub readfile($)
|
||||
{
|
||||
my($filename)=@_;
|
||||
|
||||
local *F;
|
||||
open F,$filename or die "open \"$filename\": $!";
|
||||
my $F=do { local $/; <F>; };
|
||||
close F or die "close \"$filename\": $!";
|
||||
return $F;
|
||||
}
|
||||
|
||||
sub writefile($$)
|
||||
{
|
||||
my($filename,$content)=@_;
|
||||
|
||||
local *F;
|
||||
open F,">$filename" or die "create \"$filename\": $!";
|
||||
print F $content or die "write \"$filename\": $!";
|
||||
close F or die "close \"$filename\": $!";
|
||||
}
|
||||
|
||||
local *DIR;
|
||||
opendir DIR,"tests" or die "opendir: $!";
|
||||
my %arch;
|
||||
for my $name (sort readdir(DIR)) {
|
||||
next if $name!~/-([^-]*)[.]log$/o;
|
||||
my $arch=$1;
|
||||
(my $sum=$name)=~s/log$/sum/ or die;
|
||||
my $i=readfile "tests/$name";
|
||||
my $o="";
|
||||
while ($i=~/\n(Native configuration is.*?Summary ===\n.*?\n)make\Q[\E/gs) {
|
||||
$o.=$1;
|
||||
}
|
||||
# Version string differs.
|
||||
$o=~s{/builddir/build/BUILD/binutils-[^/]*/+}{}g;
|
||||
$o=~s{^(Version .*) 20\d{6}$}{$1}mg;
|
||||
$o=~s{^(\Q../as-new\E) 20\d{6}$}{$1}mg;
|
||||
$o=~s{^(build-[^/]*/ld/ld-new) 20\d{6}$}{$1}mg;
|
||||
writefile "tests/$sum",$o;
|
||||
push @{$arch{$arch}},$sum;
|
||||
}
|
||||
closedir DIR or die "closedir: $!";
|
||||
|
||||
for (values(%arch)) {
|
||||
next if 2==@$_;
|
||||
warn "Single element: ".${$_}[0]."\n" if 1==@$_;
|
||||
die "Not 2 elements:\n".Dumper($_) if 1!=@$_;
|
||||
}
|
||||
|
||||
system("rm -f tests/gdbcompare-*.diff") and die;
|
||||
|
||||
for my $arch (sort keys(%arch)) {
|
||||
next if 2!=@{$arch{$arch}};
|
||||
# sub trans { return {"."=>0,"-"=>1}->{($_[0]=~/([-.])[^-.]+[.]\w+$/)[0]}.$_[0]; };
|
||||
sub trans { return $_[0]; };
|
||||
my @sorted=sort { my $a1=trans $a; my $b1=trans $b; ($b1 cmp $a1) * ($reverse ? -1 : +1); } @{$arch{$arch}};
|
||||
do { system $_ and die $_; } for "diff -u tests/'".$sorted[1]."' tests/'".$sorted[0]."' >tests/gdbcompare-'$arch'.sum.diff;true";
|
||||
}
|
||||
|
||||
system("vim tests/gdbcompare-*.sum.diff");
|
||||
14
gating.yaml
14
gating.yaml
@ -1,14 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-fast-lane.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-slow-lane.functional}
|
||||
@ -1,25 +0,0 @@
|
||||
#
|
||||
# Build/PR gating tests for binutils
|
||||
#
|
||||
|
||||
/common:
|
||||
plan:
|
||||
import:
|
||||
url: https://src.fedoraproject.org/tests/binutils.git
|
||||
ref: main
|
||||
name: /plans/build-gating/common
|
||||
|
||||
/kernel-rebuild:
|
||||
plan:
|
||||
import:
|
||||
url: https://src.fedoraproject.org/tests/binutils.git
|
||||
ref: main
|
||||
name: /plans/build-gating/kernel-rebuild
|
||||
|
||||
adjust+:
|
||||
- because: "Plan to be ran when executed locally, or executed by CI system to gate a build or PR."
|
||||
when: >-
|
||||
trigger is defined
|
||||
and trigger != commit
|
||||
and trigger != build
|
||||
enabled: false
|
||||
@ -1,16 +0,0 @@
|
||||
---
|
||||
|
||||
debuginfo:
|
||||
ignore:
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib64/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib64/bfd-plugins/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib64/gprofng/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/bin/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-14/root/usr/lib/bfd-plugins/*.debug
|
||||
|
||||
specname:
|
||||
primary: filename
|
||||
|
||||
unicode:
|
||||
exclude: ^binutils-\d+.\d+\/gas\/testsuite\/gas\/all\/multibyte.s$
|
||||
2
sources
2
sources
@ -1,2 +0,0 @@
|
||||
SHA512 (binutils-2.41.tar.xz) = 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
|
||||
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2
|
||||
Loading…
Reference in New Issue
Block a user