public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: Fix PR testsuite/42843
@ 2010-01-23  0:57 Joern Rennecke
  2010-06-08 21:07 ` Update: " Joern Rennecke
  0 siblings, 1 reply; 3+ messages in thread
From: Joern Rennecke @ 2010-01-23  0:57 UTC (permalink / raw)
  To: gcc-patches

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

bootstrapped & regtested with the patch for PR42798 and
http://gcc.gnu.org/bugzilla/attachment.cgi?id=19696 for
the lingering PR36101 / PR42813 problem.

[-- Attachment #2: pr42843-fix --]
[-- Type: text/plain, Size: 10104 bytes --]

2010-01-22  Joern Rennecke  <amylaar@spamcop.net>

gcc:
	PR testsuite/42843
	* Makefile.in (HOST_PLUGIN_CC): Define.
	(site.exp): Set HOST_PLUGIN_CC.
gcc/testsuite:
	PR testsuite/42843
	* lib/plugin-support.exp: Use $HOST_PLUGIN_CC.
	* gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Use enumerator
	TV_NONE to initialize tv_id field.
	* g++.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise.
	* gcc.dg/plugin/one_time_plugin.c (one_pass): Likewise.
	* g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Likewise.
	Include toplev.h .
	* gcc.dg/plugin/finish_unit_plugin.c: Include cgraph.h.
	* g++.dg/plugin/attribute_plugin.c: Include toplev.h and plugin.h .
	* g++.dg/plugin/pragma_plugin.c: Include toplev.h .

Index: gcc/testsuite/gcc.dg/plugin/selfassign.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/selfassign.c	(revision 156172)
+++ gcc/testsuite/gcc.dg/plugin/selfassign.c	(working copy)
@@ -275,7 +275,7 @@ static struct gimple_opt_pass pass_warn_
     NULL,                                 /* sub */
     NULL,                                 /* next */
     0,                                    /* static_pass_number */
-    0,                                    /* tv_id */
+    TV_NONE,                              /* tv_id */
     PROP_ssa,                             /* properties_required */
     0,                                    /* properties_provided */
     0,                                    /* properties_destroyed */
Index: gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c	(revision 156172)
+++ gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c	(working copy)
@@ -12,6 +12,7 @@
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "cgraph.h"
 
 int plugin_is_GPL_compatible;
 
Index: gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/one_time_plugin.c	(revision 156172)
+++ gcc/testsuite/gcc.dg/plugin/one_time_plugin.c	(working copy)
@@ -37,7 +37,7 @@ struct gimple_opt_pass one_pass = 
   NULL,                                 /* sub */
   NULL,                                 /* next */
   0,                                    /* static_pass_number */
-  0,                                    /* tv_id */
+  TV_NONE,                              /* tv_id */
   PROP_gimple_any,                      /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
Index: gcc/testsuite/lib/plugin-support.exp
===================================================================
--- gcc/testsuite/lib/plugin-support.exp	(revision 156172)
+++ gcc/testsuite/lib/plugin-support.exp	(working copy)
@@ -63,8 +63,7 @@ proc plugin-test-execute { plugin_src pl
     global srcdir objdir
     global verbose
     global GMPINC
-    global HOSTCC
-    global HOSTCFLAGS
+    global HOST_PLUGIN_CC
 
     set basename [file tail $plugin_src]
     set base [file rootname $basename]
@@ -90,7 +89,7 @@ proc plugin-test-execute { plugin_src pl
 
     # Temporarily switch to the environment for the host compiler.
     restore_ld_library_path_env_vars
-    set status [remote_exec build "$HOSTCC $HOSTCFLAGS $plugin_src $optstr -o $plugin_lib"]
+    set status [remote_exec build "$HOST_PLUGIN_CC $plugin_src $optstr -o $plugin_lib"]
     set status [lindex $status 0]
     set_ld_library_path_env_vars
 
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 156172)
+++ gcc/Makefile.in	(working copy)
@@ -214,11 +214,13 @@ ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WI
 ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
 COMPILER = $(CC)
 COMPILER_FLAGS = $(CFLAGS)
+HOST_PLUGIN_CC ="$(CC) $(CFLAGS)"
 LINKER = $(CC)
 LINKER_FLAGS = $(CFLAGS)
 else
 COMPILER = $(CXX)
 COMPILER_FLAGS = $(CXXFLAGS)
+HOST_PLUGIN_CC ="$(CXX) $(CXXFLAGS)"
 # If HOST_LIBS is set, then the user is controlling the libraries to
 # link against.  In that case, link with $(CC) so that the -lstdc++
 # library is not introduced.  If HOST_LIBS is not set, link with
@@ -4589,6 +4591,7 @@ site.exp: ./config.status Makefile
 	@echo "set CXXFLAGS \"\"" >> ./tmp0
 	@echo "set HOSTCC \"$(CC)\"" >> ./tmp0
 	@echo "set HOSTCFLAGS \"$(CFLAGS)\"" >> ./tmp0
+	@echo "set HOST_PLUGIN_CC \"$(HOST_PLUGIN_CC)\"" >> ./tmp0
 # When running the tests we set GCC_EXEC_PREFIX to the install tree so that
 # files that have already been installed there will be found.  The -B option
 # overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files
Index: gcc.dg/plugin/selfassign.c
===================================================================
--- gcc.dg/plugin/selfassign.c	(revision 156172)
+++ gcc.dg/plugin/selfassign.c	(working copy)
@@ -275,7 +275,7 @@ static struct gimple_opt_pass pass_warn_
     NULL,                                 /* sub */
     NULL,                                 /* next */
     0,                                    /* static_pass_number */
-    0,                                    /* tv_id */
+    TV_NONE,                              /* tv_id */
     PROP_ssa,                             /* properties_required */
     0,                                    /* properties_provided */
     0,                                    /* properties_destroyed */
Index: gcc.dg/plugin/finish_unit_plugin.c
===================================================================
--- gcc.dg/plugin/finish_unit_plugin.c	(revision 156172)
+++ gcc.dg/plugin/finish_unit_plugin.c	(working copy)
@@ -12,6 +12,7 @@
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "cgraph.h"
 
 int plugin_is_GPL_compatible;
 
Index: gcc.dg/plugin/one_time_plugin.c
===================================================================
--- gcc.dg/plugin/one_time_plugin.c	(revision 156172)
+++ gcc.dg/plugin/one_time_plugin.c	(working copy)
@@ -37,7 +37,7 @@ struct gimple_opt_pass one_pass = 
   NULL,                                 /* sub */
   NULL,                                 /* next */
   0,                                    /* static_pass_number */
-  0,                                    /* tv_id */
+  TV_NONE,                              /* tv_id */
   PROP_gimple_any,                      /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
Index: g++.dg/plugin/selfassign.c
===================================================================
--- g++.dg/plugin/selfassign.c	(revision 156172)
+++ g++.dg/plugin/selfassign.c	(working copy)
@@ -275,7 +275,7 @@ static struct gimple_opt_pass pass_warn_
     NULL,                                 /* sub */
     NULL,                                 /* next */
     0,                                    /* static_pass_number */
-    0,                                    /* tv_id */
+    TV_NONE,                              /* tv_id */
     PROP_ssa,                             /* properties_required */
     0,                                    /* properties_provided */
     0,                                    /* properties_destroyed */
Index: g++.dg/plugin/attribute_plugin.c
===================================================================
--- g++.dg/plugin/attribute_plugin.c	(revision 156172)
+++ g++.dg/plugin/attribute_plugin.c	(working copy)
@@ -8,6 +8,8 @@
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "toplev.h"
+#include "plugin.h"
 
 int plugin_is_GPL_compatible;
 
Index: g++.dg/plugin/dumb_plugin.c
===================================================================
--- g++.dg/plugin/dumb_plugin.c	(revision 156172)
+++ g++.dg/plugin/dumb_plugin.c	(working copy)
@@ -9,6 +9,7 @@
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "toplev.h"
 
 int plugin_is_GPL_compatible;
 
@@ -65,7 +66,7 @@ static struct gimple_opt_pass pass_dumb_
     NULL,                                 /* sub */
     NULL,                                 /* next */
     0,                                    /* static_pass_number */
-    0,                                    /* tv_id */
+    TV_NONE,                              /* tv_id */
     PROP_cfg,                             /* properties_required */
     0,                                    /* properties_provided */
     0,                                    /* properties_destroyed */
Index: g++.dg/plugin/pragma_plugin.c
===================================================================
--- g++.dg/plugin/pragma_plugin.c	(revision 156172)
+++ g++.dg/plugin/pragma_plugin.c	(working copy)
@@ -13,6 +13,7 @@
 #include "cpplib.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "toplev.h"
 
 int plugin_is_GPL_compatible;
 
Index: lib/plugin-support.exp
===================================================================
--- lib/plugin-support.exp	(revision 156172)
+++ lib/plugin-support.exp	(working copy)
@@ -63,8 +63,7 @@ proc plugin-test-execute { plugin_src pl
     global srcdir objdir
     global verbose
     global GMPINC
-    global HOSTCC
-    global HOSTCFLAGS
+    global HOST_PLUGIN_CC
 
     set basename [file tail $plugin_src]
     set base [file rootname $basename]
@@ -90,7 +89,7 @@ proc plugin-test-execute { plugin_src pl
 
     # Temporarily switch to the environment for the host compiler.
     restore_ld_library_path_env_vars
-    set status [remote_exec build "$HOSTCC $HOSTCFLAGS $plugin_src $optstr -o $plugin_lib"]
+    set status [remote_exec build "$HOST_PLUGIN_CC $plugin_src $optstr -o $plugin_lib"]
     set status [lindex $status 0]
     set_ld_library_path_env_vars
 

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

* Update: RFA: Fix PR testsuite/42843
  2010-01-23  0:57 RFA: Fix PR testsuite/42843 Joern Rennecke
@ 2010-06-08 21:07 ` Joern Rennecke
  2010-06-09  9:58   ` Richard Guenther
  0 siblings, 1 reply; 3+ messages in thread
From: Joern Rennecke @ 2010-06-08 21:07 UTC (permalink / raw)
  To: gcc-patches

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

This is an update of the patch to trunk revision 160389, which takes changes
in Makefile.in and lib/plugin-support.exp into account.

I've also added changes to gcc-plugin.h / doc/plugins.texi to prevent  
potential
problems with name mangling of plugin_is_GPL_compatible, as diccussed in this
thread:

http://gcc.gnu.org/ml/gcc/2010-06/msg00319.html

Bootstrapped and regression tested in revision 160389; there are no  
regressions
for an --enable-build-with-cxx build with this patch compared with a C of
unmodified revision 160389 trunk.

[-- Attachment #2: pr42843-fix-20100608 --]
[-- Type: text/plain, Size: 7483 bytes --]

2010-01-22  Joern Rennecke  <amylaar@spamcop.net>

gcc:
	PR testsuite/42843
	* gcc-plugin.h (int plugin_is_GPL_compatible): Declare as extern "C".
	* doc/plugins.texi (Plugin license check): Update information
	on type of plugin_is_GPL_compatible.
	* Makefile.in (PLUGINCC): Define as $(COMPILER).
	(PLUGINCFLAGS): Define as $(COMPILER_FLAGS).
gcc/testsuite:
	PR testsuite/42843
	* gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Use enumerator
	TV_NONE to initialize tv_id field.
	* g++.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise.
	* gcc.dg/plugin/one_time_plugin.c (one_pass): Likewise.
	* g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Likewise.
	Include toplev.h .
	* gcc.dg/plugin/finish_unit_plugin.c: Include cgraph.h.
	* g++.dg/plugin/attribute_plugin.c: Include toplev.h and plugin.h .
	* g++.dg/plugin/pragma_plugin.c: Include toplev.h .

Index: gcc/doc/plugins.texi
===================================================================
--- gcc/doc/plugins.texi	(revision 160389)
+++ gcc/doc/plugins.texi	(working copy)
@@ -50,8 +50,10 @@ fatal error: plugin <name> is not licens
 compilation terminated
 @end smallexample
 
-The type of the symbol is irrelevant.  The compiler merely asserts that
-it exists in the global scope.  Something like this is enough:
+The declared type of the symbol should be int, to match a forward declaration
+in @file{gcc-plugin.h} that suppresses C++ mangling.  It does not need to be in
+any allocated section, though.  The compiler merely asserts that
+the symbol exists in the global scope.  Something like this is enough:
 
 @smallexample
 int plugin_is_GPL_compatible;
Index: gcc/testsuite/gcc.dg/plugin/selfassign.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/selfassign.c	(revision 160389)
+++ gcc/testsuite/gcc.dg/plugin/selfassign.c	(working copy)
@@ -275,7 +275,7 @@ static struct gimple_opt_pass pass_warn_
     NULL,                                 /* sub */
     NULL,                                 /* next */
     0,                                    /* static_pass_number */
-    0,                                    /* tv_id */
+    TV_NONE,                              /* tv_id */
     PROP_ssa,                             /* properties_required */
     0,                                    /* properties_provided */
     0,                                    /* properties_destroyed */
Index: gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/one_time_plugin.c	(revision 160389)
+++ gcc/testsuite/gcc.dg/plugin/one_time_plugin.c	(working copy)
@@ -37,7 +37,7 @@ struct gimple_opt_pass one_pass = 
   NULL,                                 /* sub */
   NULL,                                 /* next */
   0,                                    /* static_pass_number */
-  0,                                    /* tv_id */
+  TV_NONE,                              /* tv_id */
   PROP_gimple_any,                      /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
Index: gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c	(revision 160389)
+++ gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c	(working copy)
@@ -12,6 +12,7 @@
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "cgraph.h"
 
 int plugin_is_GPL_compatible;
 
Index: gcc/testsuite/g++.dg/plugin/selfassign.c
===================================================================
--- gcc/testsuite/g++.dg/plugin/selfassign.c	(revision 160389)
+++ gcc/testsuite/g++.dg/plugin/selfassign.c	(working copy)
@@ -275,7 +275,7 @@ static struct gimple_opt_pass pass_warn_
     NULL,                                 /* sub */
     NULL,                                 /* next */
     0,                                    /* static_pass_number */
-    0,                                    /* tv_id */
+    TV_NONE,                              /* tv_id */
     PROP_ssa,                             /* properties_required */
     0,                                    /* properties_provided */
     0,                                    /* properties_destroyed */
Index: gcc/testsuite/g++.dg/plugin/attribute_plugin.c
===================================================================
--- gcc/testsuite/g++.dg/plugin/attribute_plugin.c	(revision 160389)
+++ gcc/testsuite/g++.dg/plugin/attribute_plugin.c	(working copy)
@@ -8,6 +8,8 @@
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "toplev.h"
+#include "plugin.h"
 
 int plugin_is_GPL_compatible;
 
Index: gcc/testsuite/g++.dg/plugin/dumb_plugin.c
===================================================================
--- gcc/testsuite/g++.dg/plugin/dumb_plugin.c	(revision 160389)
+++ gcc/testsuite/g++.dg/plugin/dumb_plugin.c	(working copy)
@@ -9,6 +9,7 @@
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "toplev.h"
 
 int plugin_is_GPL_compatible;
 
@@ -65,7 +66,7 @@ static struct gimple_opt_pass pass_dumb_
     NULL,                                 /* sub */
     NULL,                                 /* next */
     0,                                    /* static_pass_number */
-    0,                                    /* tv_id */
+    TV_NONE,                              /* tv_id */
     PROP_cfg,                             /* properties_required */
     0,                                    /* properties_provided */
     0,                                    /* properties_destroyed */
Index: gcc/testsuite/g++.dg/plugin/pragma_plugin.c
===================================================================
--- gcc/testsuite/g++.dg/plugin/pragma_plugin.c	(revision 160389)
+++ gcc/testsuite/g++.dg/plugin/pragma_plugin.c	(working copy)
@@ -13,6 +13,7 @@
 #include "cpplib.h"
 #include "tree-pass.h"
 #include "intl.h"
+#include "toplev.h"
 
 int plugin_is_GPL_compatible;
 
Index: gcc/gcc-plugin.h
===================================================================
--- gcc/gcc-plugin.h	(revision 160389)
+++ gcc/gcc-plugin.h	(working copy)
@@ -147,4 +147,15 @@ extern int unregister_callback (const ch
    -iplugindir program argument to cc1.  */
 extern const char* default_plugin_dir_name (void);
 
+/* In case the C++ compiler does name mangling for globals, declare
+   plugin_is_GPL_compatible extern "C" so that a later definition
+   in a plugin file will have this linkage.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int plugin_is_GPL_compatible;
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* GCC_PLUGIN_H */
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 160389)
+++ gcc/Makefile.in	(working copy)
@@ -331,10 +331,10 @@ LTO_BINARY_READER = @LTO_BINARY_READER@
 LTO_USE_LIBELF = @LTO_USE_LIBELF@
 
 # Compiler needed for plugin support
-PLUGINCC = @CC@
+PLUGINCC = $(COMPILER)
 
 # Flags needed for plugin support
-PLUGINCFLAGS = @CFLAGS@
+PLUGINCFLAGS = $(COMPILER_FLAGS)
 
 # Libs and linker options needed for plugin support
 PLUGINLIBS = @pluginlibs@

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

* Re: Update: RFA: Fix PR testsuite/42843
  2010-06-08 21:07 ` Update: " Joern Rennecke
@ 2010-06-09  9:58   ` Richard Guenther
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Guenther @ 2010-06-09  9:58 UTC (permalink / raw)
  To: Joern Rennecke; +Cc: gcc-patches

On Tue, Jun 8, 2010 at 10:49 PM, Joern Rennecke <amylaar@spamcop.net> wrote:
> This is an update of the patch to trunk revision 160389, which takes changes
> in Makefile.in and lib/plugin-support.exp into account.
>
> I've also added changes to gcc-plugin.h / doc/plugins.texi to prevent
> potential
> problems with name mangling of plugin_is_GPL_compatible, as diccussed in
> this
> thread:
>
> http://gcc.gnu.org/ml/gcc/2010-06/msg00319.html
>
> Bootstrapped and regression tested in revision 160389; there are no
> regressions
> for an --enable-build-with-cxx build with this patch compared with a C of
> unmodified revision 160389 trunk.

Ok.

Thanks,
Richard.

> 2010-01-22  Joern Rennecke  <amylaar@spamcop.net>
>
> gcc:
>        PR testsuite/42843
>        * gcc-plugin.h (int plugin_is_GPL_compatible): Declare as extern "C".
>        * doc/plugins.texi (Plugin license check): Update information
>        on type of plugin_is_GPL_compatible.
>        * Makefile.in (PLUGINCC): Define as $(COMPILER).
>        (PLUGINCFLAGS): Define as $(COMPILER_FLAGS).
> gcc/testsuite:
>        PR testsuite/42843
>        * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Use enumerator
>        TV_NONE to initialize tv_id field.
>        * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise.
>        * gcc.dg/plugin/one_time_plugin.c (one_pass): Likewise.
>        * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Likewise.
>        Include toplev.h .
>        * gcc.dg/plugin/finish_unit_plugin.c: Include cgraph.h.
>        * g++.dg/plugin/attribute_plugin.c: Include toplev.h and plugin.h .
>        * g++.dg/plugin/pragma_plugin.c: Include toplev.h .
>
> Index: gcc/doc/plugins.texi
> ===================================================================
> --- gcc/doc/plugins.texi        (revision 160389)
> +++ gcc/doc/plugins.texi        (working copy)
> @@ -50,8 +50,10 @@ fatal error: plugin <name> is not licens
>  compilation terminated
>  @end smallexample
>
> -The type of the symbol is irrelevant.  The compiler merely asserts that
> -it exists in the global scope.  Something like this is enough:
> +The declared type of the symbol should be int, to match a forward
> declaration
> +in @file{gcc-plugin.h} that suppresses C++ mangling.  It does not need to
> be in
> +any allocated section, though.  The compiler merely asserts that
> +the symbol exists in the global scope.  Something like this is enough:
>
>  @smallexample
>  int plugin_is_GPL_compatible;
> Index: gcc/testsuite/gcc.dg/plugin/selfassign.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/plugin/selfassign.c    (revision 160389)
> +++ gcc/testsuite/gcc.dg/plugin/selfassign.c    (working copy)
> @@ -275,7 +275,7 @@ static struct gimple_opt_pass pass_warn_
>     NULL,                                 /* sub */
>     NULL,                                 /* next */
>     0,                                    /* static_pass_number */
> -    0,                                    /* tv_id */
> +    TV_NONE,                              /* tv_id */
>     PROP_ssa,                             /* properties_required */
>     0,                                    /* properties_provided */
>     0,                                    /* properties_destroyed */
> Index: gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/plugin/one_time_plugin.c       (revision 160389)
> +++ gcc/testsuite/gcc.dg/plugin/one_time_plugin.c       (working copy)
> @@ -37,7 +37,7 @@ struct gimple_opt_pass one_pass =
>   NULL,                                 /* sub */
>   NULL,                                 /* next */
>   0,                                    /* static_pass_number */
> -  0,                                    /* tv_id */
> +  TV_NONE,                              /* tv_id */
>   PROP_gimple_any,                      /* properties_required */
>   0,                                    /* properties_provided */
>   0,                                    /* properties_destroyed */
> Index: gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c    (revision 160389)
> +++ gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c    (working copy)
> @@ -12,6 +12,7 @@
>  #include "tree.h"
>  #include "tree-pass.h"
>  #include "intl.h"
> +#include "cgraph.h"
>
>  int plugin_is_GPL_compatible;
>
> Index: gcc/testsuite/g++.dg/plugin/selfassign.c
> ===================================================================
> --- gcc/testsuite/g++.dg/plugin/selfassign.c    (revision 160389)
> +++ gcc/testsuite/g++.dg/plugin/selfassign.c    (working copy)
> @@ -275,7 +275,7 @@ static struct gimple_opt_pass pass_warn_
>     NULL,                                 /* sub */
>     NULL,                                 /* next */
>     0,                                    /* static_pass_number */
> -    0,                                    /* tv_id */
> +    TV_NONE,                              /* tv_id */
>     PROP_ssa,                             /* properties_required */
>     0,                                    /* properties_provided */
>     0,                                    /* properties_destroyed */
> Index: gcc/testsuite/g++.dg/plugin/attribute_plugin.c
> ===================================================================
> --- gcc/testsuite/g++.dg/plugin/attribute_plugin.c      (revision 160389)
> +++ gcc/testsuite/g++.dg/plugin/attribute_plugin.c      (working copy)
> @@ -8,6 +8,8 @@
>  #include "tree.h"
>  #include "tree-pass.h"
>  #include "intl.h"
> +#include "toplev.h"
> +#include "plugin.h"
>
>  int plugin_is_GPL_compatible;
>
> Index: gcc/testsuite/g++.dg/plugin/dumb_plugin.c
> ===================================================================
> --- gcc/testsuite/g++.dg/plugin/dumb_plugin.c   (revision 160389)
> +++ gcc/testsuite/g++.dg/plugin/dumb_plugin.c   (working copy)
> @@ -9,6 +9,7 @@
>  #include "tree.h"
>  #include "tree-pass.h"
>  #include "intl.h"
> +#include "toplev.h"
>
>  int plugin_is_GPL_compatible;
>
> @@ -65,7 +66,7 @@ static struct gimple_opt_pass pass_dumb_
>     NULL,                                 /* sub */
>     NULL,                                 /* next */
>     0,                                    /* static_pass_number */
> -    0,                                    /* tv_id */
> +    TV_NONE,                              /* tv_id */
>     PROP_cfg,                             /* properties_required */
>     0,                                    /* properties_provided */
>     0,                                    /* properties_destroyed */
> Index: gcc/testsuite/g++.dg/plugin/pragma_plugin.c
> ===================================================================
> --- gcc/testsuite/g++.dg/plugin/pragma_plugin.c (revision 160389)
> +++ gcc/testsuite/g++.dg/plugin/pragma_plugin.c (working copy)
> @@ -13,6 +13,7 @@
>  #include "cpplib.h"
>  #include "tree-pass.h"
>  #include "intl.h"
> +#include "toplev.h"
>
>  int plugin_is_GPL_compatible;
>
> Index: gcc/gcc-plugin.h
> ===================================================================
> --- gcc/gcc-plugin.h    (revision 160389)
> +++ gcc/gcc-plugin.h    (working copy)
> @@ -147,4 +147,15 @@ extern int unregister_callback (const ch
>    -iplugindir program argument to cc1.  */
>  extern const char* default_plugin_dir_name (void);
>
> +/* In case the C++ compiler does name mangling for globals, declare
> +   plugin_is_GPL_compatible extern "C" so that a later definition
> +   in a plugin file will have this linkage.  */
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +extern int plugin_is_GPL_compatible;
> +#ifdef __cplusplus
> +}
> +#endif
> +
>  #endif /* GCC_PLUGIN_H */
> Index: gcc/Makefile.in
> ===================================================================
> --- gcc/Makefile.in     (revision 160389)
> +++ gcc/Makefile.in     (working copy)
> @@ -331,10 +331,10 @@ LTO_BINARY_READER = @LTO_BINARY_READER@
>  LTO_USE_LIBELF = @LTO_USE_LIBELF@
>
>  # Compiler needed for plugin support
> -PLUGINCC = @CC@
> +PLUGINCC = $(COMPILER)
>
>  # Flags needed for plugin support
> -PLUGINCFLAGS = @CFLAGS@
> +PLUGINCFLAGS = $(COMPILER_FLAGS)
>
>  # Libs and linker options needed for plugin support
>  PLUGINLIBS = @pluginlibs@
>
>

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

end of thread, other threads:[~2010-06-09  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-23  0:57 RFA: Fix PR testsuite/42843 Joern Rennecke
2010-06-08 21:07 ` Update: " Joern Rennecke
2010-06-09  9:58   ` Richard Guenther

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