This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch lto-plugin]: Part 2 for PR lto/47225 - [4.6 regression]: cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found"


On 02/07/2011 09:11 PM, Kai Tietz wrote:
>   liblto_plugin_la_SOURCES = lto-plugin.c
>   liblto_plugin_la_LIBADD = \
> -	$(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/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 = $(lt_host_flags) -bindir $(libexecsubdir) \
>   	$(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
> +liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
> +	../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)

At this point sorry to be a pain :) but the LDFLAGS are a mess...  What about
this, it's much simpler:

# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
liblto_plugin_la_LDFLAGS = $(lt_host_flags) -bindir $(libexecsubdir)

# This can go away if libiberty becomes a libtool convenience library.
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard ../libiberty/pic/libiberty.a), \
	../libiberty/pic/libiberty.a,../libiberty/libiberty.a)
liblto_plugin_la_LIBADD = \
	-Wc,$(liblto_plugin_la_DEPENDENCIES)

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]