Use the appropriate PIE level for OpenBSD/sparc.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp        (revision 238904)
+++ lib/Driver/Tools.cpp        (working copy)
@@ -2883,7 +2883,6 @@
     switch (getToolChain().getTriple().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 @@
       break;
 
     case llvm::Triple::ppc:
+    case llvm::Triple::sparc:
     case llvm::Triple::sparcv9:
       IsPICLevelTwo = true; // "-fPIE"
       break;
Index: test/Driver/pic.c
===================================================================
--- test/Driver/pic.c   (revision 238904)
+++ test/Driver/pic.c   (working copy)
@@ -220,6 +220,8 @@
 // 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 \
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to