Revert "[PowerPC] Make no-PIC default to match GCC - LLVM"
This reverts commit r347069
llvm-svn: 347076
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index d7eb915..3441039 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -214,7 +214,11 @@
if (TT.isOSDarwin())
return Reloc::DynamicNoPIC;
- // Otherwise is static by default.
+ // Non-darwin 64-bit platforms are PIC by default.
+ if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le)
+ return Reloc::PIC_;
+
+ // 32-bit is static by default.
return Reloc::Static;
}