Hi! Since r264052 i386.h includes insn-attr-common.h, which unfortunately isn't installed, because all we install is: $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) and thus plugins compiled against installed tree will not work on x86 if they need to include anything that includes tm.h.
Below are two possible patches to resolve this. >From the generated headers, we already install insn-addr.h insn-codes.h insn-constants.h insn-flags.h insn-modes-inline.h insn-modes.h insn-notes.def so the missing insn-attr.h insn-attr-common.h looks like an omission to me, so the first patch makes sure we install even those two headers on all targets. The other option is install insn-attr-common.h only on x86 where i386.h includes it and don't install insn-attr.h at all, which is what the second patch does. Tested on x86_64-linux, ok for trunk (which patch)? 2019-01-11 Jakub Jelinek <ja...@redhat.com> * Makefile.in (PLUGIN_HEADERS): Add $(INSN_ATTR_H). --- gcc/Makefile.in.jj 2019-01-10 11:43:17.053333900 +0100 +++ gcc/Makefile.in 2019-01-11 17:31:36.858281784 +0100 @@ -3509,7 +3509,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $ tree-ssa-loop-niter.h tree-ssa-ter.h tree-ssa-threadedge.h \ tree-ssa-threadupdate.h inchash.h wide-int.h signop.h hash-map.h \ hash-set.h dominance.h cfg.h cfgrtl.h cfganal.h cfgbuild.h cfgcleanup.h \ - lcm.h cfgloopmanip.h file-prefix-map.h builtins.def \ + lcm.h cfgloopmanip.h file-prefix-map.h builtins.def $(INSN_ATTR_H) \ pass-instances.def params.list # generate the 'build fragment' b-header-vars Jakub
2019-01-11 Jakub Jelinek <ja...@redhat.com> * config/i386/t-i386 (TM_H): Add insn-attr-common.h. --- gcc/config/i386/t-i386.jj 2019-01-01 12:37:32.919716339 +0100 +++ gcc/config/i386/t-i386 2019-01-11 17:36:37.535389125 +0100 @@ -17,7 +17,7 @@ # <http://www.gnu.org/licenses/>. OPTIONS_H_EXTRA += $(srcdir)/config/i386/stringop.def -TM_H += $(srcdir)/config/i386/x86-tune.def +TM_H += $(srcdir)/config/i386/x86-tune.def insn-attr-common.h PASSES_EXTRA += $(srcdir)/config/i386/i386-passes.def i386-c.o: $(srcdir)/config/i386/i386-c.c