libllvm: fix system library path for i686 added by clang

This commit is contained in:
Butta 2021-11-07 08:21:52 +05:30 committed by buttaface
parent 35de6d8d85
commit 6f8c30816e
2 changed files with 12 additions and 1 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Modular compiler and toolchain technologies library"
TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_MAINTAINER="@buttaface"
TERMUX_PKG_VERSION=13.0.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SHA256=6075ad30f1ac0e15f07c1bf062c1e1268c241d674f11bd32cdf0e040c71f2bf3
TERMUX_PKG_SRCURL=https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/llvm-project-$TERMUX_PKG_VERSION.src.tar.xz
TERMUX_PKG_HOSTBUILD=true

View File

@ -1,5 +1,16 @@
--- a/clang/lib/Driver/ToolChains/Linux.cpp 2019-12-21 22:30:03.676720096 +0000
+++ b/clang/lib/Driver/ToolChains/Linux.cpp 2019-12-21 22:34:42.941719383 +0000
@@ -162,8 +162,8 @@ static StringRef getOSLibDir(const llvm::Triple &Triple, const ArgList &Args) {
// FIXME: This is a bit of a hack. We should really unify this code for
// reasoning about oslibdir spellings with the lib dir spellings in the
// GCCInstallationDetector, but that is a more significant refactoring.
- if (Triple.getArch() == llvm::Triple::x86 || Triple.isPPC32() ||
- Triple.getArch() == llvm::Triple::sparc)
+ if (!Triple.isAndroid() && (Triple.getArch() == llvm::Triple::x86 || Triple.isPPC32() ||
+ Triple.getArch() == llvm::Triple::sparc))
return "lib32";
if (Triple.getArch() == llvm::Triple::x86_64 && Triple.isX32())
@@ -403,7 +403,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
if (Triple.getVendor() == llvm::Triple::OpenEmbedded &&
Triple.isArch64Bit())