mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-30 15:10:30 +00:00
Default to Secure PLT on PPC for NetBSD and OpenBSD.
This matches the default settings of clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355038 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f13cc1e220
commit
83855d225b
@ -138,6 +138,9 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
|||||||
if (isDarwin())
|
if (isDarwin())
|
||||||
HasLazyResolverStubs = true;
|
HasLazyResolverStubs = true;
|
||||||
|
|
||||||
|
if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD())
|
||||||
|
SecurePlt = true;
|
||||||
|
|
||||||
if (HasSPE && IsPPC64)
|
if (HasSPE && IsPPC64)
|
||||||
report_fatal_error( "SPE is only supported for 32-bit targets.\n", false);
|
report_fatal_error( "SPE is only supported for 32-bit targets.\n", false);
|
||||||
if (HasSPE && (HasAltivec || HasQPX || HasVSX || HasFPU))
|
if (HasSPE && (HasAltivec || HasQPX || HasVSX || HasFPU))
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -relocation-model=pic | FileCheck -check-prefix=LARGE-BSS %s
|
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -relocation-model=pic | FileCheck -check-prefix=LARGE-BSS %s
|
||||||
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
||||||
|
; RUN: llc < %s -mtriple=powerpc-unknown-netbsd -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
||||||
|
; RUN: llc < %s -mtriple=powerpc-unknown-netbsd -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
||||||
|
; RUN: llc < %s -mtriple=powerpc-unknown-openbsd -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
||||||
|
; RUN: llc < %s -mtriple=powerpc-unknown-openbsd -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
||||||
@bar = common global i32 0, align 4
|
@bar = common global i32 0, align 4
|
||||||
|
|
||||||
declare i32 @call_foo(i32, ...)
|
declare i32 @call_foo(i32, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user