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

    <tr>
        <th>Summary</th>
        <td>
            clang/llvm-19.1.0 do not follow symlinks
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    I'm using clang/llvm on TinyCore/piCore linux.

The distro works with squashfs packages that are loop mounted and symlinked to the root filesystem.

Up until at least clang/llvm-15 things worked although occasionally llvm-config had to be a real file rather than a symlink.

Now with clang/llvm-19.1.0 things no longer work and most, if not all, of clang/llvm have to be real files or compiling with clang will fail with the compiler unable to find cstddef and a bunch of other gcc headers. This is true for at least x86_64 and armv7l and probably also for x86 and aarch64.

As TinyCore/piCore run in RAM, being obliged to use the actual files from large packages, rather than symlinks to squashfs, negates the whole idea of the distro.

Is it possible to reverse whatever changed in terms of following symlinks between clang/llvm-15 to clang/llvm-19?

Ref below, with symlinked clang the gcc installation is not found.

```
clang -v
clang version 19.1.0
Target: armv7l-unknown-linux-gnueabihf
Thread model: posix
InstalledDir: /usr/local/bin
Build config: +assertions
System configuration file directory: /usr/local/etc/clang
Found candidate GCC installation: /usr/local/bin/../lib/gcc/armv7l-unknown-linux-gnueabihf/13.2.0
Selected GCC installation: /usr/local/bin/../lib/gcc/armv7l-unknown-linux-gnueabihf/13.2.0
Candidate multilib: .;@m32
Selected multilib: .;@m32
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VU1v4zYQ_TXyZRBBpmwrPujgZKFiD-1hNz0XI3IkcUNxXH7Y8b8vKMlOvE3bW4EgEOXhm_ce31Dove4tUZ1tn7LtlxXGMLCrf0S0OnCQq5bVpf6aiWqE6LXtQRq0fSYaY04jsIUXbS_P7CgTzVGnBzDaxrc8K75kxWH-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