[PATCH] x86: Remove libopcodes dependency

Jan Beulich jbeulich@suse.com
Thu Nov 24 10:19:05 GMT 2022


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.

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.

Finally you're missing a dependency of the generated headers on
i386-gen.c.

Jan


More information about the Binutils mailing list