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

    <tr>
        <th>Summary</th>
        <td>
            libc: fails to build with `g++: error: unrecognized command-line option '--print-resource-dir'`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            build-problem,
            libc
      </td>
    </tr>

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

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

<pre>
    Not sure what caused it. Maybe #117220  by @nickdesaulniers 
```
-- Looking for logf128 - found
-- Targeting M68k
-- Targeting Xtensa
-- Targeting AArch64
-- Setting LIBC_NAMESPACE namespace to '__llvm_libc_20_0_0_'
g++: error: unrecognized command-line option '--print-resource-dir'; did you mean '--print-search-dirs'?
g++: fatal error: no input files
compilation terminated.
-- Set COMPILER_RESOURCE_DIR to /usr/lib/gcc/aarch64-linux-gnu/10/ using --print-search-dirs
-- Building libc for aarch64 on linux with
        LIBC_COMPILE_OPTIONS_DEFAULT: 
-- LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR: ON
```

Regression range 356df2dd72e8..1e7171f692d0
Fails log:
https://llvm-jenkins.debian.net/job/llvm-toolchain-bullseye-binaries/architecture=arm64,distribution=bullseye,label=arm64/1608/console

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVE1vszgX_TXOxiIyJkC6YEE-eFW9bVIleaTZIWNfwK2xI3_0mcyvH5mmU7Wa5YAX5nLu9b3nHGDOyUEDVCjfoHy3YMGPxlbupt7BeQuLzohbdTAeu2AB_x6Zx5wFBwJLv8TP7NYBRjRL05JSgnF3w2hFtORvAhwLSkuwDiNSo4LcF6mTBD8Z8yb1gHtjsTJDn9I1TnBvghYfgAuzA_gIeS7Wbz9jf3jQjv2M1rXlY7H6CJ_Bz8Gnx822PdTP-_NLvd1jzSZwV8YBe4MRLdtWqfepVbLjLSVtvB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