public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, 4.6/4.7] fix installation of plugin header files
@ 2011-06-20 13:46 Matthias Klose
  2011-06-20 15:22 ` Joseph S. Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2011-06-20 13:46 UTC (permalink / raw)
  To: GCC Patches

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

Two issues with the installation of plugin header files.

 - the c-family/* headers are used with the the c-family/ prefix
   in include directives. therefore they must not installed into
   the flattened plugin include dir, but kept in the subdir.

 - PR45078; vxworks-dummy.h is included for cpu_type in arm,
   i386, mips, sh and sparc but only installed when it's i386; copy it
   manually anytime.

Ok for the trunk and the 4.6 branch?

  Matthias

[-- Attachment #2: p.diff --]
[-- Type: text/x-diff, Size: 907 bytes --]


	PR plugin/45078
	* Makefile.in (PLUGIN_HEADERS): Add config/arm/arm-cores.def,
	config/vxworks-dummy.h.
	(install-plugin): Install c-family headers into a c-family subdir.

--- gcc/Makefile.in
+++ gcc/Makefile.in
@@ -4503,6 +4503,7 @@
   $(EXCEPT_H) tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \
   $(C_PRAGMA_H)  $(CPPLIB_H)  $(FUNCTION_H) \
   cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \
+  config/arm/arm-cores.def config/vxworks-dummy.h \
   $(IPA_PROP_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) version.h
 
 # generate the 'build fragment' b-header-vars
@@ -4527,7 +4528,7 @@
 	  else continue; \
 	  fi; \
 	  case $$path in \
-	  "$(srcdir)"/config/* | "$(srcdir)"/*.def ) \
+	  "$(srcdir)"/config/* | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
 	    base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
 	  *) base=`basename $$path` ;; \
 	  esac; \

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

* Re: [patch, 4.6/4.7] fix installation of plugin header files
  2011-06-20 13:46 [patch, 4.6/4.7] fix installation of plugin header files Matthias Klose
@ 2011-06-20 15:22 ` Joseph S. Myers
  2011-06-24 21:05   ` Matthias Klose
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2011-06-20 15:22 UTC (permalink / raw)
  To: Matthias Klose; +Cc: GCC Patches

On Mon, 20 Jun 2011, Matthias Klose wrote:

>  - PR45078; vxworks-dummy.h is included for cpu_type in arm,
>    i386, mips, sh and sparc but only installed when it's i386; copy it
>    manually anytime.

I don't think you should list particular config/ headers in PLUGIN_HEADERS 
in Makefile.in; provide a way for targets to specify their additions to 
this list in config.gcc instead.  Is the issue headers that are directly 
#included from tm.h headers (for whatever reason) rather than listed in 
tm_file?  (Some of those #includes may be avoidable, but the .def ones 
probably do need listing explicitly.)

The aim should be to get the extra files in tm_file_list, which is 
included in PLUGIN_HEADERS, so that they appear in $(TM_H) dependencies as 
well.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [patch, 4.6/4.7] fix installation of plugin header files
  2011-06-20 15:22 ` Joseph S. Myers
@ 2011-06-24 21:05   ` Matthias Klose
  2011-06-24 21:08     ` Joseph S. Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klose @ 2011-06-24 21:05 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: GCC Patches, Ramana Radhakrishnan

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

On 06/20/2011 05:18 PM, Joseph S. Myers wrote:
> On Mon, 20 Jun 2011, Matthias Klose wrote:
> 
>>  - PR45078; vxworks-dummy.h is included for cpu_type in arm,
>>    i386, mips, sh and sparc but only installed when it's i386; copy it
>>    manually anytime.
> 
> I don't think you should list particular config/ headers in PLUGIN_HEADERS 
> in Makefile.in; provide a way for targets to specify their additions to 
> this list in config.gcc instead.  Is the issue headers that are directly 
> #included from tm.h headers (for whatever reason) rather than listed in 
> tm_file?  (Some of those #includes may be avoidable, but the .def ones 
> probably do need listing explicitly.)
> 
> The aim should be to get the extra files in tm_file_list, which is 
> included in PLUGIN_HEADERS, so that they appear in $(TM_H) dependencies as 
> well.

updated patch attached.

  Matthias


[-- Attachment #2: p.diff --]
[-- Type: text/x-diff, Size: 1234 bytes --]

2011-06-24  Matthias Klose  <doko@ubuntu.com>

	PR plugin/45078
	* Makefile.in (PLUGIN_HEADERS): Add config/arm/arm-cores.def.
	(install-plugin): Install c-family headers into a c-family subdir.
	* config.gcc: Add vxworks-dummy.h to tm_file for arm, mips, sh and
	sparc targets.

--- gcc/Makefile.in
+++ gcc/Makefile.in
@@ -4503,6 +4503,7 @@
   $(EXCEPT_H) tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \
   $(C_PRAGMA_H)  $(CPPLIB_H)  $(FUNCTION_H) \
   cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \
+  config/arm/arm-cores.def \
   $(IPA_PROP_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) version.h
 
 # generate the 'build fragment' b-header-vars
@@ -4527,7 +4528,7 @@
 	  else continue; \
 	  fi; \
 	  case $$path in \
-	  "$(srcdir)"/config/* | "$(srcdir)"/*.def ) \
+	  "$(srcdir)"/config/* | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
 	    base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
 	  *) base=`basename $$path` ;; \
 	  esac; \
--- gcc/config.gcc
+++ gcc/config.gcc
@@ -467,6 +467,9 @@
 	fi
 	tm_file="vxworks-dummy.h ${tm_file}"
 	;;
+arm*-*-*|mips*-*-*|sh*-*-*|sparc*-*-*)
+	tm_file="vxworks-dummy.h ${tm_file}"
+	;;
 esac
 
 # On a.out targets, we need to use collect2.

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

* Re: [patch, 4.6/4.7] fix installation of plugin header files
  2011-06-24 21:05   ` Matthias Klose
@ 2011-06-24 21:08     ` Joseph S. Myers
  0 siblings, 0 replies; 4+ messages in thread
From: Joseph S. Myers @ 2011-06-24 21:08 UTC (permalink / raw)
  To: Matthias Klose; +Cc: GCC Patches, Ramana Radhakrishnan

On Fri, 24 Jun 2011, Matthias Klose wrote:

> On 06/20/2011 05:18 PM, Joseph S. Myers wrote:
> > On Mon, 20 Jun 2011, Matthias Klose wrote:
> > 
> >>  - PR45078; vxworks-dummy.h is included for cpu_type in arm,
> >>    i386, mips, sh and sparc but only installed when it's i386; copy it
> >>    manually anytime.
> > 
> > I don't think you should list particular config/ headers in PLUGIN_HEADERS 
> > in Makefile.in; provide a way for targets to specify their additions to 
> > this list in config.gcc instead.  Is the issue headers that are directly 
> > #included from tm.h headers (for whatever reason) rather than listed in 
> > tm_file?  (Some of those #includes may be avoidable, but the .def ones 
> > probably do need listing explicitly.)
> > 
> > The aim should be to get the extra files in tm_file_list, which is 
> > included in PLUGIN_HEADERS, so that they appear in $(TM_H) dependencies as 
> > well.
> 
> updated patch attached.

That doesn't sufficiently address the issues I pointed out.

* Listing arm-cores.def in Makefile.in is still wrong.

* If you add a header to tm_file (which needs a more detailed analysis of 
why including it there in the list of headers is safe for all targets 
affected) then you should also remove the #include directives that 
directly include it from other headers.

* There are other files included in tm.h headers that this patch is silent 
on.

I believe you don't need to do anything about headers listed in 
HeaderInclude in a .opt file that are also explicitly #included.  Apart 
from those, all #include directives in tm.h headers should be 
investigated.  If they can be replaced by entries in tm_file, by all means 
do so, but if not, then *don't* add them explicitly to Makefile.in, 
provide a way for them to get into tm_file_list in the Makefile without 
them getting into tm_include_list there (which may mean a new config.gcc 
variable).  This new mechanism is where arm-cores.def and other such 
headers should be listed - not directly in Makefile.in.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

end of thread, other threads:[~2011-06-24 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-20 13:46 [patch, 4.6/4.7] fix installation of plugin header files Matthias Klose
2011-06-20 15:22 ` Joseph S. Myers
2011-06-24 21:05   ` Matthias Klose
2011-06-24 21:08     ` Joseph S. Myers

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