aboutsummaryrefslogtreecommitdiff
path: root/lto-plugin/Makefile.in
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2011-02-12 12:02:24 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2011-02-12 12:02:24 +0000
commitf3d533d3b5d828abef210862e9644b8ddf96c75b (patch)
tree8bcfb9dcec7e48ff47e67ef09881b7425eafa407 /lto-plugin/Makefile.in
parent9d53403cd24de4e43af117c256dabda6a8035ee7 (diff)
downloadgcc-f3d533d3b5d828abef210862e9644b8ddf96c75b.zip
gcc-f3d533d3b5d828abef210862e9644b8ddf96c75b.tar.gz
gcc-f3d533d3b5d828abef210862e9644b8ddf96c75b.tar.bz2
re PR lto/47225 (cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found")
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. From-SVN: r170070
Diffstat (limited to 'lto-plugin/Makefile.in')
-rw-r--r--lto-plugin/Makefile.in15
1 files changed, 11 insertions, 4 deletions
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index aa14e52..c519204 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.