* ld-pie/pie.c: New file.
* ld-pie/pie.exp: Check if compiler supports -pie.
+2006-02-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-pie/pie.c: New file.
+
+ * ld-pie/pie.exp: Check if compiler supports -pie.
+
2006-02-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/2218
--- /dev/null
+int
+main ()
+{
+ return 0;
+}
return
}
+# Check if -pie is supported or not.
+send_log "$CC -pie $srcdir/$subdir/pie.c -o tmpdir/pie"
+catch "exec $CC -pie $srcdir/$subdir/pie.c -o tmpdir/pie" exec_output
+send_log "$exec_output\n"
+if { ![string match "" $exec_output] } {
+ return
+}
+
set array_tests {
{"weak undefined" "-pie" "" {weakundef.c} "weakundef" "weakundef.out" "-fPIC"}
{"weak undefined data" "-pie" "" {weakundef-data.c} "weakundef-data" "weakundef.out" "-fPIC"}