<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56192>56192</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[MIPS][LLD] -mno-abicalls is ignored for LTO
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vit9696
</td>
</tr>
</table>
<pre>
For 2 empty files (t.c and k.S) do the following:
```
clang -target mips-linux-gnu -c -flto -mno-abicalls t.c -o t.o
clang -target mips-linux-gnu -c -flto -mno-abicalls k.S -o k.o
clang -target mips-linux-gnu -flto -mno-abicalls -nostdlib -fuse-ld=lld t.o k.o -o t
```
The following warnings will be generated:
```
ld.lld: warning: lto.tmp: linking abicalls code with non-abicalls code k.o
ld.lld: warning: cannot find entry symbol __start; not setting start address
```
The problematic one is the `ld.lld: warning: lto.tmp: linking abicalls code with non-abicalls code k.o`. The assembly code is correctly generated without ABI calls. However, LTO code apparently is generated with ABI calls despite `-mno-abicalls` argument present.
Is it a bug or shall one disable mno-abicalls anyhow differently?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytU01v2zAM_TX2hbChyrUXH3xoFxQr0GED2nshW7SjVZYMSW6Wfz9KWT8yBNswDDAkUhQfH5_o3spDd2MdcMB5CQcYlUYPGd-EcgBhJDyV9xlvQVoIO4TRam33ykxZdZWxbcZe1ob9_JI7aGEmKIJwEwaY1eILrcz6vZjMCsUAxaiDhWI2thC9GoTWHmLBgqqU9t8xiGzEePorjLMIhbE-SK16iq4eCy2zaqu1jLwibqJ4tufj-vBeJNgLZ2j3sFdaQ48woUEnAsrf66dlqWPlqxeEaBLZMsxLMpV5ivivtAcrkYqEHRhritPjVzXOog7CGBvo3emt0QR3AH-Ye6vh8dGTbiGrriFe8BhCLJkOQUjp0Ps_CLE422ucRVADWIOgfBoiuvnfG2xYCbGk8B7nXh-OERVvOIdDoJNX7ROOXQNcXd9Cwinhk93jM7qMf4S7hy_HbLEswpEmlEtAp-lvuSDRLyqktk5miXygwVtngiAp0NNevpfo1oMiKaFfJ6Bf0O8oK-kklRckHJxMpjCHnd1TbBzxyCqrbnLZVbKtWpEHFTR2WX39-fbrfVZvybq7o3X7y4BTJ2oy1lEfIxWlZvPV6W4XwuLjUPIb-ibqcO3Lwc7kaP38shX0ot9ITXKV9yt6MurmouX5rtuMrN5cVpXkfd0wlFwKrBn_IOuhFy3WuRY9ah8pZpwb3EOCIJtI5qrjjHPW8IqzC1a1Zd0P7Qb5hlWCtayusktGk6R0GXmU1k256xIlUs9TUCsf_FuQ5oDaxKRIxBcrPbnrnlVom7bJU-kuUf8B_degmA">