Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 450180 Details for
Bug 597076
sys-devel/clang-3.9.0 on armv7a-hardfloat-linux-musleabi: wrong dynamic linker name
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Upstream patch
clang-3.9.0-musl.patch (text/plain), 3.85 KB, created by
Felix Janda
on 2016-10-13 21:42:33 UTC
(
hide
)
Description:
Upstream patch
Filename:
MIME Type:
Creator:
Felix Janda
Created:
2016-10-13 21:42:33 UTC
Size:
3.85 KB
patch
obsolete
>From 1812aa02dec992389e1567803b4a18149877bc36 Mon Sep 17 00:00:00 2001 >From: Diana Picus <diana.picus@linaro.org> >Date: Mon, 8 Aug 2016 08:27:36 +0000 >Subject: [PATCH] Fix two bugs for musl-libc on ARM > >Bug 1: triples like armv7-pc-linux-musl use the wrong linker name >ld-musl-armv7.so.1; the right name should be ld-musl-arm.so.1, disregarding the >subarch field. > >Bug 2: when compiler option -mhard-float is used, we should use the "hardfloat" >linker, no matter whether the triple itself mentions "hardfloat". > >Patch by Lei Zhang! > >Differential Revision: https://reviews.llvm.org/D22904 > >git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277985 91177308-0d34-0410-b5e6-96231b3b80d8 >--- > lib/Driver/ToolChains.cpp | 13 +++++++++++-- > test/Driver/linux-ld.c | 12 ++++++++++++ > 2 files changed, 23 insertions(+), 2 deletions(-) > >diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp >index d0477f7..175acd8 100644 >--- a/lib/Driver/ToolChains.cpp >+++ b/lib/Driver/ToolChains.cpp >@@ -4274,19 +4274,28 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { > > if (Triple.isAndroid()) > return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; >- else if (Triple.isMusl()) { >+ >+ if (Triple.isMusl()) { > std::string ArchName; >+ bool IsArm = false; >+ > switch (Arch) { >+ case llvm::Triple::arm: > case llvm::Triple::thumb: > ArchName = "arm"; >+ IsArm = true; > break; >+ case llvm::Triple::armeb: > case llvm::Triple::thumbeb: > ArchName = "armeb"; >+ IsArm = true; > break; > default: > ArchName = Triple.getArchName().str(); > } >- if (Triple.getEnvironment() == llvm::Triple::MuslEABIHF) >+ if (IsArm && >+ (Triple.getEnvironment() == llvm::Triple::MuslEABIHF || >+ tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard)) > ArchName += "hf"; > > return "/lib/ld-musl-" + ArchName + ".so.1"; >diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c >index 87bd55f..60b30dd 100644 >--- a/test/Driver/linux-ld.c >+++ b/test/Driver/linux-ld.c >@@ -1613,24 +1613,36 @@ > // RUN: --target=thumb-pc-linux-musleabihf \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s > // RUN: %clang %s -### -o %t.o 2>&1 \ >+// RUN: --target=thumbv7-pc-linux-musleabi -mhard-float \ >+// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s >+// RUN: %clang %s -### -o %t.o 2>&1 \ > // RUN: --target=thumbeb-pc-linux-musleabi \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s > // RUN: %clang %s -### -o %t.o 2>&1 \ > // RUN: --target=thumbeb-pc-linux-musleabihf \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s > // RUN: %clang %s -### -o %t.o 2>&1 \ >+// RUN: --target=thumbv7eb-pc-linux-musleabi -mhard-float \ >+// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s >+// RUN: %clang %s -### -o %t.o 2>&1 \ > // RUN: --target=arm-pc-linux-musleabi \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s > // RUN: %clang %s -### -o %t.o 2>&1 \ > // RUN: --target=arm-pc-linux-musleabihf \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s > // RUN: %clang %s -### -o %t.o 2>&1 \ >+// RUN: --target=armv7-pc-linux-musleabi -mhard-float \ >+// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s >+// RUN: %clang %s -### -o %t.o 2>&1 \ > // RUN: --target=armeb-pc-linux-musleabi \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s > // RUN: %clang %s -### -o %t.o 2>&1 \ > // RUN: --target=armeb-pc-linux-musleabihf \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s > // RUN: %clang %s -### -o %t.o 2>&1 \ >+// RUN: --target=armv7eb-pc-linux-musleabi -mhard-float \ >+// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s >+// RUN: %clang %s -### -o %t.o 2>&1 \ > // RUN: --target=aarch64-pc-linux-musleabi \ > // RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64 %s > // RUN: %clang %s -### -o %t.o 2>&1 \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 597076
: 450180