Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 597076
Collapse All | Expand All

(-)a/lib/Driver/ToolChains.cpp (-2 / +11 lines)
Lines 4274-4292 std::string Linux::getDynamicLinker(const ArgList &Args) const { Link Here
4274
4274
4275
  if (Triple.isAndroid())
4275
  if (Triple.isAndroid())
4276
    return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker";
4276
    return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker";
4277
  else if (Triple.isMusl()) {
4277
4278
  if (Triple.isMusl()) {
4278
    std::string ArchName;
4279
    std::string ArchName;
4280
    bool IsArm = false;
4281
4279
    switch (Arch) {
4282
    switch (Arch) {
4283
    case llvm::Triple::arm:
4280
    case llvm::Triple::thumb:
4284
    case llvm::Triple::thumb:
4281
      ArchName = "arm";
4285
      ArchName = "arm";
4286
      IsArm = true;
4282
      break;
4287
      break;
4288
    case llvm::Triple::armeb:
4283
    case llvm::Triple::thumbeb:
4289
    case llvm::Triple::thumbeb:
4284
      ArchName = "armeb";
4290
      ArchName = "armeb";
4291
      IsArm = true;
4285
      break;
4292
      break;
4286
    default:
4293
    default:
4287
      ArchName = Triple.getArchName().str();
4294
      ArchName = Triple.getArchName().str();
4288
    }
4295
    }
4289
    if (Triple.getEnvironment() == llvm::Triple::MuslEABIHF)
4296
    if (IsArm &&
4297
        (Triple.getEnvironment() == llvm::Triple::MuslEABIHF ||
4298
         tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard))
4290
      ArchName += "hf";
4299
      ArchName += "hf";
4291
4300
4292
    return "/lib/ld-musl-" + ArchName + ".so.1";
4301
    return "/lib/ld-musl-" + ArchName + ".so.1";
(-)a/test/Driver/linux-ld.c (+12 lines)
Lines 1613-1636 Link Here
1613
// RUN:     --target=thumb-pc-linux-musleabihf \
1613
// RUN:     --target=thumb-pc-linux-musleabihf \
1614
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
1614
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
1615
// RUN: %clang %s -### -o %t.o 2>&1 \
1615
// RUN: %clang %s -### -o %t.o 2>&1 \
1616
// RUN:     --target=thumbv7-pc-linux-musleabi -mhard-float \
1617
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
1618
// RUN: %clang %s -### -o %t.o 2>&1 \
1616
// RUN:     --target=thumbeb-pc-linux-musleabi \
1619
// RUN:     --target=thumbeb-pc-linux-musleabi \
1617
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s
1620
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s
1618
// RUN: %clang %s -### -o %t.o 2>&1 \
1621
// RUN: %clang %s -### -o %t.o 2>&1 \
1619
// RUN:     --target=thumbeb-pc-linux-musleabihf \
1622
// RUN:     --target=thumbeb-pc-linux-musleabihf \
1620
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
1623
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
1621
// RUN: %clang %s -### -o %t.o 2>&1 \
1624
// RUN: %clang %s -### -o %t.o 2>&1 \
1625
// RUN:     --target=thumbv7eb-pc-linux-musleabi -mhard-float \
1626
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
1627
// RUN: %clang %s -### -o %t.o 2>&1 \
1622
// RUN:     --target=arm-pc-linux-musleabi \
1628
// RUN:     --target=arm-pc-linux-musleabi \
1623
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARM %s
1629
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARM %s
1624
// RUN: %clang %s -### -o %t.o 2>&1 \
1630
// RUN: %clang %s -### -o %t.o 2>&1 \
1625
// RUN:     --target=arm-pc-linux-musleabihf \
1631
// RUN:     --target=arm-pc-linux-musleabihf \
1626
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
1632
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
1627
// RUN: %clang %s -### -o %t.o 2>&1 \
1633
// RUN: %clang %s -### -o %t.o 2>&1 \
1634
// RUN:     --target=armv7-pc-linux-musleabi -mhard-float \
1635
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s
1636
// RUN: %clang %s -### -o %t.o 2>&1 \
1628
// RUN:     --target=armeb-pc-linux-musleabi \
1637
// RUN:     --target=armeb-pc-linux-musleabi \
1629
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s
1638
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s
1630
// RUN: %clang %s -### -o %t.o 2>&1 \
1639
// RUN: %clang %s -### -o %t.o 2>&1 \
1631
// RUN:     --target=armeb-pc-linux-musleabihf \
1640
// RUN:     --target=armeb-pc-linux-musleabihf \
1632
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
1641
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
1633
// RUN: %clang %s -### -o %t.o 2>&1 \
1642
// RUN: %clang %s -### -o %t.o 2>&1 \
1643
// RUN:     --target=armv7eb-pc-linux-musleabi -mhard-float \
1644
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s
1645
// RUN: %clang %s -### -o %t.o 2>&1 \
1634
// RUN:     --target=aarch64-pc-linux-musleabi \
1646
// RUN:     --target=aarch64-pc-linux-musleabi \
1635
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-AARCH64 %s
1647
// RUN:   | FileCheck --check-prefix=CHECK-MUSL-AARCH64 %s
1636
// RUN: %clang %s -### -o %t.o 2>&1 \
1648
// RUN: %clang %s -### -o %t.o 2>&1 \

Return to bug 597076