https://sourceware.org/bugzilla/show_bug.cgi?id=31289

            Bug ID: 31289
           Summary: --fatal-warnings doesn't work for command-line options
           Product: binutils
           Version: 2.43 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

For example:

    $ ld.bfd -z bad-option --fatal-warnings -e 0/dev/null
    ld.bfd: warning: -z bad-option ignored
    $ echo $?
    0

ie the warning about the ignored option is not being treated as an
error.  This happens because the --fatal-warnings option only takes
affect after it has been processed, and we process the options in a
linear order.  So the following works:

    $ ld.bfd --fatal-warnings -z bad-option -e 0 /dev/null
    ld.bfd: warning: -z bad-option ignored
    $ echo $?
    1

This behaviour differs from gold and lld, both of which honour
--fatal-warnings no matter where it occurs on the command line.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to