]> granicus.if.org Git - clang/commitdiff
Use the appropriate PIE level for OpenBSD/sparc.
authorBrad Smith <brad@comstyle.com>
Thu, 4 Jun 2015 08:45:23 +0000 (08:45 +0000)
committerBrad Smith <brad@comstyle.com>
Thu, 4 Jun 2015 08:45:23 +0000 (08:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239028 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Driver/pic.c

index aee35c69badbd6ae6cc63d166b149e2c2f089d5b..3218d117b587f1e3642ae64531d911d8bb88fc10 100644 (file)
@@ -2883,7 +2883,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     switch (getToolChain().getArch()) {
     case llvm::Triple::mips64:
     case llvm::Triple::mips64el:
-    case llvm::Triple::sparc:
     case llvm::Triple::sparcel:
     case llvm::Triple::x86:
     case llvm::Triple::x86_64:
@@ -2891,6 +2890,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       break;
 
     case llvm::Triple::ppc:
+    case llvm::Triple::sparc:
     case llvm::Triple::sparcv9:
       IsPICLevelTwo = true; // "-fPIE"
       break;
index 3a14d61cf1c6533f99c6c1e178abb1402a4a1cc5..a515f8117a1d0b1f69bd1df975d5cccb0b437880 100644 (file)
 // RUN:   | FileCheck %s --check-prefix=CHECK-PIE1
 // RUN: %clang -c %s -target powerpc-unknown-openbsd -### 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=CHECK-PIE2
+// RUN: %clang -c %s -target sparc-unknown-openbsd -### 2>&1 \
+// RUN:   | FileCheck %s --check-prefix=CHECK-PIE2
 // RUN: %clang -c %s -target sparc64-unknown-openbsd -### 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=CHECK-PIE2
 // RUN: %clang -c %s -target i386-pc-openbsd -fno-pie -### 2>&1 \