[PATCH] ld: Improve --fatal-warnings for unknown command-line options

Nick Clifton nickc@redhat.com
Thu Jan 25 11:32:22 GMT 2024
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:

>> 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





More information about the Binutils mailing list