ld relro
[platform/upstream/binutils.git] / ld / testsuite / ld-bootstrap / bootstrap.exp
index 27eb5d0..ccb07d5 100644 (file)
@@ -78,7 +78,12 @@ foreach flags $test_flags {
 
     # This test can only be run if we have the ld build directory,
     # since we need the object files.
-    if {$ld != "$objdir/ld-new"} {
+    set ldexe $ld
+    set ldparm [string first " " $ld]
+    if { $ldparm > 0 } then {
+       set ldexe [string range $ld 0 $ldparm]
+    }
+    if {$ldexe != "$objdir/ld-new"} {
        untested $testname
        continue
     }
@@ -122,7 +127,9 @@ foreach flags $test_flags {
 
     # Plugin support requires linking with libdl.
     if { $plugins == "yes" } {
-       set extralibs "$extralibs -ldl"
+       if { ![istarget "*-*-freebsd*"]} {
+           set extralibs "$extralibs -ldl"
+       }
     }
 
     # On Irix 5, linking with --static only works if all the files are