From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by sourceware.org (Postfix) with ESMTPS id 36D273861001 for ; Thu, 3 Sep 2020 16:25:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 36D273861001 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 083GOxV9176295; Thu, 3 Sep 2020 16:25:31 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 337eer9v69-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 03 Sep 2020 16:25:31 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 083GLIGG028282; Thu, 3 Sep 2020 16:23:30 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 3380ks1x2v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 03 Sep 2020 16:23:30 +0000 Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 083GNSho029867; Thu, 3 Sep 2020 16:23:28 GMT Received: from termi.oracle.com (/10.175.30.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 03 Sep 2020 09:23:28 -0700 From: "Jose E. Marchesi" To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] sim: better handle builds of primary targets lacking sims References: <20200903133743.3323-1-jose.marchesi@oracle.com> <20200903154844.GB853475@embecosm.com> Date: Thu, 03 Sep 2020 18:23:12 +0200 In-Reply-To: <20200903154844.GB853475@embecosm.com> (Andrew Burgess's message of "Thu, 3 Sep 2020 16:48:44 +0100") Message-ID: <874koezv67.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9733 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009030153 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9733 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 malwarescore=0 adultscore=0 spamscore=0 mlxscore=0 phishscore=0 impostorscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009030153 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2020 16:25:34 -0000 >> When building with a primary target that doesn't feature a simulator, >> one would expect for nothing to be done in sim/. However, a >> $(top_builddir)/sim/testsuite directory is created, with a Makefile >> containing a rule like: >> >> check-DEJAGNU: site.exp >> echo "Dejagnu-checking in `pwd` directory ..." >> rootme=`pwd`; export rootme; echo rootme = $$rootme; \ >> srcdir=`cd ${srcdir}; pwd`; export srcdir ; echo srcdir = $$srcdir; \ >> EXPECT=${EXPECT} ; export EXPECT ; echo EXPECT = $$EXPECT; \ >> if [ -f $$rootme/../../expect/expect ]; then \ >> TCL_LIBRARY=`cd $$srcdir/../../tcl/library && pwd`; \ >> export TCL_LIBRARY; \ >> fi; \ >> echo TCL_LIBRARY = $$TCL_LIBRARY; \ >> runtest=$(RUNTEST); echo runtest = $$runtest; \ >> if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ >> $$runtest $(RUNTESTFLAGS); \ >> else echo "WARNING: could not find \`runtest'" 1>&2; :;\ >> fi >> >> Consequently, when `make check' recurses into sim/testsuite, the above >> rule is executed. Until now, the desired effect (of doing nothing) >> was achieved because `runtest --version' fails due to a malformed >> site.exp being generated in objdir: it is malformed because the >> primary target doesn't configure a $sim_arch. i.e. this was doing the >> right thing just by chance. >> >> However, the git version of dejagnu seems to have changed in a way >> runtest doesn't try to load site.exp when it gets --version. The net >> effect is that the rule above tries to actually run the tests, failing >> miserably. >> >> This little patch makes sim/configure to not recurse into >> sim/testsuite if the primary target didn't configure a simulator. >> >> Tested with: >> - A simulator target (bpf-unkonwn-none). >> - A simulator-less target (x86_64-linux-gnu). >> - A simulator-less target and --build-targets=all. >> >> sim/ChangeLog: >> >> 2020-09-03 Jose E. Marchesi >> >> * configure.ac: Do not configure sim/testsuite nor sim/igen if the >> primary target doesn't have a simulator. >> * configure: Regenerate. > > I make no claim at being a configure expect, but this looks reasonable > to me, so I think go ahead and apply. Committed, thanks.