This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][lto-plugin] Fix libiberty linking
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 11 Oct 2009 18:34:47 +0200 (CEST)
- Subject: [PATCH][lto-plugin] Fix libiberty linking
I've seen two people today picking up wrong (non-pic) libiberty
from $LIBELFLIBS path.
Fixed as follows - ok? (not the extra generated dependency - ugh?!)
Thanks,
Richard.
2009-10-11 Richard Guenther <rguenther@suse.de>
* Makefile.am (liblto_plugin_la_LIBADD): Link against the
correct libiberty.
* Makefile.in: Regenerated.
Index: Makefile.am
===================================================================
*** Makefile.am (revision 152630)
--- Makefile.am (working copy)
*************** AM_CFLAGS = -Wall -Werror
*** 16,19 ****
libexecsub_LTLIBRARIES = liblto_plugin.la
liblto_plugin_la_SOURCES = lto-plugin.c
! liblto_plugin_la_LIBADD = $(LIBELFLIBS) -L../libiberty/pic -liberty
--- 16,19 ----
libexecsub_LTLIBRARIES = liblto_plugin.la
liblto_plugin_la_SOURCES = lto-plugin.c
! liblto_plugin_la_LIBADD = $(LIBELFLIBS) ../libiberty/pic/libiberty.a
Index: Makefile.in
===================================================================
*** Makefile.in (revision 152630)
--- Makefile.in (working copy)
*************** am__base_list = \
*** 82,88 ****
am__installdirs = "$(DESTDIR)$(libexecsubdir)"
LTLIBRARIES = $(libexecsub_LTLIBRARIES)
am__DEPENDENCIES_1 =
! liblto_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
am_liblto_plugin_la_OBJECTS = lto-plugin.lo
liblto_plugin_la_OBJECTS = $(am_liblto_plugin_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
--- 82,89 ----
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_OBJECTS = $(am_liblto_plugin_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
*************** AM_CPPFLAGS = -I$(top_srcdir)/../include
*** 240,246 ****
AM_CFLAGS = -Wall -Werror
libexecsub_LTLIBRARIES = liblto_plugin.la
liblto_plugin_la_SOURCES = lto-plugin.c
! liblto_plugin_la_LIBADD = $(LIBELFLIBS) -L../libiberty/pic -liberty
all: all-am
.SUFFIXES:
--- 241,247 ----
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
all: all-am
.SUFFIXES: