]> granicus.if.org Git - clang/commitdiff
Revert "[PowerPC] Make no-PIC default to match GCC - CLANG"
authorStefan Pintilie <stefanp@ca.ibm.com>
Tue, 11 Dec 2018 15:47:57 +0000 (15:47 +0000)
committerStefan Pintilie <stefanp@ca.ibm.com>
Tue, 11 Dec 2018 15:47:57 +0000 (15:47 +0000)
This reverts commit rL348299.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348858 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Gnu.cpp
test/Driver/clang-offload-bundler.c
test/Driver/ppc-abi.c

index 67d55f41b29e51a0363cbba4c5d1971cadae0987..cb775f56f6d6a3d7e0ccb07e8d68d63062d3f0db 100644 (file)
@@ -2435,7 +2435,7 @@ bool Generic_GCC::isPICDefault() const {
   case llvm::Triple::x86_64:
     return getTriple().isOSWindows();
   case llvm::Triple::ppc64:
-    // Big endian PPC is PIC by default
+  case llvm::Triple::ppc64le:
     return !getTriple().isOSBinFormatMachO() && !getTriple().isMacOSX();
   case llvm::Triple::mips64:
   case llvm::Triple::mips64el:
index 15092dd1277818271314e870da036a9f21e8a76c..adf13f59d46f14eb1404b042773bca23b662aa63 100644 (file)
 // CK-TEXTI: // __CLANG_OFFLOAD_BUNDLE____END__ openmp-x86_64-pc-linux-gnu
 
 // CK-TEXTLL: ; __CLANG_OFFLOAD_BUNDLE____START__ host-powerpc64le-ibm-linux-gnu
-// CK-TEXTLL: @A = dso_local global i32 0
+// CK-TEXTLL: @A = global i32 0
 // CK-TEXTLL: define {{.*}}@test_func()
 // CK-TEXTLL: ; __CLANG_OFFLOAD_BUNDLE____END__ host-powerpc64le-ibm-linux-gnu
 // CK-TEXTLL: ; __CLANG_OFFLOAD_BUNDLE____START__ openmp-powerpc64le-ibm-linux-gnu
index a82a01de2781ec26072f39bfa78e72ae472845cf..cebc90d3f99aeb097c090023f12114a7b322a6bf 100644 (file)
 // RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
 // RUN:   -mcpu=a2q -mno-qpx | FileCheck -check-prefix=CHECK-ELFv1 %s
 // RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2-BE %s
+// RUN:   -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2 %s
 
 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-ELFv2 %s
 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1-LE %s
+// RUN:   -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1 %s
 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
 // RUN:   -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2 %s
 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
 
 // CHECK-ELFv1: "-mrelocation-model" "pic" "-pic-level" "2"
 // CHECK-ELFv1: "-target-abi" "elfv1"
-// CHECK-ELFv1-LE: "-mrelocation-model" "static"
-// CHECK-ELFv1-LE: "-target-abi" "elfv1"
 // CHECK-ELFv1-QPX: "-mrelocation-model" "pic" "-pic-level" "2"
 // CHECK-ELFv1-QPX: "-target-abi" "elfv1-qpx"
-// CHECK-ELFv2: "-mrelocation-model" "static"
+// CHECK-ELFv2: "-mrelocation-model" "pic" "-pic-level" "2"
 // CHECK-ELFv2: "-target-abi" "elfv2"
-// CHECK-ELFv2-BE: "-mrelocation-model" "pic" "-pic-level" "2"
-// CHECK-ELFv2-BE: "-target-abi" "elfv2"
-
-// RUN: %clang -fPIC -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHECK-ELFv1-PIC %s
-// RUN: %clang -fPIC -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1-PIC %s
-// RUN: %clang -fPIC -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=elfv1-qpx | FileCheck -check-prefix=CHECK-ELFv1-QPX-PIC %s
-// RUN: %clang -fPIC -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mcpu=a2q | FileCheck -check-prefix=CHECK-ELFv1-QPX-PIC %s
-// RUN: %clang -fPIC -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mcpu=a2 -mqpx | FileCheck -check-prefix=CHECK-ELFv1-QPX-PIC %s
-// RUN: %clang -fPIC -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mcpu=a2q -mno-qpx | FileCheck -check-prefix=CHECK-ELFv1-PIC %s
-// RUN: %clang -fPIC -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2-PIC %s
-
-// RUN: %clang -fPIC -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   | FileCheck -check-prefix=CHECK-ELFv2-PIC %s
-// RUN: %clang -fPIC -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1-PIC %s
-// RUN: %clang -fPIC -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2-PIC %s
-// RUN: %clang -fPIC -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
-// RUN:   -mabi=altivec | FileCheck -check-prefix=CHECK-ELFv2-PIC %s
-
-// CHECK-ELFv1-PIC: "-mrelocation-model" "pic" "-pic-level" "2"
-// CHECK-ELFv1-PIC: "-target-abi" "elfv1"
-// CHECK-ELFv1-QPX-PIC: "-mrelocation-model" "pic" "-pic-level" "2"
-// CHECK-ELFv1-QPX-PIC: "-target-abi" "elfv1-qpx"
-// CHECK-ELFv2-PIC: "-mrelocation-model" "pic" "-pic-level" "2"
-// CHECK-ELFv2-PIC: "-target-abi" "elfv2"
-