Patchwork fix misplaced c-family headers in plugin include directory

login
register
mail settings
Submitter Ehren Metcalfe
Date Nov. 30, 2010, 5:40 a.m.
Message ID <AANLkTi=84j5G5Z7MV6Ht30yud=3uo=D7TX95+O-XTH1b@mail.gmail.com>
Download mbox | patch
Permalink /patch/73544/
State New
Headers show

Comments

Ehren Metcalfe - Nov. 30, 2010, 5:40 a.m.
In addition to the problems addressed by
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02752.html, there is an
issue with c-family headers being put in the main plugin include
directory rather than the c-family subdir. This breaks all headers
like cp-tree.h etc that #include "c-family/blah.h". Also, the
testsuite plugin examples have already been updated to use the
c-family dir (so with this and Mingjie Xing's patch they'll work
again).
Ralf Wildenhues - Nov. 30, 2010, 6:09 a.m.
Hello,

* Ehren Metcalfe wrote on Tue, Nov 30, 2010 at 06:40:33AM CET:
> In addition to the problems addressed by
> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02752.html, there is an
> issue with c-family headers being put in the main plugin include
> directory rather than the c-family subdir. This breaks all headers
> like cp-tree.h etc that #include "c-family/blah.h". Also, the
> testsuite plugin examples have already been updated to use the
> c-family dir (so with this and Mingjie Xing's patch they'll work
> again).

This needs a ChangeLog entry, I suggest something like

gcc/ChangeLog:
2010-11-30  Ehren Metcalfe  <ehren.m@...>

        * Makefile.in (install-plugin): Do not flatten c-family subdir.


and I'm not sure if there is a required testing procedure for plugin
patches, but if there's one, that should be tested too.  Patch looks ok
otherwise.  Do you need someone to commit it for you?

Thanks,
Ralf

> --- gcc/Makefile.in (revision 167286)
> +++ gcc/Makefile.in (working copy)
> @@ -4576,8 +4576,8 @@
> 
>  # Install the headers needed to build a plugin.
>  install-plugin: installdirs lang.install-plugin s-header-vars
> -# We keep the directory structure for files in config and .def files. All
> -# other files are flattened to a single directory.
> +# We keep the directory structure for files in config, c-family and
> +# .def files. All other files are flattened to a single directory.
>   $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
>   headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \
>   srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
> @@ -4589,7 +4589,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; \
Ehren Metcalfe - Nov. 30, 2010, 6:34 a.m.
Hi,
Here's the patch with ChangeLog. I'm not too sure about plugin-patch
testing procedures but I can run the tests in g++.dg/plugins and
gcc.dg/plugins in the morning. I also do need someone to check this
in.

Thanks,

Ehren


On Tue, Nov 30, 2010 at 1:09 AM, Ralf Wildenhues <Ralf.Wildenhues@gmx.de> wrote:
> Hello,
>
> * Ehren Metcalfe wrote on Tue, Nov 30, 2010 at 06:40:33AM CET:
>> In addition to the problems addressed by
>> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02752.html, there is an
>> issue with c-family headers being put in the main plugin include
>> directory rather than the c-family subdir. This breaks all headers
>> like cp-tree.h etc that #include "c-family/blah.h". Also, the
>> testsuite plugin examples have already been updated to use the
>> c-family dir (so with this and Mingjie Xing's patch they'll work
>> again).
>
> This needs a ChangeLog entry, I suggest something like
>
> gcc/ChangeLog:
> 2010-11-30  Ehren Metcalfe  <ehren.m@...>
>
>        * Makefile.in (install-plugin): Do not flatten c-family subdir.
>
>
> and I'm not sure if there is a required testing procedure for plugin
> patches, but if there's one, that should be tested too.  Patch looks ok
> otherwise.  Do you need someone to commit it for you?
>
> Thanks,
> Ralf
>
>> --- gcc/Makefile.in (revision 167286)
>> +++ gcc/Makefile.in (working copy)
>> @@ -4576,8 +4576,8 @@
>>
>>  # Install the headers needed to build a plugin.
>>  install-plugin: installdirs lang.install-plugin s-header-vars
>> -# We keep the directory structure for files in config and .def files. All
>> -# other files are flattened to a single directory.
>> +# We keep the directory structure for files in config, c-family and
>> +# .def files. All other files are flattened to a single directory.
>>   $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
>>   headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \
>>   srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
>> @@ -4589,7 +4589,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; \
>

Patch

Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 167286)
+++ gcc/Makefile.in (working copy)
@@ -4576,8 +4576,8 @@ 

 # Install the headers needed to build a plugin.
 install-plugin: installdirs lang.install-plugin s-header-vars
-# We keep the directory structure for files in config and .def files. All
-# other files are flattened to a single directory.
+# We keep the directory structure for files in config, c-family and
+# .def files. All other files are flattened to a single directory.
  $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
  headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \
  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
@@ -4589,7 +4589,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; \