r299269 - Add/update PIE defaults for OpenBSD.
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 31 15:13:18 PDT 2017
Author: brad
Date: Fri Mar 31 17:13:17 2017
New Revision: 299269
URL: http://llvm.org/viewvc/llvm-project?rev=299269&view=rev
Log:
Add/update PIE defaults for OpenBSD.
Modified:
cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
cfe/trunk/test/Driver/pic.c
Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=299269&r1=299268&r2=299269&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp Fri Mar 31 17:13:17 2017
@@ -737,9 +737,10 @@ tools::ParsePICArgs(const ToolChain &Too
// 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 &Too
case llvm::Triple::ppc:
case llvm::Triple::sparc:
+ case llvm::Triple::sparcel:
case llvm::Triple::sparcv9:
IsPICLevelTwo = true; // "-fPIE"
break;
Modified: cfe/trunk/test/Driver/pic.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/pic.c?rev=299269&r1=299268&r2=299269&view=diff
==============================================================================
--- cfe/trunk/test/Driver/pic.c (original)
+++ cfe/trunk/test/Driver/pic.c Fri Mar 31 17:13:17 2017
@@ -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 \
More information about the cfe-commits
mailing list