From 8181ff0ece70c55f2e6e5887f73f9977a983bb8e Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 25 Feb 2014 18:45:49 +0000 Subject: [PATCH] Pass the sparc architecture variant to the assembler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202179 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 5 +++++ test/Driver/freebsd.c | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 7167fcce56..58c2578114 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -5972,6 +5972,11 @@ void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA, } } else if (getToolChain().getArch() == llvm::Triple::sparc || getToolChain().getArch() == llvm::Triple::sparcv9) { + if (getToolChain().getArch() == llvm::Triple::sparc) + CmdArgs.push_back("-Av8plusa"); + else + CmdArgs.push_back("-Av9a"); + addAssemblerKPIC(Args, CmdArgs); } diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c index 00ef5df0fa..4b45d055ed 100644 --- a/test/Driver/freebsd.c +++ b/test/Driver/freebsd.c @@ -128,3 +128,4 @@ // RUN: %clang -mcpu=ultrasparc -target sparc64-unknown-freebsd8 %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-SPARC-CPU %s // CHECK-SPARC-CPU: cc1{{.*}}" "-target-cpu" "ultrasparc" +// CHECK-SPARC-CPU: as{{.*}}" "-Av9a -- 2.40.0