summaryrefslogtreecommitdiff
path: root/lto-plugin/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'lto-plugin/Makefile.in')
-rw-r--r--lto-plugin/Makefile.in32
1 files changed, 17 insertions, 15 deletions
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 6e2fcc62a73..0a259e41ee8 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -222,6 +222,7 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+with_libiberty = @with_libiberty@
ACLOCAL_AMFLAGS = -I .. -I ../config
AUTOMAKE_OPTIONS = no-dependencies
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
@@ -233,25 +234,26 @@ AM_LIBTOOLFLAGS = --tag=disable-static
libexecsub_LTLIBRARIES = liblto_plugin.la
gcc_build_dir = ../$(host_subdir)/gcc
in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
-
-# Can be removed when libiberty becomes a normal convenience library
-Wc = -Wc,
-LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
liblto_plugin_la_SOURCES = lto-plugin.c
+# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
+liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module \
+ -bindir $(libexecsubdir) $(if $(wildcard \
+ $(libiberty_noasan)),, $(if $(wildcard \
+ $(libiberty_pic)),,-Wc,$(libiberty)))
+# Can be simplified when libiberty becomes a normal convenience library.
+libiberty = $(with_libiberty)/libiberty.a
+libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
+libiberty_pic = $(with_libiberty)/pic/libiberty.a
+Wc = -Wc,
liblto_plugin_la_LIBADD = \
- $(if $(wildcard ../libiberty/noasan/libiberty.a),$(Wc)../libiberty/noasan/libiberty.a, \
- $(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 = $(AM_LDFLAGS) \
- $(lt_host_flags) -module -bindir $(libexecsubdir) \
- $(if $(wildcard ../libiberty/noasan/libiberty.a),, \
- $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a))
+ $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ $(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic),))
-liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
- ../libiberty/noasan/libiberty.a),../libiberty/noasan/libiberty.a, \
- $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,))
+liblto_plugin_la_DEPENDENCIES = \
+ $(if $(wildcard $(libiberty_noasan)),$(libiberty_noasan), \
+ $(if $(wildcard $(libiberty_pic)),$(libiberty_pic),))
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@