summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/cloudabi.c
diff options
context:
space:
mode:
authorEd Schouten <ed@nuxi.nl>2016-08-11 20:03:22 +0000
committerEd Schouten <ed@nuxi.nl>2016-08-11 20:03:22 +0000
commit610adaeec4557013b441960dc6ba1b6a72c1d337 (patch)
treeea411136a261d92b6c72c25d39d42043c190e403 /clang/test/Driver/cloudabi.c
parent38eea4a76f015d6ee7afdb3a7a02ac6789104815 (diff)
downloadbcm5719-llvm-610adaeec4557013b441960dc6ba1b6a72c1d337.tar.gz
bcm5719-llvm-610adaeec4557013b441960dc6ba1b6a72c1d337.zip
Don't enable PIE on i686-unknown-cloudabi.
We're only going to provide support for using PIE on architectures that provide PC-relative addressing. i686 is not one of those, so add the necessary bits for only passing in -pie -zrelro conditionally. llvm-svn: 278395
Diffstat (limited to 'clang/test/Driver/cloudabi.c')
-rw-r--r--clang/test/Driver/cloudabi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/Driver/cloudabi.c b/clang/test/Driver/cloudabi.c
index 7a72f618951..053092a53d4 100644
--- a/clang/test/Driver/cloudabi.c
+++ b/clang/test/Driver/cloudabi.c
@@ -1,8 +1,14 @@
// RUN: %clang %s -### -target x86_64-unknown-cloudabi 2>&1 | FileCheck %s -check-prefix=SAFESTACK
// SAFESTACK: "-cc1" "-triple" "x86_64-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections" {{.*}} "-fsanitize=safe-stack"
-// SAFESTACK: "-Bstatic" "-pie" "--no-dynamic-linker" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
+// SAFESTACK: "-Bstatic" "--no-dynamic-linker" "-pie" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
// RUN: %clang %s -### -target x86_64-unknown-cloudabi -fno-sanitize=safe-stack 2>&1 | FileCheck %s -check-prefix=NOSAFESTACK
// NOSAFESTACK: "-cc1" "-triple" "x86_64-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections"
// NOSAFESTACK-NOT: "-fsanitize=safe-stack"
-// NOSAFESTACK: "-Bstatic" "-pie" "--no-dynamic-linker" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
+// NOSAFESTACK: "-Bstatic" "--no-dynamic-linker" "-pie" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
+
+// PIE shouldn't be enabled on i686. Just on architectures that provide
+// PC-relative addressing.
+// RUN: %clang %s -### -target i686-unknown-cloudabi 2>&1 | FileCheck %s -check-prefix=NOPIE
+// NOPIE: "-cc1" "-triple" "i686-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections" {{.*}} "-fsanitize=safe-stack"
+// NOPIE: "-Bstatic" "--no-dynamic-linker" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
OpenPOWER on IntegriCloud