Bug#729933: clang-3.4: multiarch include path incorrect when cross-compiling

Shawn Landden shawnlandden at gmail.com
Thu Nov 28 21:10:23 UTC 2013


my compiled clang from git HEAD uses the right path, so you just have
to find the patch to backport, and for this package, upgrade to latest
HEAD.

On Mon, Nov 18, 2013 at 5:12 PM, Shawn Landden <shawnlandden at gmail.com> wrote:
> Package: clang-3.4
> Version: 1:3.4~svn194079-1
> Severity: important
>
> When cross compiling (-target $triplet), clang uses the multiarch include
> path of the host rather than that of the target:
>
> $ clang -v -target arm-linux-gnueabihf bc.c -o bc
> Debian clang version 3.4-1 (trunk) (based on LLVM 3.4)
> Target: arm--linux-gnueabihf
> Thread model: posix
> Found candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8
> Found candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2
> Found candidate GCC installation: /usr/lib/gcc/arm-linux-gnueabihf/4.8
> Found candidate GCC installation: /usr/lib/gcc/arm-linux-gnueabihf/4.8.2
> Selected GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8
>  "/usr/bin/clang" -cc1 -triple armv6--linux-gnueabihf -S -disable-free -disable-llvm-verifier -main-file-name bc.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -mconstructor-aliases -fuse-init-array -target-cpu arm1136jf-s -target-abi aapcs-linux -mfloat-abi hard -target-linker-version 2.23.90.20131017 -v -resource-dir /usr/bin/../lib/clang/3.4 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.4/include -internal-isystem /usr/include/clang/3.4/include/ -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include -fno-dwarf-directory-asm -fdebug-compilation-dir /home/shawn/git/util -ferror-limit 19 -fmessage-length 113 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /tmp/bc-8438b1.s -x c bc.c
> clang -cc1 version 3.4 based upon LLVM 3.4 default target x86_64-pc-linux-gnu
> ignoring nonexistent directory "/usr/bin/../lib/clang/3.4/include"
> ignoring duplicate directory "/usr/include/x86_64-linux-gnu"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/local/include
>  /usr/include/clang/3.4/include
>  /usr/include/x86_64-linux-gnu <------------########################
>  /usr/include
> End of search list.
>  "/usr/bin/arm-linux-gnueabihf-as" -mfloat-abi=hard -o /tmp/bc-6d8b0f.o /tmp/bc-8438b1.s
>  "/usr/bin/arm-linux-gnueabihf-ld" -X --hash-style=both --build-id --eh-frame-hdr -m armelf_linux_eabi -dynamic-linker /lib/ld-linux-armhf.so.3 -o bc /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/../../../arm-linux-gnueabihf/crt1.o /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/../../../arm-linux-gnueabihf/crti.o /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/crtbegin.o -L/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8 -L/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/../../../arm-linux-gnueabihf -L/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/../../../../lib -L/lib/arm-linux-gnueabihf -L/lib/../lib -L/usr/lib/arm-linux-gnueabihf -L/usr/lib/../lib -L/usr/lib/arm-linux-gnueabihf/../../lib -L/usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/../../.. -L/lib -L/usr/lib /tmp/bc-6d8b0f.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/crtend.o /usr/bin/../lib/gcc/arm-linux-gnueabihf/4.8/../../../arm-linux-gnueabihf/crtn.o
>
>
> -- System Information:
> Debian Release: jessie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> armhf
>
> Kernel: Linux 3.12.0+ (SMP w/2 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages clang-3.4 depends on:
> ii  libc6                    2.17-96
> ii  libclang-common-3.4-dev  1:3.4~svn194079-1
> ii  libclang1-3.4            1:3.4~svn194079-1
> ii  libffi6                  3.0.13-4
> ii  libgcc-4.8-dev           4.8.2-4
> ii  libgcc1                  1:4.8.2-4
> ii  libllvm3.4               1:3.4~svn194079-1
> ii  libobjc-4.8-dev          4.8.2-4
> ii  libstdc++-4.8-dev        4.8.2-4
> ii  libstdc++6               4.8.2-4
> ii  libtinfo5                5.9+20130608-1
>
> Versions of packages clang-3.4 recommends:
> ii  llvm-3.4-dev  1:3.4~svn194079-1
> ii  python        2.7.5-5
>
> clang-3.4 suggests no packages.
>
> -- no debconf information



-- 

---
Shawn Landden
+1 360 389 3001 (SMS preferred)



More information about the Pkg-llvm-team mailing list