From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116171 invoked by alias); 6 Apr 2015 23:39:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 116157 invoked by uid 89); 6 Apr 2015 23:39:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: bastet.se.axis.com Received: from bastet.se.axis.com (HELO bastet.se.axis.com) (195.60.68.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Apr 2015 23:39:27 +0000 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id D540A18088 for ; Tue, 7 Apr 2015 01:39:24 +0200 (CEST) Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id x+8uvi0dBJek for ; Tue, 7 Apr 2015 01:39:23 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by bastet.se.axis.com (Postfix) with ESMTP id B4E0E1806E for ; Tue, 7 Apr 2015 01:39:23 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 95B34FDF for ; Tue, 7 Apr 2015 01:39:23 +0200 (CEST) Received: from seth.se.axis.com (seth.se.axis.com [10.0.2.172]) by boulder.se.axis.com (Postfix) with ESMTP id 85136DFF for ; Tue, 7 Apr 2015 01:39:23 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by seth.se.axis.com (Postfix) with ESMTP id 826023E049; Tue, 7 Apr 2015 01:39:23 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id t36NdNBc006266; Tue, 7 Apr 2015 01:39:23 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id t36NdMHg006262; Tue, 7 Apr 2015 01:39:22 +0200 Date: Mon, 06 Apr 2015 23:39:00 -0000 Message-Id: <201504062339.t36NdMHg006262@ignucius.se.axis.com> From: Hans-Peter Nilsson To: gdb-patches@sourceware.org Subject: Patch, sim: fix m68hc11 and iq2000 testsuites using dejagnu baseboard files MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-SW-Source: 2015-04/txt/msg00176.txt.bz2 (I'll send a heads-up to the dejagnu list but I won't CC them on this message as that list is subscriber-only, says http://www.gnu.org/software/dejagnu/.) All of a sudden (thanks to Mike) m68hc11 and iq2000 sims both have test-suites, with a very welcome hello-world test. But, for people expecting that to work with the corresponding supposedly-intended dejagnu baseboard, those tests fail linking. For iq2000, iq2000-sim.exp has: # Special linker script needed to run C programs. set_board_info ldscript "-Tsim.ld" but there's no sim.ld installed with today's binutils which is all we require for running the sim testsuite. (I see it's in libgloss.) For m68hc11, there's a confusingly inconsistent comment and setting: # No linker script needed. set_board_info ldscript "-Wl,--script,sim-valid.x" I'm not sure where the .x suffix comes from; libgloss would install a sim-valid.ld. You might wonder how that gcc-specific "-Wl,"-syntax is supposed to work with a plain linker call. The (IMHO) ugly truth is that default_link target.exp would strip a "-Wl,"-prefix, but it doesn't take care to *also* replace "," with " ", so I don't think that has ever worked with plain linker calls; those that end up in default_link calls. Locally eliminating ldscript probably seems ugly. There's precedent; see sim/testsuite/sim/mips/basic.exp. An alternative would be to automatically disabling it in the first call to run_sim_test, but that seemed just too smart. I'm going to install the following in a day or two, unless someone has a better alternative (excluding "stop using the broken {iq2000,m68hc11}-sim.exp" as I don't want the sim testsuite to *require* different parameters to the other tools). sim/testsuite/sim/m68hc11: * allinsn.exp: Disable baseboard ldscript variable. sim/testsuite/sim/iq2000: * allinsn.exp: Disable baseboard ldscript variable. diff --git a/sim/testsuite/sim/iq2000/allinsn.exp b/sim/testsuite/sim/iq2000/allinsn.exp index 38eee9b..414b0f8 100644 --- a/sim/testsuite/sim/iq2000/allinsn.exp +++ b/sim/testsuite/sim/iq2000/allinsn.exp @@ -4,6 +4,14 @@ if [istarget iq2000-*] { # all machines set all_machs "iq2000" + # For people using the dejagnu iq2000-sim.exp baseboard, it + # (as of dejagnu post-1.5 2015-04-06 41070790) sets a ldscript + # variable requiring a script "sim.ld" which does not exist in a + # plain binutils installation of iq2000-elf; it's in libgloss. So, + # as gross as it is, we locally unset the linker script specified by + # the target board. + unset_currtarget_info ldscript + foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] { # If we're only testing specific files and this isn't one of them, # skip it. diff --git a/sim/testsuite/sim/m68hc11/allinsn.exp b/sim/testsuite/sim/m68hc11/allinsn.exp index db0cbd5..88bbc34 100644 --- a/sim/testsuite/sim/m68hc11/allinsn.exp +++ b/sim/testsuite/sim/m68hc11/allinsn.exp @@ -4,6 +4,17 @@ if [istarget m68hc11-*] { # all machines set all_machs "m68hc11" + # For people using the dejagnu m68hc11-sim.exp baseboard, it + # (as of dejagnu post-1.5 2015-04-06 41070790) sets a ldscript + # variable requiring a script "sim-valid.x" which does not exist in a + # plain binutils installation of m68hc11-elf (there's a sim-valid.ld + # installed with libgloss), also, with a syntax which doesn't work + # for default_link (would require replacing "," with " " in addition + # to stripping the "-Wl,"-prefix). So, as gross as it is, we keep + # it simple and just unset the linker script specified by the target + # board. + unset_currtarget_info ldscript + foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.s]] { # If we're only testing specific files and this isn't one of them, # skip it. brgds, H-P