From 8c35d268c774a348c0e041c4e507137dabe98974 Mon Sep 17 00:00:00 2001 From: davek Date: Mon, 6 Dec 2010 00:50:04 +0000 Subject: config/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * lthostflags.m4: New file. (ACX_LT_HOST_FLAGS): Define. libgfortran/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (LTLDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. libgomp/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (libgomp_la_LDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libjava/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * configure.host (libgcj_sublib_ltflags): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * gcj/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac (extra_ldflags_libobjc): Invoke ACX_LT_HOST_FLAGS. * Makefile.in (lt_host_flags): Import AC_SUBST'd value. * aclocal.m4: Regenerate. * configure: Regenerate. libquadmath/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (libquadmath_la_LDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. libssp/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (libssp_la_LDFLAGS): Use lt_host_flags. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. libstdc++-v3/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * configure.host (OPT_LDFLAGS): Use lt_host_flags for cygming. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. lto-plugin/ChangeLog: 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * configure.ac: Invoke ACX_LT_HOST_FLAGS. * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but override -bindir setting. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167480 138bc75d-0d04-0410-961f-82ee72b054a4 --- lto-plugin/ChangeLog | 11 +++++++++++ lto-plugin/Makefile.am | 3 ++- lto-plugin/Makefile.in | 5 ++++- lto-plugin/aclocal.m4 | 1 + lto-plugin/configure | 27 +++++++++++++++++++++++++-- lto-plugin/configure.ac | 1 + 6 files changed, 44 insertions(+), 4 deletions(-) (limited to 'lto-plugin') diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index 2463d83098b..305db4e9877 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,14 @@ +2010-12-06 Dave Korn + + PR target/40125 + PR lto/46695 + * configure.ac: Invoke ACX_LT_HOST_FLAGS. + * Makefile.am (liblto_plugin_la_LDFLAGS): Use lt_host_flags but + override -bindir setting. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * Makefile.in: Regenerate. + 2010-12-05 Kai Tietz * config.h.in: Regenerated. diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am index fb1d6c20f18..ba385c76c6f 100644 --- a/lto-plugin/Makefile.am +++ b/lto-plugin/Makefile.am @@ -15,7 +15,8 @@ libexecsub_LTLIBRARIES = liblto_plugin.la liblto_plugin_la_SOURCES = lto-plugin.c liblto_plugin_la_LIBADD = \ $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,) -liblto_plugin_la_LDFLAGS = -no-undefined -bindir $(libexecsubdir) \ +# 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) all: copy_lto_plugin diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in index 41bf148d2f2..ad53a60a903 100644 --- a/lto-plugin/Makefile.in +++ b/lto-plugin/Makefile.in @@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/lthostflags.m4 \ $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -201,6 +202,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_host_flags = @lt_host_flags@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -233,7 +235,8 @@ liblto_plugin_la_SOURCES = lto-plugin.c liblto_plugin_la_LIBADD = \ $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,) -liblto_plugin_la_LDFLAGS = -no-undefined -bindir $(libexecsubdir) \ +# 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) all: config.h diff --git a/lto-plugin/aclocal.m4 b/lto-plugin/aclocal.m4 index 9cf50045f2f..889e8ee9e18 100644 --- a/lto-plugin/aclocal.m4 +++ b/lto-plugin/aclocal.m4 @@ -976,4 +976,5 @@ m4_include([../lt~obsolete.m4]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/lead-dot.m4]) +m4_include([../config/lthostflags.m4]) m4_include([../config/override.m4]) diff --git a/lto-plugin/configure b/lto-plugin/configure index 8b94622b3ff..12e58e5d867 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -602,6 +602,7 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS target_noncanonical +lt_host_flags CPP OTOOL64 OTOOL @@ -10505,7 +10506,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10508 "configure" +#line 10509 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10611,7 +10612,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10614 "configure" +#line 10615 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10849,6 +10850,28 @@ CC="$lt_save_CC" + + +case $host in + *-cygwin* | *-mingw*) + # 'host' will be top-level target in the case of a target lib, + # we must compare to with_cross_host to decide if this is a native + # or cross-compiler and select where to install dlls appropriately. + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; + else + lt_host_flags='-no-undefined -bindir "$(bindir)"'; + fi + ;; + *) + lt_host_flags= + ;; +esac + + + + # Trying to get this information from gcc's config is tricky. case $target in x86_64*-mingw*) diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac index 442b2395a67..67147db6817 100644 --- a/lto-plugin/configure.ac +++ b/lto-plugin/configure.ac @@ -7,6 +7,7 @@ AM_MAINTAINER_MODE AC_PROG_CC AC_SYS_LARGEFILE AM_PROG_LIBTOOL +ACX_LT_HOST_FLAGS AC_SUBST(target_noncanonical) # Trying to get this information from gcc's config is tricky. case $target in -- cgit v1.2.3