diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2013-10-04 10:36:42 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2013-10-04 10:36:42 +0000 |
| commit | 777669be1ec712ef5311bbf3caf96b43690d6868 (patch) | |
| tree | b605065ca90cabb9149e766bc8c9664e5b60a508 /clang/test | |
| parent | 513a3a6c0bac16172fb3b9549f32b4a00d9e5b72 (diff) | |
| download | bcm5719-llvm-777669be1ec712ef5311bbf3caf96b43690d6868.tar.gz bcm5719-llvm-777669be1ec712ef5311bbf3caf96b43690d6868.zip | |
[Mips] For MIPS '-fPIC -static' means to compile as -fPIC but link with
-static. So do not turn off the PIC flag if -static passed to the
driver in case of MIPS target.
http://llvm.org/bugs/show_bug.cgi?id=14693
llvm-svn: 191947
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/pic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Driver/pic.c b/clang/test/Driver/pic.c index 30e1005c973..7bf514caa30 100644 --- a/clang/test/Driver/pic.c +++ b/clang/test/Driver/pic.c @@ -209,3 +209,13 @@ // 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 |

