[PATCH] D42972: Look for 32-bit libraries in /usr/lib32 for MIPS O32 on FreeBSD.
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 12 14:26:34 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC324948: Look for 32-bit libraries in /usr/lib32 for MIPS O32 on FreeBSD. (authored by jhb, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D42972?vs=133330&id=133935#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42972
Files:
lib/Driver/ToolChains/FreeBSD.cpp
test/Driver/freebsd.c
Index: lib/Driver/ToolChains/FreeBSD.cpp
===================================================================
--- lib/Driver/ToolChains/FreeBSD.cpp
+++ lib/Driver/ToolChains/FreeBSD.cpp
@@ -317,6 +317,8 @@
// When targeting 32-bit platforms, look for '/usr/lib32/crt1.o' and fall
// back to '/usr/lib' if it doesn't exist.
if ((Triple.getArch() == llvm::Triple::x86 ||
+ Triple.getArch() == llvm::Triple::mips ||
+ Triple.getArch() == llvm::Triple::mipsel ||
Triple.getArch() == llvm::Triple::ppc) &&
D.getVFS().exists(getDriver().SysRoot + "/usr/lib32/crt1.o"))
getFilePaths().push_back(getDriver().SysRoot + "/usr/lib32");
Index: test/Driver/freebsd.c
===================================================================
--- test/Driver/freebsd.c
+++ test/Driver/freebsd.c
@@ -36,6 +36,12 @@
// RUN: | FileCheck --check-prefix=CHECK-LIB32PATHS %s
// CHECK-LIB32PATHS: libraries: ={{.*:?}}/usr/lib32
//
+// Check that O32 MIPS uses /usr/lib32 on a 64-bit tree.
+//
+// RUN: %clang -target mips-freebsd12 %s \
+// RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -print-search-dirs 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-LIB32PATHS %s
+//
// Check that the new linker flags are passed to FreeBSD
// RUN: %clang -no-canonical-prefixes -target x86_64-pc-freebsd8 -m32 %s \
// RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -### 2>&1 \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42972.133935.patch
Type: text/x-patch
Size: 1400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180212/d9f49312/attachment.bin>
More information about the cfe-commits
mailing list