]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add linker diagnostic message about missing static libraries
authorNick Clifton <nickc@redhat.com>
Mon, 9 Dec 2024 13:13:38 +0000 (13:13 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 9 Dec 2024 13:13:38 +0000 (13:13 +0000)
ld/ldfile.c

index f1107a1b7d793a51ea7f6f7a6b492db518992bf4..050f505c31e54c36c84a4dd69ff7874b27216126 100644 (file)
@@ -711,6 +711,12 @@ ldfile_open_file (lang_input_statement_type *entry)
          else
            einfo (_("%P: cannot find %s: %E\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 && startswith (entry->local_sym_name, "-l"))
+           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)