<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60889>60889</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            LLD rejects RISC-V .o from current gcc due to unrecognised extension versions in build attributes
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld,
            backend:RISC-V,
            regression
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          asb
      </td>
    </tr>
</table>

<pre>
    As discussed in [this post](https://discourse.llvm.org/t/rfc-resolving-issues-related-to-extension-versioning-in-risc-v/68472/1), the change of LLD to use RISCVISAInfo to parse build attributes had the unintended effect of rejecting any .o file with unrecognised extension names or extension versions. This is in practical terms a regression for anyone combining object files from GCC (using a newer -misa-spec) by default with LLVM.

The candidate patch to address this is [D144353](https://reviews.llvm.org/D144353).

Tracking in an issue as the hope is to cherry-pick the agreed fix (_hopefully_ we can get it in 16.0.0 if not too late and the patch is sufficiently non-invasive, failing that we'd queue it directly for 16.0.1).

Note: I know this isn't so much a 'backend' issue but the backend:RISC-V label is the only way we have to label something as RISC-V specific.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VE1v4zgM_TXyhXDgyHY-Dj6kDbIo0N3DzqDXgSzRtraylBWpZPLvF3LazkyxAwQxIFHke4-PVER29IidaB9EeyxU4inETlFf9MHcugOBsaQTERqwHkT7wJMlOAdi0R6F3E3MZxL1QciTkKccHFIkXDl3mVchjkKeWMhTHHQZkYK7WD-WlighlRGdYjQlhxK_M3qywZcXjPm7hPkyWtLlRcjTZtdspZCntZB7IR-BJwQ9KT8ihAGen4_AARIh_P305fHl6cvhyQ8hn51VJIQ-WWdAMUfbJ0aCSZklR_LWM3qDBnAYUHNOF_Ef1Gz9CMrfYBVgsA7hanmC5CPqMHqbFflADV7NSBDiT0dvRGgFX7Nk-efhHJVmq5UDxjgTKIg4RqTlx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