<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/76570>76570</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
bulding bug in clang cc1: error: unknown value 'cortex-a77.cortex-a55' for '-mcpu'
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
AlirezaParsi
</td>
</tr>
</table>
<pre>
when i try to build my kernel with clang arm64 (native build)(version=16 , 17 and 18 i got this error :
`
cc1: error: unknown value 'cortex-a77.cortex-a55' for '-mcpu'
cc1: note: valid arguments are: cortex-a34 cortex-a35 cortex-a53 cortex-a57 cortex-a72 cortex-a73 thunderx thunderxt88p1 thunderxt88 octeontx octeontx81 octeontx83 thunderxt81 thunderxt83 ampere1 ampere1a emag xgene1 falkor qdf24xx exynos-m1 phecda thunderx2t99p1 vulcan thunderx2t99 cortex-a55 cortex-a75 cortex-a76 cortex-a76ae cortex-a77 cortex-a78 cortex-a78ae cortex-a78c cortex-a65 cortex-a65ae cortex-x1 cortex-x1c ares neoverse-n1 neoverse-e1 octeontx2 octeontx2t98 octeontx2t96 octeontx2t93 octeontx2f95 octeontx2f95n octeontx2f95mm a64fx tsv110 thunderx3t110 zeus neoverse-v1 neoverse-512tvb saphira cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 cortex-a76.cortex-a55 cortex-r82 cortex-a510 cortex-a710 cortex-a715 cortex-x2 cortex-x3 neoverse-n2 demeter neoverse-v2 generic; did you mean 'cortex-a75.cortex-a55'?`
i dont have this problem with x86 clangs also my build script is like this :
`
1 │ #/bin/bash
2 │ export ARCH=arm64
3 │ export SUBARCH=ARM64
4 │ export KBUILD_BUILD_HOST=Ubuntu
5 │ export KBUILD_BUILD_USER="Aliza"
6 │ #export CFLAGS=-march=native
7 │ make O=./out mrproper vendor/alioth_defconfig cc=clang
8 │ make O=./out -j$(nproc --all) cc=clang`
im sure this is clang bug not my kernel and my method because i build 4 different kernels with this clang and this method.
more detail :
![image](https://github.com/llvm/llvm-project/assets/29276037/b15a8cb1-72c4-41ec-a60e-875ef9a0db22)
Ubuntu clang version 16.0.6 (15)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Ubuntu clang version 17.0.6 (++20231208085918+6009708b4367-1~exp1~20231208090013.44)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Ubuntu clang version 18.0.0 (++20231228083416+9e439a353918-1~exp1~20231228203527.218)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVk2P2zgS_TX0pSCBH_o8-GDH8SbYLLJIp88BJZUtpiVSS1KOOof89oVstSQnvRsMMMDMhXpFvSqwyMcqSufUWSNuSbwn8WEje18bu901yuJ3-W9pndoUpnrefqtRgwJvn8EbKHrVVNA-wxNajQ18U76GspH6DNK2SQSEZ1p6dcEblfCc8OyC1imjiTiwBAh_AywFqStgGSg4Gw--Vg7QWmOBiB2hB0J3JKE3UJaMiN3t9wh6_aTNNw0X2fQIhKelsR6HQKZp-ALjmPAUTmM8ngZt2fWEp3fhtPE4fi-yURVIe-5b1N6BtNfpl0AiWmA8w1gsMJ1hyhcowNe9rtAOM_BZ1rG1Bab0aLQfZpCxBYoVde0mQLYdWmQvXwnYyjMMZ9TI4CSbJ2PhP9WJR8MAODxr44KWQVdjWck5EPd53jG49E0p9d3sktqScLqCyQpKXIzVRmQruKZk5YyTeAUXzsAWVI6H4UCjGQWEgWYLxmWn-IJ8nq2NZG2IxTjl8Z2h76y2BZlEpwG8uzBG570RfrS-Y79a0mW1pJhxfynAya5WVq4EEr4im5S_OivCV9S2ml1z4_C1g0pembXZosyY0YV8h2f6MLMHsdp9DhW26NGu0ucwqs6qkog9VKqCZ9NDi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