summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Driver/Tools.cpp8
-rw-r--r--clang/test/Driver/pic.c10
2 files changed, 1 insertions, 17 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index d2ca9fb8df1..2f824cbcad7 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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)) {
diff --git a/clang/test/Driver/pic.c b/clang/test/Driver/pic.c
index 7bf514caa30..30e1005c973 100644
--- a/clang/test/Driver/pic.c
+++ b/clang/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
OpenPOWER on IntegriCloud