[PATCH] D53384: [PowerPC] Make no-PIC default to match GCC - CLANG

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 06:30:44 PDT 2018


stefanp updated this revision to Diff 170400.
stefanp added a comment.

Test cases updated.


https://reviews.llvm.org/D53384

Files:
  lib/Driver/ToolChains/Gnu.cpp
  test/Driver/clang-offload-bundler.c
  test/Driver/ppc-abi.c
  test/Driver/print-multi-directory.c


Index: test/Driver/print-multi-directory.c
===================================================================
--- test/Driver/print-multi-directory.c
+++ test/Driver/print-multi-directory.c
@@ -4,7 +4,7 @@
 // RUN:     -print-multi-directory \
 // RUN:   | FileCheck --match-full-lines --check-prefix=CHECK-X86-MULTILIBS %s
 
-// CHECK-X86-MULTILIBS:      32
+// CHECK-X86-MULTILIBS:      .
 // CHECK-X86-MULTILIBS-NOT:  {{^.+$}}
 
 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>/dev/null \
Index: test/Driver/ppc-abi.c
===================================================================
--- test/Driver/ppc-abi.c
+++ test/Driver/ppc-abi.c
@@ -24,10 +24,10 @@
 // RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
 // RUN:   -mabi=altivec | FileCheck -check-prefix=CHECK-ELFv2 %s
 
-// CHECK-ELFv1: "-mrelocation-model" "pic" "-pic-level" "2"
+// CHECK-ELFv1: "-mrelocation-model" "static"
 // CHECK-ELFv1: "-target-abi" "elfv1"
-// CHECK-ELFv1-QPX: "-mrelocation-model" "pic" "-pic-level" "2"
+// CHECK-ELFv1-QPX: "-mrelocation-model" "static"
 // CHECK-ELFv1-QPX: "-target-abi" "elfv1-qpx"
-// CHECK-ELFv2: "-mrelocation-model" "pic" "-pic-level" "2"
+// CHECK-ELFv2: "-mrelocation-model" "static"
 // CHECK-ELFv2: "-target-abi" "elfv2"
 
Index: test/Driver/clang-offload-bundler.c
===================================================================
--- test/Driver/clang-offload-bundler.c
+++ test/Driver/clang-offload-bundler.c
@@ -115,7 +115,7 @@
 // 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 = global i32 0
+// CK-TEXTLL: @A = dso_local 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: lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- lib/Driver/ToolChains/Gnu.cpp
+++ lib/Driver/ToolChains/Gnu.cpp
@@ -2370,7 +2370,7 @@
     return getTriple().isOSWindows();
   case llvm::Triple::ppc64:
   case llvm::Triple::ppc64le:
-    return !getTriple().isOSBinFormatMachO() && !getTriple().isMacOSX();
+    return getTriple().isOSFreeBSD();
   case llvm::Triple::mips64:
   case llvm::Triple::mips64el:
     return true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53384.170400.patch
Type: text/x-patch
Size: 2414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181022/a00018a6/attachment.bin>


More information about the llvm-commits mailing list