r191951 - Revert r191947. The problem is not MIPS-specific and requires more
Simon Atanasyan
simon at atanasyan.com
Fri Oct 4 04:46:54 PDT 2013
Author: atanasyan
Date: Fri Oct 4 06:46:54 2013
New Revision: 191951
URL: http://llvm.org/viewvc/llvm-project?rev=191951&view=rev
Log:
Revert r191947. The problem is not MIPS-specific and requires more
general solution.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/pic.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=191951&r1=191950&r2=191951&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Oct 4 06:46:54 2013
@@ -2139,13 +2139,7 @@ void Clang::ConstructJob(Compilation &C,
if (KernelOrKext &&
(!Triple.isiOS() || Triple.isOSVersionLT(6)))
PIC = PIE = false;
- // Usually '-static' implies no-PIC. But for MIPS '-fPIC -static' means
- // to compile as -fPIC but link with -static.
- if (Args.hasArg(options::OPT_static) &&
- getToolChain().getArch() != llvm::Triple::mips &&
- getToolChain().getArch() != llvm::Triple::mipsel &&
- getToolChain().getArch() != llvm::Triple::mips64 &&
- getToolChain().getArch() != llvm::Triple::mips64el)
+ if (Args.hasArg(options::OPT_static))
PIC = PIE = false;
if (Arg *A = Args.getLastArg(options::OPT_mdynamic_no_pic)) {
Modified: cfe/trunk/test/Driver/pic.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/pic.c?rev=191951&r1=191950&r2=191951&view=diff
==============================================================================
--- cfe/trunk/test/Driver/pic.c (original)
+++ cfe/trunk/test/Driver/pic.c Fri Oct 4 06:46:54 2013
@@ -209,13 +209,3 @@
// On OpenBSD, -nopie needs to be passed through to the linker.
// RUN: %clang %s -target i386-pc-openbsd -nopie -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-NOPIE-LD
-//
-// For MIPS -fPIC -static means to compile as -fPIC but link with -static.
-// RUN: %clang -c %s -target mips-linux-gnu -fpic -static -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
-// RUN: %clang -c %s -target mips-linux-gnu -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
-// RUN: %clang -c %s -target mips-linux-gnu -fpic -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
-// RUN: %clang -c %s -target mips-linux-gnu -static -### 2>&1 \
-// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
More information about the cfe-commits
mailing list