aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRafael Avila de Espindola <espindola@google.com>2009-05-05 19:14:20 +0000
committerRafael Espindola <espindola@gcc.gnu.org>2009-05-05 19:14:20 +0000
commitbf016de89035d04e7b8ac5db5de08e69eaa3960b (patch)
tree283505dcbcebb39c8b8eb4682de5333f1c2bca12 /gcc
parent7f8fdb9ff9fb2b2a67adcdb822956275e6c9fcdb (diff)
downloadgcc-bf016de89035d04e7b8ac5db5de08e69eaa3960b.zip
gcc-bf016de89035d04e7b8ac5db5de08e69eaa3960b.tar.gz
gcc-bf016de89035d04e7b8ac5db5de08e69eaa3960b.tar.bz2
Makefile.in (enable_plugin, [...]): New.
2009-05-05 Rafael Avila de Espindola <espindola@google.com> * Makefile.in (enable_plugin, plugin_includedir): New. (install): Depend on install-plugin. (PLUGIN_HEADERS): New. (install-plugin): New. * config.gcc: Add vxworks-dummy.h to tm_file for x86 and x86-64. From-SVN: r147130
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/Makefile.in37
-rw-r--r--gcc/config.gcc2
3 files changed, 47 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 228ddb4..25b9af9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-05 Rafael Avila de Espindola <espindola@google.com>
+
+ * Makefile.in (enable_plugin, plugin_includedir): New.
+ (install): Depend on install-plugin.
+ (PLUGIN_HEADERS): New.
+ (install-plugin): New.
+ * config.gcc: Add vxworks-dummy.h to tm_file for x86 and x86-64.
+
2009-05-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40022
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0e13e49..89ac516 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -286,6 +286,8 @@ CLOOGINC = @CLOOGINC@
# Libs and linker option needed for plugin support
PLUGINLIBS = @pluginlibs@
+enable_plugin = @enable_plugin@
+
CPPLIB = ../libcpp/libcpp.a
CPPINC = -I$(srcdir)/../libcpp/include
@@ -481,6 +483,8 @@ libexecdir = @libexecdir@
libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
# Directory in which the compiler finds executables
libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+# Directory in which plugin headers are installed
+plugin_includedir = $(libsubdir)/plugin/include
# Used to produce a relative $(gcc_tooldir) in gcc.o
unlibsubdir = ../../..
# $(prefix), expressed as a path relative to $(libsubdir).
@@ -3973,6 +3977,10 @@ install: install-common $(INSTALL_HEADERS) \
install-cpp install-man install-info install-@POSUB@ \
install-driver
+ifeq ($(enable_plugin),yes)
+install: install-plugin
+endif
+
# Handle cpp installation.
install-cpp: installdirs cpp$(exeext)
-rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext)
@@ -3994,6 +4002,35 @@ installdirs:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
$(mkinstalldirs) $(DESTDIR)$(man7dir)
+PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ $(TOPLEV_H) $(BASIC_BLOCK_H) $(GIMPLE_H) $(TREE_PASS_H) gcc-plugin.h intl.h \
+ $(PLUGIN_VERSION_H)
+
+# Install the headers needed to build a plugin.
+install-plugin: installdirs
+# We keep the directory structure for files in config and .def files. All
+# other files are flattened to a single directory.
+ $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
+ headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\n' | sort -u`; \
+ for file in $$headers; do \
+ if [ -f $$file ] ; then \
+ path=$$file; \
+ elif [ -f $(srcdir)/$$file ]; then \
+ path=$(srcdir)/$$file; \
+ else continue; \
+ fi; \
+ case $$path in \
+ "$(srcdir)"*/config/* | "$(srcdir)"*.def ) \
+ base=`echo $$path | sed "s|$(srcdir)||"`;; \
+ *) base=`basename $$path` ;; \
+ esac; \
+ dest=$(plugin_includedir)/$$base; \
+ echo $(INSTALL_DATA) $$path $(DESTDIR)/$$dest; \
+ dir=`dirname $$dest`; \
+ $(mkinstalldirs) $$dir; \
+ $(INSTALL_DATA) $$path $(DESTDIR)/$$dest; \
+ done
+
# Install the compiler executables built during cross compilation.
install-common: native lang.install-common installdirs
for file in $(COMPILERS); do \
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 856a70b..503babe 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -375,12 +375,14 @@ i[34567]86-*-*)
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
+ tm_file="vxworks-dummy.h ${tm_file}"
;;
x86_64-*-*)
tm_file="i386/biarch64.h ${tm_file}"
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
+ tm_file="vxworks-dummy.h ${tm_file}"
;;
esac