summaryrefslogtreecommitdiff
path: root/lto-plugin/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'lto-plugin/Makefile.am')
-rw-r--r--lto-plugin/Makefile.am6
1 files changed, 4 insertions, 2 deletions
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index ba385c76c6f..778f99c6746 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -13,11 +13,13 @@ AM_CFLAGS = -Wall -Werror
libexecsub_LTLIBRARIES = liblto_plugin.la
liblto_plugin_la_SOURCES = lto-plugin.c
-liblto_plugin_la_LIBADD = \
+liblto_plugin_la_DEPENDENCIES = \
$(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+liblto_plugin_la_LIBADD = \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),-L../libiberty/pic -liberty,)
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
liblto_plugin_la_LDFLAGS = $(lt_host_flags) -bindir $(libexecsubdir) \
- $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
+ $(if $(wildcard ../libiberty/pic/libiberty.a),,-L../libiberty -liberty)
all: copy_lto_plugin