Browse files

Revert r191947. The problem is not MIPS-specific and requires more

general solution.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191951 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
1 parent 8a5fb99 commit c0e83640ae656c76170b1389a5d72f440b1a7749 @atanasyan atanasyan committed Oct 4, 2013
Showing with 1 addition and 17 deletions.
  1. +1 −7 lib/Driver/Tools.cpp
  2. +0 −10 test/Driver/pic.c
View
8 lib/Driver/Tools.cpp
@@ -2139,13 +2139,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
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)) {
View
10 test/Driver/pic.c
@@ -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

0 comments on commit c0e8364

Please sign in to comment.