diff options
author | Nick Clifton <nickc@redhat.com> | 2024-12-09 13:13:38 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2024-12-09 13:13:38 +0000 |
commit | edd8e9d6c36b08ff89d0c2345015191cf26e8de4 (patch) | |
tree | 4ef2c96a90fc75e9252707cf5d3045833529a3c5 /ld | |
parent | d9df3857da0cef29ed9c0ef75f90700c5f392986 (diff) | |
download | binutils-edd8e9d6c36b08ff89d0c2345015191cf26e8de4.zip binutils-edd8e9d6c36b08ff89d0c2345015191cf26e8de4.tar.gz binutils-edd8e9d6c36b08ff89d0c2345015191cf26e8de4.tar.bz2 |
Add linker diagnostic message about missing static libraries
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ldfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index f1107a1..050f505 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -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) |