<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62582>62582</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
dumpconfig is not matching the release
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
thorsten-klein
</td>
</tr>
</table>
<pre>
Hello,
I am using release [clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz](https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz)
If I run `clang -dumpmachine` I get `x86_64-unknown-linux-gnu`.
Additionally also a folder `lib/x86_64-unknown-linux-gnu` is existing.
I would expect it to be `lib/x86_64-linux-gnu` instead.
The issue I face with that: The directory is by default specified in `ld` command:
```
ld -L/bin/../lib/x86_64-unknown-linux-gnu
```
Cmake is taking the CMAKE_LIBRARY_ARCHITECTURE from the first `-L` directory of the linker command.
As a result CMAKE_LIBRARY_ARCHITECTURE will always be `x86_64-unknown-linux-gnu` when using clang (instead of `x86_64-linux-gnu` on Ubuntu). cmake's `find_library` will not find libraries anymore which are placed under `/usr/lib/x86_64-linux-gnu`.
PS: I have also commented [here](https://discourse.llvm.org/t/building-opencl-kernel-with-clang-15/67611)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE1v4zYQ_TX0ZSCBoizFPujgfAhrNAWKNHvoKaDIkcSaIg1-rOP--oKS0nS3QYAuYNAQhpx5M-_N496rwSA2pLol1f2GxzBa16TDBzTZSaMym87Ka_MFtbaE3RF6T-jhCHyC6JUZwKFG7hFIdSs0NwNht1p_m7KizmlOs9dd_VJvM61MfM0GE7PYRRNiVuxyus0Dd_nrX6S6J2w3hnD2pDwQ1hLWDiqMscuFnQhrU8L1Lzs7-yeKQFi7VvaEtdJejLZcrpesG9b6hLU_jYrtl2bXlns4gosGSE3nlJDJOJ0nLkZlkNQUjjBgSOE1ezQnYy_mvQqpab4kO0ipgrKGa30Frr0FDr3VEl16r1VHWPtJFlAe8FX5oMyQwxslFxu1BHw9owigAgQLHf4n3_d5jA_IZf7vRpfzeURQ3keEI_RcIFxUGCGMPJDyACkqlUMRrLsmNN0VJPY86gD-jEL1CiWoeVhapkrCThM3MvG7VKnp-ps_tYTskbC2U4awNs8TkZ9P4aMsdxM_JdgQ-ClpM4wId78efnl4eTzePh2e_ng5PN19OT4_3D1_fXqA3tlpvtMr52fmsseE9b0z289xrcwJ3VsPbxM_eODg0KemP6lyUVoD1xd-9SsfnzF7GdGsm7WojLDdylJC8_76u1fWwNdZwYTtcxBpDITd-HS9V0a-aNU57q5zgQTH2AApAEtAoQdurpN1CJdRiRG4QzhrLlBCNKssCWujdz8y84G6l_O335NSjjDyb7hoPM0PTUCZzGJEhx8tvlRe2Og85mlhc-sGwtq07l1UWiozZPaMRujshM6gzpIus3lUWVER1tY3dVH8sLsb2ZRyX-75Bpui3pXlnhU39WZs6FbyfSWqbi-woj3nFZYdCtYXXUl3u3KjGkZZSStaF3VVF3W-7faMCtnv6U0vd5KRLcWJK_0P2s28NU3Nqh3baN6h9rO9MmbwsqwUYSy5rWtmS-ri4MmWauWDf88SVNDYJIcR1vRqSKpOrE08JMNZtL064CY63fxv-5yhJPOcof4dAAD___rK6vA">