]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/commitdiff
libmudflap:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Jul 2011 08:59:20 +0000 (08:59 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Jul 2011 08:59:20 +0000 (08:59 +0000)
PR libmudflap/49549
* testsuite/lib/libmudflap.exp (load_gcc_lib): Load
target-supports.exp.
* testsuite/libmudflap.cth/cthfrags.exp: Only pass
--noinhibit-exec to GNU ld.

gcc:
PR libmudflap/49549
* doc/sourcebuild.texi (Effective-Target Keywords): Document gld.

gcc/testsuite:
PR libmudflap/49549
* lib/target-supports.exp (check_effective_target_gld): New proc.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175749 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp
libmudflap/ChangeLog
libmudflap/testsuite/lib/libmudflap.exp
libmudflap/testsuite/libmudflap.cth/cthfrags.exp

index a4b743cf44b9dfd62b894b99c202fb818568498f..21d2c1e6467927d593a884fd8f684caf6c810efd 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libmudflap/49549
+       * doc/sourcebuild.texi (Effective-Target Keywords): Document gld.
+
 2011-07-01  Jakub Jelinek  <jakub@redhat.com>
 
        * tree-pretty-print.c (dump_generic_code) <case CONSTRUCTOR>: Print
index d2cc4ea3ead46948dc2dd10c6741735a411f8c8a..3d41c0d029ea9f8edb07a4ce384529d7241e62a2 100644 (file)
@@ -1760,6 +1760,9 @@ Target uses GNU @command{as}.
 @item gc_sections
 Target supports @option{--gc-sections}.
 
+@item gld
+Target uses GNU @command{ld}.
+
 @item keeps_null_pointer_checks
 Target keeps null pointer checks, either due to the use of
 @option{-fno-delete-null-pointer-checks} or hardwired into the target.
index 17046d6391b6654a5c40737a8d43d1e4e28c97c5..9b7219790fc3a40019ed7508045b0f8a3f8509d8 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libmudflap/49549
+       * lib/target-supports.exp (check_effective_target_gld): New proc.
+
 2011-07-01  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/49603
index 393c3ade82e7e809d0327b6f0993e4a68ff4d5cc..4e56e48412fab52cfb436437856cd4b078d7e327 100644 (file)
@@ -3843,6 +3843,26 @@ proc check_effective_target_gas { } {
     return $use_gas_saved
 }
 
+# Return 1 if GNU ld is used.
+
+proc check_effective_target_gld { } {
+    global use_gld_saved
+    global tool
+
+    if {![info exists use_gld_saved]} {
+       # Check if the ld used by gcc is GNU ld.
+       set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=ld" "" "none" ""] 0]
+       set status [remote_exec host "$gcc_ld" "--version"]
+       set ld_output [lindex $status 1]
+       if { [ string first "GNU" $ld_output ] >= 0 } {
+           set use_gld_saved 1
+       } else {
+           set use_gld_saved 0
+       }
+    }
+    return $use_gld_saved
+}
+
 # Return 1 if the compiler has been configure with link-time optimization
 # (LTO) support.
 
index f44f0ed18fe0084eeb6d5a26faaaea9f308632e0..177c01865d3817a91a4e88ca7d49936b08271169 100644 (file)
@@ -1,3 +1,11 @@
+2011-07-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libmudflap/49549
+       * testsuite/lib/libmudflap.exp (load_gcc_lib): Load
+       target-supports.exp.
+       * testsuite/libmudflap.cth/cthfrags.exp: Only pass
+       --noinhibit-exec to GNU ld.
+
 2011-06-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        PR libmudflap/38738
index a09eb959aae2a99b888d5b7a72ad8b593b44120f..bd9327d140831e527a1b3570ad48dfe02bac515c 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010
+# Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010, 2011
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -30,6 +30,7 @@ proc load_gcc_lib { filename } {
 load_lib mfdg.exp
 load_lib libgloss.exp
 load_gcc_lib target-libpath.exp
+load_gcc_lib target-supports.exp
 load_gcc_lib timeout.exp
 load_gcc_lib timeout-dg.exp
 
index e5a7de843542f1845a008b713ff1bbf066abc7ef..a025b03805f6a2d4cfbbf7888f48418abcc0e4b3 100644 (file)
@@ -11,10 +11,15 @@ foreach flags $MUDFLAP_FLAGS {
        set bsrc [file tail $srcfile]
        setenv MUDFLAP_OPTIONS "-viol-segv"
        if {$libmudflapth} then {
-           # --noinhibit-exec works around a ld problem that causes
-           # "Dwarf Error: Invalid or unhandled FORM value: 14"
-           # to fail builds unnecessarily.
-           dg-runtest $srcfile $flags "-fmudflapth -lmudflapth -lpthread -Wl,--noinhibit-exec"
+           if [check_effective_target_gld] {
+               # --noinhibit-exec works around a ld problem that causes
+               # "Dwarf Error: Invalid or unhandled FORM value: 14"
+               # to fail builds unnecessarily.
+               set noie_option " -Wl,--noinhibit-exec"
+           } else {
+               set noie_option ""
+           }
+           dg-runtest $srcfile $flags "-fmudflapth -lmudflapth -lpthread $noie_option"
        } else {
            if {$flags != ""} {set f " ($flags)"} {set f ""}
             untested "libmudflap.cth/$bsrc$f"