https://bugs.llvm.org/show_bug.cgi?id=33847
Bug ID: 33847
Summary: Clang fails to properly find the gcc installation when
cross-compiling
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Driver
Assignee: unassignedclangb...@nondot.org
Reporter: jacekswi...@gmail.com
CC: llvm-bugs@lists.llvm.org
Files like crtbegin.o and libgcc.a cannot be found by clang 5.0 while it worked
just fine for clang 4.0 and older releases. Using the following command fails
with clang from trunk with the message indicating missing crtbegin and libgcc:
clang -mthumb -mfloat-abi=hard -mfpu=neon-vfpv4 -mcpu=cortex-a15
--target=arm-poky-linux-gnueabi --gcc-toolchain=<target_sysroot>/usr
--sysroot=<target_sysroot> -B<native_sysroot>/usr/bin/arm-poky-linux-gnueabi
test.c -v
I can see that there is some issue with finding gcc toolchain as the verbose
output is missing few lines:
```
Found candidate GCC installation:
<target_sysroot>/usr/lib/gcc/arm-poky-linux-gnueabi/5.4.0
```
The same command works with older clangs and give verbose output:
```
Found candidate GCC installation:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/5.4.0
Found candidate GCC installation:
<target_sysroot>/usr/lib/gcc/arm-poky-linux-gnueabi/5.4.0
Selected GCC installation:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/5.4.0
Candidate multilib: .;@m32
Selected multilib: .;@m32
```
Adding -print-search-dirs gives similar results - clang 5.0:
```
programs: =
<llvm-5.0>/bin:
/..//bin
libraries: =
<llvm-5.0>/lib/clang/5.0.0:
<target_sysroot>/lib/../lib:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi:
<target_sysroot>/usr/lib/../lib:
<target_sysroot>/lib:
<target_sysroot>/usr/lib
```
and clang 4.0:
```
programs: =
<llvm-4.0>/bin:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/5.4.0/../../../arm-poky-linux-gnueabi/bin
libraries: =
<llvm-4.0>/bin/../lib/clang/4.0.1:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/5.4.0:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/5.4.0/../../arm-poky-linux-gnueabi:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/5.4.0/../../../lib:
<target_sysroot>/lib/../lib:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi:
<target_sysroot>/usr/lib/../lib:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/../../lib:
<target_sysroot>/usr/lib/arm-poky-linux-gnueabi/5.4.0/../..:
<target_sysroot>/lib:
<target_sysroot>/usr/lib
```
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs