From 907a0cadb2c807d86d3150f2397e6697ba4676df Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 7 Jan 2020 14:21:39 -0800 Subject: [PowerPC] Default ppc64 linux-gnu/freebsd to -fno-PIC According to D53384, the default was switched from -fno-PIC to -fPIC to work around a -fsanitize=leak bug on big-endian. This gratuitous difference between little-endian and big-endian is undesired, and not acceptable on powerpc64-unknown-freebsd. If -fsanitize=leak still has the problem, we should consider defaulting to -fPIC/-fPIE only when -fsanitize=leak is specified (see SanitizerArgs::requiresPIE()) powerpc64-ibm-aix is unaffected: it still defaults to -fPIC. powerpc64-linux-musl is unaffected (-fPIE since D39588): it still defaults to -fPIE. Reviewed By: #powerpc, jhibbits Differential Revision: https://reviews.llvm.org/D72363 --- clang/lib/Driver/ToolChains/Gnu.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'clang/lib/Driver/ToolChains/Gnu.cpp') diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index 91076709fd7..da197e47662 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2615,9 +2615,6 @@ bool Generic_GCC::isPICDefault() const { switch (getArch()) { case llvm::Triple::x86_64: return getTriple().isOSWindows(); - case llvm::Triple::ppc64: - // Big endian PPC is PIC by default - return !getTriple().isOSBinFormatMachO() && !getTriple().isMacOSX(); case llvm::Triple::mips64: case llvm::Triple::mips64el: return true; -- cgit v1.2.3