[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 19:35:21 PDT 2021
mhjacobson added a comment.
In D107672#2932406 <https://reviews.llvm.org/D107672#2932406>, @MaskRay wrote:
> I know nearly nothing about AVR, but from `avr-gcc a.c '-###'` I doubt this is the GCC behavior. GCC's library path is relative to the GCC installation. `/usr/lib/gcc/avr/5.4.0/../../../avr/lib`
>
> There is a difference between sysroot inferred path and GCC installation inferred path. https://maskray.me/blog/2021-03-28-compiler-driver-and-cross-compilation
Wow, nice write-up! I'll have to spend some more time to digest it fully.
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.
clang's driver certainly searches for libgcc and avr-libc separately. I guess you're saying it shouldn't?
Obviously the separate searching isn't something introduced here, so (unless you object) I'll file a bug report about it.
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