aboutsummaryrefslogtreecommitdiff
path: root/lto-plugin/Makefile.in
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2010-10-07 20:28:59 +0000
committerDave Korn <davek@gcc.gnu.org>2010-10-07 20:28:59 +0000
commit1cd0b7167ed9b43b189c39549d8165a020aee9b6 (patch)
tree946186568fee00058aace74937894e09bce8b4b8 /lto-plugin/Makefile.in
parent6ba74c2d192958de47dc1d7b36125495441a4d50 (diff)
downloadgcc-1cd0b7167ed9b43b189c39549d8165a020aee9b6.zip
gcc-1cd0b7167ed9b43b189c39549d8165a020aee9b6.tar.gz
gcc-1cd0b7167ed9b43b189c39549d8165a020aee9b6.tar.bz2
configure.ac (build_lto_plugin): New shell variable.
ChangeLog: 2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com> * configure.ac (build_lto_plugin): New shell variable. (--enable-lto): Turn on by default for all non-ELF platforms that have had LTO support added so far. Set build_lto_plugin appropriately for both ELF and non-ELF. (configdirs): Add lto-plugin or not based on build_lto_plugin. * configure: Regenerate. gcc/ChangeLog: 2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com> * config.host (host_lto_plugin_soname): New shell variable. * configure.ac (LTOPLUGINSONAME): Add an AC_DEFINE for the above. * config.in: Regenerate. * configure: Regenerate. * gcc.c (main): Use LTOPLUGINSONAME instead of hard-coding name of LTO plugin shared library. lto-plugin/ChangeLog: 2010-10-07 Dave Korn <dave.korn.cygwin@gmail.com> * configure.ac: Source config.gcc to determine lto_binary_reader. (LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader. * Makefile.am (LTO_FORMAT): Import. (liblto_plugin_la_SOURCES): Add object format dependent module defined by LTO_FORMAT. (liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty, and work around libtool warning. * configure: Regenerate. * Makefile.in: Likewise. * lto-plugin.c (struct sym_aux): Move to new lto-plugin.h. (struct sym_aux): Likewise. (struct plugin_symtab): Likewise. (struct plugin_file_info): Likewise. (LTO_SECTION_PREFIX): Likewise. (add_symbols): Make non-static. (claimed_files): Likewise. (num_claimed_files): Likewise. (check): Likewise. (parse_table_entry): Likewise. (translate): Likewise. (resolve_conflicts): Likewise. (process_symtab): Move to new lto-plugin-elf.c object format dependent source file. (claim_file_handler): Likewise, and make non-static. (onload): Call new onload_format_checks function. * lto-plugin.h: New file. (LTO_SECTION_PREFIX): Move here. (struct sym_aux): Likewise. (struct plugin_symtab): Likewise. (struct plugin_file_info): Likewise. (claim_file_handler): Add new function prototype. (onload_format_checks): Likewise. (check): Declare extern. (translate): Likewise. (parse_table_entry): Likewise. (resolve_conflicts): Likewise. (add_symbols): Likewise. (claimed_files): Likewise. (num_claimed_files): Likewise. * lto-plugin-elf.c (process_symtab): Move here. (claim_file_handler): Likewise, and make non-static. (onload_format_checks): New function factored out from onload. * lto-plugin-coff.c (claim_file_handler): New function stub. (onload_format_checks): Likewise. From-SVN: r165133
Diffstat (limited to 'lto-plugin/Makefile.in')
-rw-r--r--lto-plugin/Makefile.in24
1 files changed, 18 insertions, 6 deletions
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 2f58f9b..c3f5260 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -79,10 +79,14 @@ am__base_list = \
am__installdirs = "$(DESTDIR)$(libexecsubdir)"
LTLIBRARIES = $(libexecsub_LTLIBRARIES)
am__DEPENDENCIES_1 =
-liblto_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- ../libiberty/pic/libiberty.a
-am_liblto_plugin_la_OBJECTS = lto-plugin.lo
+liblto_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(if $(wildcard \
+ ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+am_liblto_plugin_la_OBJECTS = lto-plugin.lo \
+ lto-plugin-$(LTO_FORMAT).lo
liblto_plugin_la_OBJECTS = $(am_liblto_plugin_la_OBJECTS)
+liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(liblto_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
am__depfiles_maybe =
@@ -139,6 +143,9 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+
+# Which object format to parse.
+LTO_FORMAT = @LTO_FORMAT@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
@@ -225,8 +232,13 @@ libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
AM_CPPFLAGS = -I$(top_srcdir)/../include $(LIBELFINC)
AM_CFLAGS = -Wall -Werror
libexecsub_LTLIBRARIES = liblto_plugin.la
-liblto_plugin_la_SOURCES = lto-plugin.c
-liblto_plugin_la_LIBADD = $(LIBELFLIBS) ../libiberty/pic/libiberty.a
+liblto_plugin_la_SOURCES = lto-plugin.c lto-plugin-$(LTO_FORMAT).c
+liblto_plugin_la_LIBADD = $(LIBELFLIBS) \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+
+liblto_plugin_la_LDFLAGS = -no-undefined -bindir $(libexecsubdir) \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
+
all: all-am
.SUFFIXES:
@@ -297,7 +309,7 @@ clean-libexecsubLTLIBRARIES:
rm -f "$${dir}/so_locations"; \
done
liblto_plugin.la: $(liblto_plugin_la_OBJECTS) $(liblto_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(libexecsubdir) $(liblto_plugin_la_OBJECTS) $(liblto_plugin_la_LIBADD) $(LIBS)
+ $(liblto_plugin_la_LINK) -rpath $(libexecsubdir) $(liblto_plugin_la_OBJECTS) $(liblto_plugin_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)