summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-12 12:02:24 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-12 12:02:24 +0000
commit98de52623f0f498542552dc1fb11bed5f2251597 (patch)
tree8bcfb9dcec7e48ff47e67ef09881b7425eafa407 /lto-plugin
parent5886e9ab77a758fcd5dd5e9040078dd38c823ba5 (diff)
ChangeLog:
PR lto/47225 * Makefile.def (lto-plugin): Double dash for enable-shared. (configure-gcc): Depend on all-lto-plugin. * Makefile.in: Rebuilt. lto-plugin/ChangeLog: PR lto/47225 * Makefile.am (gcc_build_dir, in_gcc_libs): New. (liblto_plugin_la_LDFLAGS): Add -module. (copy_lto_plugin): Renamed to... ($(in_gcc_libs)): ... this. Add mkinstalldirs. Skip copying of static modules. * Makefile.in: Rebuild. gcc/ChangeLog: PR lto/47225 * configure.ac (gcc_cv_lto_plugin): Test for liblto_plugin.la in the current directory. * configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170070 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog10
-rw-r--r--lto-plugin/Makefile.am16
-rw-r--r--lto-plugin/Makefile.in15
3 files changed, 32 insertions, 9 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index 1129a3784326..9355ea57dfc3 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,3 +1,13 @@
+2011-02-12 Alexandre Oliva <aoliva@redhat.com>
+
+ PR lto/47225
+ * Makefile.am (gcc_build_dir, in_gcc_libs): New.
+ (liblto_plugin_la_LDFLAGS): Add -module.
+ (copy_lto_plugin): Renamed to...
+ ($(in_gcc_libs)): ... this. Add mkinstalldirs. Skip copying
+ of static modules.
+ * Makefile.in: Rebuild.
+
2011-02-07 Kai Tietz <kai.tietz@onevision.com>
PR lto/47225
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index a150f80f50c4..fd9ea625f9bf 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -12,6 +12,8 @@ AM_CFLAGS = -Wall -Werror
AM_LIBTOOLFLAGS = --tag=disable-static
libexecsub_LTLIBRARIES = liblto_plugin.la
+gcc_build_dir = ../gcc
+in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
# Can be removed when libiberty becomes a normal convenience library
Wc=-Wc,
@@ -20,13 +22,17 @@ liblto_plugin_la_SOURCES = lto-plugin.c
liblto_plugin_la_LIBADD = \
$(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
-liblto_plugin_la_LDFLAGS = $(lt_host_flags) -bindir $(libexecsubdir) \
+liblto_plugin_la_LDFLAGS = $(lt_host_flags) -module -bindir $(libexecsubdir) \
$(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
-all: copy_lto_plugin
-
-copy_lto_plugin: all-am
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $(libexecsub_LTLIBRARIES) `pwd`/../gcc/
+all: $(in_gcc_libs)
+$(in_gcc_libs) : $(gcc_build_dir)/%: %
+ @if test "X`dlname=; . ./$*; echo dlname:$$dlname`" = "Xdlname:"; then \
+ echo WARNING: $* is static, not copying to $@ >&2 ; \
+ else \
+ $(mkinstalldirs) $(gcc_build_dir) && \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $* `pwd`/$@ ; \
+ fi
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index aa14e52a031d..c5192041703d 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -230,6 +230,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
AM_CFLAGS = -Wall -Werror
AM_LIBTOOLFLAGS = --tag=disable-static
libexecsub_LTLIBRARIES = liblto_plugin.la
+gcc_build_dir = ../gcc
+in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
# Can be removed when libiberty becomes a normal convenience library
Wc = -Wc,
@@ -238,7 +240,7 @@ liblto_plugin_la_LIBADD = \
$(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
-liblto_plugin_la_LDFLAGS = $(lt_host_flags) -bindir $(libexecsubdir) \
+liblto_plugin_la_LDFLAGS = $(lt_host_flags) -module -bindir $(libexecsubdir) \
$(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
@@ -530,10 +532,15 @@ uninstall-am: uninstall-libexecsubLTLIBRARIES
tags uninstall uninstall-am uninstall-libexecsubLTLIBRARIES
-all: copy_lto_plugin
+all: $(in_gcc_libs)
-copy_lto_plugin: all-am
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $(libexecsub_LTLIBRARIES) `pwd`/../gcc/
+$(in_gcc_libs) : $(gcc_build_dir)/%: %
+ @if test "X`dlname=; . ./$*; echo dlname:$$dlname`" = "Xdlname:"; then \
+ echo WARNING: $* is static, not copying to $@ >&2 ; \
+ else \
+ $(mkinstalldirs) $(gcc_build_dir) && \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $* `pwd`/$@ ; \
+ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.