* [PATCH] ld: Always call output_unknown_cmdline_warning
@ 2024-01-25 15:43 H.J. Lu
2024-01-25 17:26 ` H.J. Lu
0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2024-01-25 15:43 UTC (permalink / raw)
To: binutils; +Cc: nickc
Call output_unknown_cmdline_warning if there are no input files so that
$ ld -z bad-option
reports
ld: warning: -z bad-option ignored
ld: no input files
instead of
ld: no input files
PR ld/31289
* ldmain.c (main): Call output_unknown_cmdline_warning if there
are no input files.
---
ld/ldmain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 3b4ad144a2f..9ae541a5d82 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -471,6 +471,7 @@ main (int argc, char **argv)
{
if (version_printed || command_line.print_output_format)
xexit (0);
+ output_unknown_cmdline_warnings ();
einfo (_("%F%P: no input files\n"));
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ld: Always call output_unknown_cmdline_warning
2024-01-25 15:43 [PATCH] ld: Always call output_unknown_cmdline_warning H.J. Lu
@ 2024-01-25 17:26 ` H.J. Lu
0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2024-01-25 17:26 UTC (permalink / raw)
To: binutils; +Cc: nickc
On Thu, Jan 25, 2024 at 7:43 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Call output_unknown_cmdline_warning if there are no input files so that
>
> $ ld -z bad-option
>
> reports
>
> ld: warning: -z bad-option ignored
> ld: no input files
>
> instead of
>
> ld: no input files
>
> PR ld/31289
> * ldmain.c (main): Call output_unknown_cmdline_warning if there
> are no input files.
> ---
> ld/ldmain.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ld/ldmain.c b/ld/ldmain.c
> index 3b4ad144a2f..9ae541a5d82 100644
> --- a/ld/ldmain.c
> +++ b/ld/ldmain.c
> @@ -471,6 +471,7 @@ main (int argc, char **argv)
> {
> if (version_printed || command_line.print_output_format)
> xexit (0);
> + output_unknown_cmdline_warnings ();
> einfo (_("%F%P: no input files\n"));
> }
>
> --
> 2.43.0
>
I am checking in this.
--
H.J.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-25 17:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 15:43 [PATCH] ld: Always call output_unknown_cmdline_warning H.J. Lu
2024-01-25 17:26 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).