[PATCH] D107672: [AVR][clang] Search for avr-libc in $SYSROOT/avr
Ben Shi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 6 23:51:07 PDT 2021
benshi001 added a comment.
In D107672#2932442 <https://reviews.llvm.org/D107672#2932442>, @mhjacobson wrote:
> 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?
I think so. It would be better to search avr-libc relatively from `avr-gcc/../../../`, and have submit it as https://reviews.llvm.org/D107682.
@mhjacobson, could you please check if it work on your platform? It does work on my ubuntu system.
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