Commit ed4f78fa by H.J. Lu Committed by H.J. Lu

Add check_effective_target_pie

	* gcc.target/i386/pie.c: New test.

	* lib/target-supports.exp (check_effective_target_pie): New.

From-SVN: r219553
parent 860dadcb
2015-01-13 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/pie.c: New test.
* lib/target-supports.exp (check_effective_target_pie): New.
2015-01-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/64286
......
/* { dg-do compile { target pie } } */
/* { dg-options "-O2" } */
int foo (void);
int
main (void)
{
return foo ();
}
/* { dg-final { scan-assembler "foo@PLT" } } */
......@@ -1080,6 +1080,16 @@ proc check_effective_target_nonpic { } {
}]
}
# Return 1 if the current multilib generates PIE by default.
proc check_effective_target_pie { } {
return [check_no_compiler_messages pie assembly {
#ifndef __PIE__
#error unsupported
#endif
}]
}
# Return 1 if the target does not use a status wrapper.
proc check_effective_target_unwrapped { } {
......
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