This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[plugins] RFA: Merge plugins into mainline [4/5 - configury]


Part 4 contains all the changes done to configuration scripts.
See http://gcc.gnu.org/ml/gcc-patches/2009-04/msg00186.html for a
general description of the merge.


Diego.

2009-04-02  Le-Chun Wu  <lcwu@google.com>

	* configure.ac: Add --enalbe-plugin support. Set pluginlibs only for
	ELF targets.
	* configure: Regenerate.
	* Makefile.tpl: Define and export PLUGINLIBS.
	* Makefile.in: Regenerate.

gcc/ChangeLog

2009-04-02  Le-Chun Wu  <lcwu@google.com>

	* configure.ac: Add PLUGINLIBS variable.
	* configure: Regenerate.
	* Makefile.in: Add PLUGINLIBS to link command. Add/modify dependencies
	for plugin.o and files including plugin.h.

gcc/cp/ChangeLog

2009-04-02  Le-Chun Wu  <lcwu@google.com>

	* Make-lang.in: Modify dependencies of files including plugin.h.

Index: Makefile.in
===================================================================
--- Makefile.in	(.../trunk)	(revision 145344)
+++ Makefile.in	(.../branches/plugins)	(revision 145453)
@@ -200,6 +200,7 @@ HOST_EXPORTS = \
 	PPLINC="$(HOST_PPLINC)"; export PPLINC; \
 	CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
 	CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
+	PLUGINLIBS="$(HOST_PLUGINLIBS)"; export PLUGINLIBS; \
 @if gcc-bootstrap
 	$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
 @endif gcc-bootstrap
@@ -267,6 +268,9 @@ HOST_PPLINC = @pplinc@
 HOST_CLOOGLIBS = @clooglibs@
 HOST_CLOOGINC = @clooginc@
 
+# Libs and linker option needed for plugin support
+HOST_PLUGINLIBS = @pluginlibs@
+
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(.../trunk)	(revision 145344)
+++ gcc/configure.ac	(.../branches/plugins)	(revision 145453)
@@ -780,7 +780,7 @@ esac],
 [onestep=""])
 AC_SUBST(onestep)
 
-ACX_PKGVERSION([GCC])
+ACX_PKGVERSION([plugins merged with rev 145344])
 ACX_BUGURL([http://gcc.gnu.org/bugs.html])
 
 # Sanity check enable_languages in case someone does not run the toplevel
@@ -3948,6 +3948,8 @@ if test "x${CLOOGLIBS}" != "x" ; then 
    AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
 fi
 
+AC_ARG_VAR(PLUGINLIBS,[Libs and linker option needed for plugin support])
+
 # Configure the subdirectories
 # AC_CONFIG_SUBDIRS($subdirs)
 
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(.../trunk)	(revision 145344)
+++ gcc/Makefile.in	(.../branches/plugins)	(revision 145453)
@@ -285,6 +285,9 @@ PPLINC = @PPLINC@
 CLOOGLIBS = @CLOOGLIBS@
 CLOOGINC = @CLOOGINC@
 
+# Libs and linker option needed for plugin support
+PLUGINLIBS = @PLUGINLIBS@
+
 CPPLIB = ../libcpp/libcpp.a
 CPPINC = -I$(srcdir)/../libcpp/include
 
@@ -904,7 +907,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
 # How to link with both our special library facilities
 # and the system's installed libraries.
 LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER)
-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS)
+BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS)
 # Any system libraries needed just for GNAT.
 SYSLIBS = @GNAT_LIBEXC@
 
@@ -1146,6 +1149,7 @@ OBJS-common = \
 	opts.o \
 	params.o \
 	passes.o \
+	plugin.o \
 	pointer-set.o \
 	postreload-gcse.o \
 	postreload.o \
@@ -1799,7 +1803,7 @@ c-errors.o: c-errors.c $(CONFIG_H) $(SYS
 c-parser.o : c-parser.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
     $(GGC_H) $(TIMEVAR_H) $(C_TREE_H) $(INPUT_H) $(FLAGS_H) $(TOPLEV_H) output.h \
     $(CPPLIB_H) gt-c-parser.h $(RTL_H) langhooks.h $(C_COMMON_H) $(C_PRAGMA_H) \
-    vec.h $(TARGET_H) $(CGRAPH_H)
+    vec.h $(TARGET_H) $(CGRAPH_H) plugin.h
 
 srcextra: gcc.srcextra lang.srcextra
 
@@ -2428,7 +2432,7 @@ diagnostic.o : diagnostic.c $(CONFIG_H) 
 opts.o : opts.c opts.h options.h $(TOPLEV_H) $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h $(TREE_H) $(TM_H) langhooks.h $(GGC_H) $(EXPR_H) $(RTL_H) \
    output.h $(DIAGNOSTIC_H) $(TM_P_H) $(INSN_ATTR_H) intl.h $(TARGET_H) \
-   $(FLAGS_H) $(PARAMS_H) tree-pass.h $(DBGCNT_H) debug.h varray.h
+   $(FLAGS_H) $(PARAMS_H) tree-pass.h $(DBGCNT_H) debug.h varray.h plugin.h
 opts-common.o : opts-common.c opts.h $(CONFIG_H) $(SYSTEM_H) \
    coretypes.h intl.h
 targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
@@ -2444,7 +2448,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM
    value-prof.h $(PARAMS_H) $(TM_P_H) reload.h ira.h dwarf2asm.h $(TARGET_H) \
    langhooks.h insn-flags.h $(CFGLAYOUT_H) $(CFGLOOP_H) hosthooks.h \
    $(CGRAPH_H) $(COVERAGE_H) alloc-pool.h $(GGC_H) $(INTEGRATE_H) \
-   opts.h params.def tree-mudflap.h $(REAL_H) tree-pass.h $(GIMPLE_H)
+   opts.h params.def tree-mudflap.h $(REAL_H) tree-pass.h $(GIMPLE_H) plugin.h
 	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
 	  -DTARGET_NAME=\"$(target_noncanonical)\" \
 	  -c $(srcdir)/toplev.c $(OUTPUT_OPTION)
@@ -2460,6 +2464,9 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM
    $(GGC_H) $(INTEGRATE_H) $(CPPLIB_H) opts.h $(TREE_FLOW_H) $(TREE_INLINE_H) \
    gt-passes.h $(DF_H) $(PREDICT_H)
 
+plugin.o : plugin.c plugin.h gcc-plugin.h $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+   errors.h $(TOPLEV_H) $(TREE_H) tree-pass.h intl.h
+
 main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H)
 
 host-default.o : host-default.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
Index: gcc/cp/Make-lang.in
===================================================================
--- gcc/cp/Make-lang.in	(.../trunk)	(revision 145344)
+++ gcc/cp/Make-lang.in	(.../branches/plugins)	(revision 145453)
@@ -240,7 +240,7 @@ cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H)
 cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) cp/decl.h \
   output.h $(EXPR_H) except.h toplev.h $(HASHTAB_H) $(RTL_H) \
   cp/operators.def $(TM_P_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(C_PRAGMA_H) \
-  debug.h gt-cp-decl.h $(TIMEVAR_H) $(TREE_FLOW_H) $(TARGET_H)
+  debug.h gt-cp-decl.h $(TIMEVAR_H) $(TREE_FLOW_H) $(TARGET_H) plugin.h
 cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) cp/decl.h $(EXPR_H) \
   output.h except.h toplev.h $(RTL_H) $(C_COMMON_H) gt-cp-decl2.h $(CGRAPH_H) \
   $(C_PRAGMA_H) $(TREE_DUMP_H) intl.h $(TARGET_H) $(GIMPLE_H)
@@ -292,7 +292,7 @@ cp/optimize.o: cp/optimize.c $(CXX_TREE_
 cp/mangle.o: cp/mangle.c $(CXX_TREE_H) $(TM_H) toplev.h $(REAL_H) \
   gt-cp-mangle.h $(TARGET_H) $(TM_P_H)
 cp/parser.o: cp/parser.c $(CXX_TREE_H) $(TM_H) $(DIAGNOSTIC_H) gt-cp-parser.h \
-  output.h $(TARGET_H)
+  output.h $(TARGET_H) plugin.h
 cp/cp-gimplify.o: cp/cp-gimplify.c $(CXX_TREE_H) toplev.h $(C_COMMON_H) \
 	$(TM_H) coretypes.h pointer-set.h tree-iterator.h
 
Index: configure.ac
===================================================================
--- configure.ac	(.../trunk)	(revision 145344)
+++ configure.ac	(.../branches/plugins)	(revision 145453)
@@ -405,6 +405,38 @@ no)
 esac
 
 
+AC_ARG_ENABLE(plugin,
+[  --enable-plugin         enable plugin support],
+ENABLE_PLUGIN=$enableval,
+ENABLE_PLUGIN=yes)
+
+pluginlibs=
+if test "${ENABLE_PLUGIN}" = "yes"; then
+  # Check for ELF target.
+  is_elf=no
+  case "${target}" in
+    *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
+    | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
+    | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2*)
+      case "${target}" in
+        *-*-linux*aout* | *-*-linux*oldld*)
+          ;;
+        *)
+          is_elf=yes
+          ;;
+      esac
+  esac
+
+  # Currently plugins are only supported in ELF.
+  if test "$is_elf" = "yes"; then
+    pluginlibs="-rdynamic -ldl"
+  fi
+fi
+
+# Flag needed for plugin support
+AC_SUBST(pluginlibs)
+
+
 # Disable libmudflap on some systems.
 if test x$enable_libmudflap = x ; then
     case "${target}" in
Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(.../trunk)	(revision 145344)
+++ Makefile.tpl	(.../branches/plugins)	(revision 145453)
@@ -203,6 +203,7 @@ HOST_EXPORTS = \
 	PPLINC="$(HOST_PPLINC)"; export PPLINC; \
 	CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
 	CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
+	PLUGINLIBS="$(HOST_PLUGINLIBS)"; export PLUGINLIBS; \
 @if gcc-bootstrap
 	$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
 @endif gcc-bootstrap
@@ -270,6 +271,9 @@ HOST_PPLINC = @pplinc@
 HOST_CLOOGLIBS = @clooglibs@
 HOST_CLOOGINC = @clooginc@
 
+# Libs and linker option needed for plugin support
+HOST_PLUGINLIBS = @pluginlibs@
+
 # ----------------------------------------------
 # Programs producing files for the BUILD machine
 # ----------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]