diff --git a/binutils-linker-diagnostic-message.patch b/binutils-linker-diagnostic-message.patch new file mode 100644 index 0000000..7d42eba --- /dev/null +++ b/binutils-linker-diagnostic-message.patch @@ -0,0 +1,20 @@ +From edd8e9d6c36b08ff89d0c2345015191cf26e8de4 Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Mon, 9 Dec 2024 13:13:38 +0000 +Subject: [PATCH] Add linker diagnostic message about missing static libraries + +--- binutils.orig/ld/ldfile.c 2025-01-06 12:07:44.535653316 +0000 ++++ binutils-2.35.2/ld/ldfile.c 2025-01-06 12:55:36.693479042 +0000 +@@ -464,6 +464,12 @@ ldfile_open_file (lang_input_statement_t + else + einfo (_("%P: cannot find %s\n"), entry->local_sym_name); + ++ /* Be kind to users who are creating static executables, but ++ have forgotten to install the necessary static libraries. */ ++ if (entry->flags.dynamic == FALSE && strncmp (entry->local_sym_name, "-l", 2) == 0) ++ einfo (_("%P: have you installed the static version of the %s library ?\n"), ++ entry->local_sym_name + 2); ++ + /* PR 25747: Be kind to users who forgot to add the + "lib" prefix to their library when it was created. */ + for (arch = search_arch_head; arch != NULL; arch = arch->next) diff --git a/binutils.spec b/binutils.spec index 61e1cf3..29a7291 100644 --- a/binutils.spec +++ b/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?_with_debug:-debug} Version: 2.35.2 -Release: 59%{?dist} +Release: 60%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -502,6 +502,10 @@ Patch88: binutils-s390-arch15-15.patch Patch89: binutils-s390-arch15-16.patch Patch90: binutils-s390-arch15-gas-tests-fixes.patch +# Purpose: Add linker diagnostic message for missing static libraries +# Lifetime: Fixed in 2.44 +Patch91: binutils-linker-diagnostic-message.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -1361,6 +1365,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Mon Jan 06 2025 Nick Clifton - 2.35.2-60 +- Add a helpful linker diagnostic message about missing static libraries. (RHEL-69758) + * Thu Dec 12 2024 Nick Clifton - 2.35.2-59 - Fix assembler testsuite problems with new s390 tests. (RHEL-50068)