[OpenEmbedded] Fix lib paths for OpenEmbedded targets
authorMandeep Singh Grang <mgrang@codeaurora.org>
Mon, 30 Jul 2018 19:44:13 +0000 (19:44 +0000)
committerMandeep Singh Grang <mgrang@codeaurora.org>
Mon, 30 Jul 2018 19:44:13 +0000 (19:44 +0000)
commite9ddc44a604318739a27249d267aa7267d13d93b
tree2b9f67751a0a2e420fcbb56b1135577e54a57fd3
parentf78650a8deca216b858827ff430972c114a60a7a
[OpenEmbedded] Fix lib paths for OpenEmbedded targets

Summary:
The lib paths are not correctly picked up for OpenEmbedded sysroots (like arm-oe-linux-gnueabi) for 2 reasons:

1. OpenEmbedded sysroots are of the form <sysroot>/usr/lib/<triple>/x.y.z. This form is handled in clang but only for Freescale vendor.

2. 64-bit OpenEmbedded sysroots may not have a /usr/lib dir. So they cannot find /usr/lib64 as it is referenced as /usr/lib/../lib64 in clang.

This is a follow-up to the llvm patch: D48861

Reviewers: dlj, rengolin, fedor.sergeev, javed.absar, hfinkel, rsmith

Reviewed By: rsmith

Subscribers: rsmith, kristof.beyls, cfe-commits

Differential Revision: https://reviews.llvm.org/D48862

llvm-svn: 338294
16 files changed:
clang/lib/Driver/ToolChains/Gnu.cpp
clang/lib/Driver/ToolChains/Linux.cpp
clang/test/Driver/Inputs/openembedded_aarch64_linux_tree/usr/include/c++/6.3.0/backward/.keep [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_aarch64_linux_tree/usr/lib64/aarch64-oe-linux/6.3.0/crtbegin.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_aarch64_linux_tree/usr/lib64/aarch64-oe-linux/6.3.0/crtend.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_aarch64_linux_tree/usr/lib64/crt1.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_aarch64_linux_tree/usr/lib64/crti.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_aarch64_linux_tree/usr/lib64/crtn.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_arm_linux_tree/usr/include/c++/6.3.0/backward/.keep [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_arm_linux_tree/usr/lib/arm-oe-linux-gnueabi/6.3.0/crtbegin.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_arm_linux_tree/usr/lib/arm-oe-linux-gnueabi/6.3.0/crtend.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_arm_linux_tree/usr/lib/crt1.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_arm_linux_tree/usr/lib/crti.o [new file with mode: 0644]
clang/test/Driver/Inputs/openembedded_arm_linux_tree/usr/lib/crtn.o [new file with mode: 0644]
clang/test/Driver/linux-header-search.cpp
clang/test/Driver/linux-ld.c