forked from OSchip/llvm-project
Default to Secure PLT on PPC for musl libc.
This matches the default settings of clang. llvm-svn: 364675
This commit is contained in:
parent
d900ef0a5b
commit
4b733ca617
|
@ -145,7 +145,8 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
|||
if (isDarwin())
|
||||
HasLazyResolverStubs = true;
|
||||
|
||||
if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD())
|
||||
if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() ||
|
||||
TargetTriple.isMusl())
|
||||
SecurePlt = true;
|
||||
|
||||
if (HasSPE && IsPPC64)
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
; 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
|
||||
; RUN: llc < %s -mtriple=powerpc-linux-musl -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
||||
; RUN: llc < %s -mtriple=powerpc-linux-musl -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
|
||||
@bar = common global i32 0, align 4
|
||||
|
||||
declare i32 @call_foo(i32, ...)
|
||||
|
|
Loading…
Reference in New Issue