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.
This commit is contained in:
H.J. Lu 2006-02-22 17:41:04 +00:00
parent f40d164325
commit 44a260c17d
3 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,9 @@
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

View file

@ -0,0 +1,5 @@
int
main ()
{
return 0;
}

View file

@ -24,6 +24,14 @@ if { ![istarget *-*-linux*] } {
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"}