Skip to content
Snippets Groups Projects
Commit c3deccbb authored by Brad Smith's avatar Brad Smith
Browse files

Add/update PIE defaults for OpenBSD.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299269 91177308-0d34-0410-b5e6-96231b3b80d8
parent 81c8c1c8
No related branches found
No related tags found
No related merge requests found
......@@ -737,9 +737,10 @@ tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {
// OpenBSD-specific defaults for PIE
if (Triple.getOS() == llvm::Triple::OpenBSD) {
switch (ToolChain.getArch()) {
case llvm::Triple::arm:
case llvm::Triple::aarch64:
case llvm::Triple::mips64:
case llvm::Triple::mips64el:
case llvm::Triple::sparcel:
case llvm::Triple::x86:
case llvm::Triple::x86_64:
IsPICLevelTwo = false; // "-fpie"
......@@ -747,6 +748,7 @@ tools::ParsePICArgs(const ToolChain &ToolChain, const ArgList &Args) {
case llvm::Triple::ppc:
case llvm::Triple::sparc:
case llvm::Triple::sparcel:
case llvm::Triple::sparcv9:
IsPICLevelTwo = true; // "-fPIE"
break;
......
......@@ -227,6 +227,10 @@
// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
// RUN: %clang -c %s -target i386-pc-openbsd -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
// RUN: %clang -c %s -target aarch64-unknown-openbsd -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
// RUN: %clang -c %s -target arm-unknown-openbsd -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
// RUN: %clang -c %s -target mips64-unknown-openbsd -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
// RUN: %clang -c %s -target mips64el-unknown-openbsd -### 2>&1 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment