Commit 8340fbd7 by Rainer Orth Committed by Rainer Orth

sourcebuild.texi (Effective-Target Keywords, pie): Document it.

	gcc:
	* doc/sourcebuild.texi (Effective-Target Keywords, pie): Document it.

	gcc/testsuite:
	* lib/target-supports.exp (check_effective_target_pie): New proc.
	* gcc.dg/pie-link.c: Use target pie.

From-SVN: r174909
parent 9aaa7e47
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> 2011-06-10 Hans-Peter Nilsson <hp@axis.com>
* ira-costs.c: Remove #ifdefs on dead FORBIDDEN_INC_DEC_CLASSES. * ira-costs.c: Remove #ifdefs on dead FORBIDDEN_INC_DEC_CLASSES.
......
...@@ -1787,6 +1787,9 @@ Target defines @code{PCC_BITFIELD_TYPE_MATTERS}. ...@@ -1787,6 +1787,9 @@ Target defines @code{PCC_BITFIELD_TYPE_MATTERS}.
@item pe_aligned_commons @item pe_aligned_commons
Target supports @option{-mpe-aligned-commons}. Target supports @option{-mpe-aligned-commons}.
@item pie
Target supports @option{-pie}, @option{-fpie} and @option{-fPIE}.
@item section_anchors @item section_anchors
Target supports section anchors. Target supports section anchors.
......
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> 2011-06-10 Eric Botcazou <ebotcazou@adacore.com>
Laurent Roug <laurent.rouge@menta.fr> Laurent Roug <laurent.rouge@menta.fr>
......
/* { dg-do link { target *-*-darwin[912]* *-*-linux* } } */ /* { dg-do link { target pie } } */
/* { dg-options "-fpie" } */ /* { dg-options "-fpie" } */
int main(void) int main(void)
......
...@@ -788,6 +788,16 @@ proc check_effective_target_fpic { } { ...@@ -788,6 +788,16 @@ proc check_effective_target_fpic { } {
return 0 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). # Return true if the target supports -mpaired-single (as used on MIPS).
proc check_effective_target_mpaired_single { } { proc check_effective_target_mpaired_single { } {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment