public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH v2] x86: Remove libopcodes dependency
Date: Tue, 29 Nov 2022 16:06:11 -0800	[thread overview]
Message-ID: <CAMe9rOpU3ZEYGBKPXgHOjsRo9kM+9zeb8sSZF0z95Cqyy+toeQ@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOp_Wv3xU=Qv_DZBEY1mrr5VJtusxbs7i0k0nNefYYOxOA@mail.gmail.com>

On Tue, Nov 29, 2022 at 11:38 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Tue, Nov 29, 2022 at 1:22 AM Jan Beulich <jbeulich@suse.com> wrote:
> >
> > On 29.11.2022 00:49, H.J. Lu wrote:
> > > On Thu, Nov 24, 2022 at 2:19 AM Jan Beulich <jbeulich@suse.com> wrote:
> > >> On 22.11.2022 19:19, H.J. Lu wrote:
> > >>> --- a/gas/Makefile.am
> > >>> +++ b/gas/Makefile.am
> > >>> @@ -446,6 +446,12 @@ development.exp: $(BFDDIR)/development.sh
> > >>>       $(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh  \
> > >>>         | $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
> > >>>
> > >>> +$(srcdir)/../opcodes/i386-init.h $(srcdir)/../opcodes/i386-tbl.h: \
> > >>> +     @MAINT@ $(srcdir)/../opcodes/i386-opc.tbl \
> > >>> +     $(srcdir)/../opcodes/i386-reg.tbl \
> > >>> +     $(srcdir)/../opcodes/i386-opc.h
> > >>> +     cd ../opcodes; make gen-i386-tbl
> > >>
> > >> I've made a patch to gas/Makefile.am as you have requested in reply to
> > >> my series. I will want to put that through some more testing, so I will
> > >> submit a v3 of that only a little later (and of course only unless you
> > >> submit a v2 of your patch earlier that I would also end up being okay
> > >> with). In the course of doing so I noticed a few more issues with your
> > >> change:
> > >>
> > >> For one I don't think you can put @MAINT@ on a continued line, as the
> > >> line continuation might then be hidden when @MAINT@ expands to #. The
> > >> list of dependencies wants expressing via a variable, which would then
> > >> be used immediately after @MAINT@ without any line continuation
> > >> following.
> > >
> > > Fixed.
> >
> > No, the same problem is still there. You either need to use a very long
> > line, or you need to introduce a variable holding the list of prereqs,
> > like I've done in my series.
>
> I got
>
> $(srcdir)/../opcodes/i386-init.h $(srcdir)/../opcodes/i386-tbl.h:
> $(srcdir)/../opcodes/i386-opc.tbl \
>         $(srcdir)/../opcodes/i386-reg.tbl \
>         $(srcdir)/../opcodes/i386-opc.h \
>         $(srcdir)/../opcodes/i386-gen.c
>         $(MAKE) -C ../opcodes gen-i386-tbl
>
> and
>
> $(srcdir)/../opcodes/i386-init.h $(srcdir)/../opcodes/i386-tbl.h: #
> $(srcdir)/../opcodes/i386-opc.tbl \
>         $(srcdir)/../opcodes/i386-reg.tbl \
>         $(srcdir)/../opcodes/i386-opc.h \
>         $(srcdir)/../opcodes/i386-gen.c
>         $(MAKE) -C ../opcodes gen-i386-tbl
>
> I didn't run into any problems.
>
> > >> And then your rule / dependency won't be enough on a "maintainer-clean"
> > >> tree, i.e. when the generated headers aren't there at all, and when
> > >> config/.deps/tc-i386.Po is still empty. In that case nothing would
> > >> trigger their generation; an explicit dependency of config/tc-i386.o on
> > >> these headers needs adding here.
> > >
> > > Fixed.
> > >
> > >> Finally you're missing a dependency of the generated headers on
> > >> i386-gen.c.
> > >
> > > They have a dependency on i386-gen which depends on i386-gen.c.
> >
> > In opcodes/, yes, but talk was about the rule in gas/. Yet despite
> > your comment above I see that you've added the missing dependency.
> >
> > > Here is the v2 patch.
> >
> > As said in reply to v1 - my objection to this particular use of make
> > recursion remains.
>
> The gen-i386-tbl rule doesn't touch any files used by libopcodes.

There are

bfd/Makefile.in:   ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS)
$$local_target) \
binutils/Makefile.in:   ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS)
$$local_target) \
gas/Makefile.in:   ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS)
$$local_target) \

> > I also continue to be irritated by you specifically having asked me
> > to further split my series, when you do everything in a single patch.
>
> My patch is relatively small and it does only one thing.
>
> > One further request at least for consideration: In my v3 I've moved
> > the inclusion of opcodes/i386-tbl.h quite a bit further down in
> > tc-i386.c, as I think it's preferable that way (not introducing the
> > static arrays earlier than necessary).
>
> Does it make any differences?
>
>
> --
> H.J.



-- 
H.J.

  reply	other threads:[~2022-11-30  0:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 18:19 [PATCH] " H.J. Lu
2022-11-23  8:36 ` Jan Beulich
2022-11-28 23:43   ` H.J. Lu
2022-11-29  9:12     ` Jan Beulich
2022-11-24 10:19 ` Jan Beulich
2022-11-28 23:49   ` [PATCH v2] " H.J. Lu
2022-11-29  9:22     ` Jan Beulich
2022-11-29 19:38       ` H.J. Lu
2022-11-30  0:06         ` H.J. Lu [this message]
2022-11-30  6:58           ` Jan Beulich
2022-11-30 22:22             ` H.J. Lu
2022-12-01  7:41               ` Jan Beulich
2022-12-01 18:26                 ` [PATCH v3] " H.J. Lu
2022-12-02  7:16                   ` Jan Beulich
2022-12-02 17:19                     ` H.J. Lu
2022-12-05 11:25                       ` Jan Beulich
2022-11-30  7:31         ` [PATCH v2] " Jan Beulich
2022-11-30 22:15           ` H.J. Lu
2022-12-01  7:21             ` Jan Beulich
2022-12-01 18:20               ` H.J. Lu
2022-12-02  7:10                 ` Jan Beulich

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=CAMe9rOpU3ZEYGBKPXgHOjsRo9kM+9zeb8sSZF0z95Cqyy+toeQ@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).