aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/doc/sourcebuild.texi3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pie-link.c2
-rw-r--r--gcc/testsuite/lib/target-supports.exp10
5 files changed, 23 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dc2e04a..aeab479 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * doc/sourcebuild.texi (Effective-Target Keywords, pie): Document it.
+
2011-06-10 Hans-Peter Nilsson <hp@axis.com>
* ira-costs.c: Remove #ifdefs on dead FORBIDDEN_INC_DEC_CLASSES.
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 64210c2..d2cc4ea 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1787,6 +1787,9 @@ Target defines @code{PCC_BITFIELD_TYPE_MATTERS}.
@item pe_aligned_commons
Target supports @option{-mpe-aligned-commons}.
+@item pie
+Target supports @option{-pie}, @option{-fpie} and @option{-fPIE}.
+
@item section_anchors
Target supports section anchors.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 31f5d1e..4ffc081 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * lib/target-supports.exp (check_effective_target_pie): New proc.
+ * gcc.dg/pie-link.c: Use target pie.
+
2011-06-10 Eric Botcazou <ebotcazou@adacore.com>
Laurent Rougé <laurent.rouge@menta.fr>
diff --git a/gcc/testsuite/gcc.dg/pie-link.c b/gcc/testsuite/gcc.dg/pie-link.c
index 00ff495..c16086c 100644
--- a/gcc/testsuite/gcc.dg/pie-link.c
+++ b/gcc/testsuite/gcc.dg/pie-link.c
@@ -1,4 +1,4 @@
-/* { dg-do link { target *-*-darwin[912]* *-*-linux* } } */
+/* { dg-do link { target pie } } */
/* { dg-options "-fpie" } */
int main(void)
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 7d3a271..1f6f8b6 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -788,6 +788,16 @@ proc check_effective_target_fpic { } {
return 0
}
+# Return 1 if -pie, -fpie and -fPIE are supported, 0 otherwise.
+
+proc check_effective_target_pie { } {
+ if { [istarget *-*-darwin\[912\]*]
+ || [istarget *-*-linux*] } {
+ return 1;
+ }
+ return 0
+}
+
# Return true if the target supports -mpaired-single (as used on MIPS).
proc check_effective_target_mpaired_single { } {