From a88987d654f1170ee9231ac1b2494216e0fa09cc Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Sat, 9 Aug 2014 19:01:52 +0000 Subject: [PATCH] Use the correct fallback directory for EABIHF targets on NetBSD/arm. From Matt Thomas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215292 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains.cpp | 6 ++++-- test/Driver/netbsd.c | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 56bf1b4303..5395b85d88 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -2590,11 +2590,13 @@ NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) case llvm::Triple::thumbeb: switch (Triple.getEnvironment()) { case llvm::Triple::EABI: - case llvm::Triple::EABIHF: case llvm::Triple::GNUEABI: - case llvm::Triple::GNUEABIHF: getFilePaths().push_back("=/usr/lib/eabi"); break; + case llvm::Triple::EABIHF: + case llvm::Triple::GNUEABIHF: + getFilePaths().push_back("=/usr/lib/eabihf"); + break; default: getFilePaths().push_back("=/usr/lib/oabi"); break; diff --git a/test/Driver/netbsd.c b/test/Driver/netbsd.c index d32666c0cc..014bb5ff13 100644 --- a/test/Driver/netbsd.c +++ b/test/Driver/netbsd.c @@ -19,6 +19,9 @@ // RUN: %clang -no-canonical-prefixes -target arm--netbsd \ // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \ // RUN: | FileCheck -check-prefix=ARM-APCS %s +// RUN: %clang -no-canonical-prefixes -target arm--netbsd-eabihf \ +// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \ +// RUN: | FileCheck -check-prefix=ARM-HF %s // RUN: %clang -no-canonical-prefixes -target thumb--netbsd-eabi \ // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \ // RUN: | FileCheck -check-prefix=THUMB %s @@ -28,9 +31,6 @@ // RUN: %clang -no-canonical-prefixes -target arm--netbsd6.0.0-eabi \ // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \ // RUN: | FileCheck -check-prefix=ARM-6 %s -// RUN: %clang -no-canonical-prefixes -target arm--netbsd-eabihf \ -// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \ -// RUN: | FileCheck -check-prefix=ARM-HF %s // RUN: %clang -no-canonical-prefixes -target sparc--netbsd \ // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \ // RUN: | FileCheck -check-prefix=SPARC %s @@ -123,6 +123,15 @@ // ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc" // ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o" +// ARM-HF: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabihf" +// ARM-HF: as{{.*}}" "-mcpu=arm926ej-s" "-o" +// ARM-HF: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so" +// ARM-HF: "-m" "armelf_nbsd_eabihf" +// ARM-HF: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" +// ARM-HF: "{{.*}}/usr/lib{{/|\\\\}}eabihf{{/|\\\\}}crti.o" +// ARM-HF: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc" +// ARM-HF: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o" + // THUMB: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabi" // THUMB: as{{.*}}" "-mcpu=arm926ej-s" "-o" // THUMB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so" @@ -148,9 +157,6 @@ // ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc" // ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o" -// ARM-HF: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabihf" -// ARM-HF: ld{{.*}}" "-m" "armelf_nbsd_eabihf" - // SPARC: clang{{.*}}" "-cc1" "-triple" "sparc--netbsd" // SPARC: as{{.*}}" "-32" "-o" // SPARC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so" -- 2.40.0