Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] sim: better handle builds of primary targets lacking sims
Date: Thu, 03 Sep 2020 18:23:12 +0200	[thread overview]
Message-ID: <874koezv67.fsf@oracle.com> (raw)
In-Reply-To: <20200903154844.GB853475@embecosm.com> (Andrew Burgess's message of "Thu, 3 Sep 2020 16:48:44 +0100")


>> 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  <jose.marchesi@oracle.com>
>> 
>> 	* 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.


      reply	other threads:[~2020-09-03 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 13:37 Jose E. Marchesi
2020-09-03 14:29 ` Jose E. Marchesi
2020-09-03 15:48 ` Andrew Burgess
2020-09-03 16:23   ` Jose E. Marchesi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874koezv67.fsf@oracle.com \
    --to=jose.marchesi@oracle.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox