[PATCH] ld: Improve --fatal-warnings for unknown command-line options
H.J. Lu
hjl.tools@gmail.com
Thu Jan 25 13:41:45 GMT 2024
On Thu, Jan 25, 2024 at 3:32 AM Nick Clifton <nickc@redhat.com> wrote:
>
> Hi H.J.
>
> Thanks for taking this problem on. When I qrote my RFC I had
> not expected anyone to care that much...
>
> >>> This patch queues unknown command-line option warnings and outputs queued
> >>> command-line option warnings after all command-line options have been
> >>> processed so that --fatal-warnings can work for unknown command-line
> >>> options regardless of the order of --fatal-warnings.
> >>>
> >>> When --fatal-warnings is used, the linker message is changed from
> >>>
> >>> ld: warning: -z bad-option ignored
> >>>
> >>> to
> >>>
> >>> ld: error: unsupported option: -z bad-option
> >>>
> >>> The above also applies to "-z dynamic-undefined-weak" when the known
> >>> "-z dynamic-undefined-weak" option is ignored.
>
> Patch approved - with the change suggested by Fangrui:
Here is the patch I am checking. I renamed pr31289-*.d to
fatal-warnings-*.d.
> >> Thanks for the patch. For newer tests, I wonder whether a descriptive
> >> short name (in this case, fatal-warnings-*[ab].s) would be more
> >> suitable than PR<number>.
>
> Cheers
> Nick
>
>
>
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ld-Improve-fatal-warnings-for-unknown-command-line-o.patch
Type: text/x-patch
Size: 10682 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20240125/ced40547/attachment.bin>
More information about the Binutils
mailing list