From 83a33c0cd72453141e065cd84e536f04a4a419b7 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Thu, 6 Feb 2014 21:04:32 +0000 Subject: [PATCH] Use correct ld emulation for EABI hardware float triple on NetBSD. llvm-svn: 200946 --- clang/lib/Driver/Tools.cpp | 6 ++++-- clang/test/Driver/netbsd.c | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 6885f2410f2f..d0bcabf21541 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -6144,11 +6144,13 @@ void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-m"); switch (getToolChain().getTriple().getEnvironment()) { case llvm::Triple::EABI: - case llvm::Triple::EABIHF: case llvm::Triple::GNUEABI: - case llvm::Triple::GNUEABIHF: CmdArgs.push_back("armelf_nbsd_eabi"); break; + case llvm::Triple::EABIHF: + case llvm::Triple::GNUEABIHF: + CmdArgs.push_back("armelf_nbsd_eabihf"); + break; default: CmdArgs.push_back("armelf_nbsd"); break; diff --git a/clang/test/Driver/netbsd.c b/clang/test/Driver/netbsd.c index 05350e608e3b..45bd90d344f8 100644 --- a/clang/test/Driver/netbsd.c +++ b/clang/test/Driver/netbsd.c @@ -25,6 +25,9 @@ // 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 x86_64--netbsd -static \ // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \ @@ -113,6 +116,9 @@ // ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc" // ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o" +// ARM-HF: clang{{.*}}" "-cc1" "-triple" "armv4t--netbsd-eabihf" +// ARM-HF: ld{{.*}}" "-m" "armelf_nbsd_eabihf" + // S-X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd" // S-X86_64: ld{{.*}}" "-Bstatic" // S-X86_64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"