ld relro
[platform/upstream/binutils.git] / ld / testsuite / ld-bootstrap / bootstrap.exp
index bf38000..ccb07d5 100644 (file)
@@ -1,6 +1,5 @@
 # Expect script for LD Bootstrap Tests
-#   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2004,
-#   2005, 2006, 2007, 2009, 2010  Free Software Foundation, Inc.
+#   Copyright (C) 1993-2014 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -79,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
     }
@@ -123,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