public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix x86 PLUGIN_HEADERS
@ 2019-01-11 16:43 Jakub Jelinek
  2019-01-11 16:43 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2019-01-11 16:43 UTC (permalink / raw)
  To: Richard Biener, Jeff Law, Uros Bizjak, Martin Liška; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

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  <jakub@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

[-- Attachment #2: T539a --]
[-- Type: text/plain, Size: 547 bytes --]

2019-01-11  Jakub Jelinek  <jakub@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix x86 PLUGIN_HEADERS
  2019-01-11 16:43 [PATCH] Fix x86 PLUGIN_HEADERS Jakub Jelinek
@ 2019-01-11 16:43 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2019-01-11 16:43 UTC (permalink / raw)
  To: Jakub Jelinek, Richard Biener, Uros Bizjak, Martin Liška; +Cc: gcc-patches

On 1/11/19 9:42 AM, Jakub Jelinek wrote:
> 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)?
OK.  Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-11 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 16:43 [PATCH] Fix x86 PLUGIN_HEADERS Jakub Jelinek
2019-01-11 16:43 ` Jeff Law

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).