Tighten regexp in gdb.base/setshow.exp
[deliverable/binutils-gdb.git] / ld / testsuite / lib / ld-lib.exp
index 4cd671d4734fc4801ac22f9314106006a825a079..67c429ffec581ecab5826e670520556a0c588227 100644 (file)
@@ -1,7 +1,5 @@
 # Support routines for LD testsuite.
-#   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-#    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-#    Free Software Foundation, Inc.
+#   Copyright 1994-2013 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -333,10 +331,12 @@ proc default_ld_compile { cc source object } {
 proc default_ld_assemble { as in_flags source object } {
     global ASFLAGS
     global host_triplet
+    global srcdir
+    global subdir
 
     if ![info exists ASFLAGS] { set ASFLAGS "" }
 
-    set flags [big_or_little_endian]
+    set flags "[big_or_little_endian] -I$srcdir/$subdir"
     set exec_output [run_host_cmd "$as" "$flags $in_flags $ASFLAGS -o $object $source"]
     set exec_output [prune_warnings $exec_output]
     if [string match "" $exec_output] then {
@@ -1426,7 +1426,7 @@ proc run_cc_link_tests { ldtests } {
            if { $warnings != "" } then {
                verbose -log "returned with: <$exec_output>, expected: <$warnings>"
                if { [regexp $warnings $exec_output] } then {
-                   set failed 2
+                   set failed 0
                } else {
                    set failed 1
                }
@@ -1518,22 +1518,21 @@ proc check_gc_sections_available { } {
     if {![info exists gc_sections_available_saved]} {
        # Some targets don't support gc-sections despite whatever's
        # advertised by ld's options.
-       if {[istarget aarch64*-*-*]
-            || [istarget arc-*-*]
-            || [istarget d30v-*-*]
-            || [istarget dlx-*-*]
-            || [istarget i960-*-*]
-            || [istarget or32-*-*]
-            || [istarget pj*-*-*]
-            || [istarget alpha-*-*]
-            || [istarget hppa*64-*-*]
-            || [istarget i370-*-*]
-            || [istarget i860-*-*]
-            || [istarget ia64-*-*]
-            || [istarget mep-*-*]
-            || [istarget mn10200-*-*]
-            || [istarget *-*-cygwin]
-            || [istarget *-*-mingw*] } {
+       if {   [istarget arc-*-*]
+           || [istarget d30v-*-*]
+           || [istarget dlx-*-*]
+           || [istarget i960-*-*]
+           || [istarget or32-*-*]
+           || [istarget pj*-*-*]
+           || [istarget alpha-*-*]
+           || [istarget hppa*64-*-*]
+           || [istarget i370-*-*]
+           || [istarget i860-*-*]
+           || [istarget ia64-*-*]
+           || [istarget mep-*-*]
+           || [istarget mn10200-*-*]
+           || [istarget *-*-cygwin]
+           || [istarget *-*-mingw*] } {
            set gc_sections_available_saved 0
            return 0
        }
@@ -1568,7 +1567,7 @@ proc check_shared_lib_support { } {
         && ![istarget arm*-*-elf]
         && ![istarget avr-*-*]
         && ![istarget cr16-*-*]
-        && ![istarget cris*-*-*]
+        && ![istarget cris*-*-elf]
         && ![istarget crx-*-*]
         && ![istarget d10v-*-*]
         && ![istarget d30v-*-*]
@@ -1590,6 +1589,7 @@ proc check_shared_lib_support { } {
         && ![istarget mcore*-*-*]
         && ![istarget mep-*-*]
         && ![istarget microblaze-*-*]
+        && ![istarget mips*-*-elf]
         && ![istarget mn10200-*-*]
         && ![istarget moxie-*-*]
         && ![istarget msp430-*-*]
@@ -1597,6 +1597,7 @@ proc check_shared_lib_support { } {
         && ![istarget openrisc-*-*]
         && ![istarget or32-*-*]
         && ![istarget pj-*-*]
+        && ![istarget rl78-*-*]
         && ![istarget rx-*-*]
         && ![istarget spu-*-*]
         && ![istarget v850*-*-*]
This page took 0.024252 seconds and 4 git commands to generate.