* gcc.target/i386/pie.c: New test.
* lib/target-supports.exp (check_effective_target_pie): New.
From-SVN: r219553
+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
--- /dev/null
+/* { dg-do compile { target pie } } */
+/* { dg-options "-O2" } */
+
+int foo (void);
+
+int
+main (void)
+{
+ return foo ();
+}
+
+/* { dg-final { scan-assembler "foo@PLT" } } */
}]
}
+# 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 { } {