[PATCH] D107672: [AVR][clang] Search for avr-libc in $SYSROOT/avr

Matt Jacobson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 6 20:12:30 PDT 2021


mhjacobson added a comment.

In D107672#2932413 <https://reviews.llvm.org/D107672#2932413>, @mhjacobson wrote:

> At first glance, I think you're right: avr-gcc does expect avr-libc to be relative to itself.  That seems slightly weird to me (since avr-libc is technically separate from GCC), but OK.

OK, after looking at the GCC source, I see there's nothing specific to avr-libc.  It's just that GCC basically tries to look in `$PREFIX/[machine/]lib`, where `$PREFIX` is actually the path to GCC, dot-dotted up to where it thinks the prefix lives, to allow for the possibility that the whole prefix was relocated.

So, @MaskRay, correct me if I'm wrong: it seems like you're suggesting that we use something derived from the `GCCInstallationDetector` to find libc?  Is there another platform's driver I can look at as an example?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107672/new/

https://reviews.llvm.org/D107672



More information about the cfe-commits mailing list