summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2010-12-06 00:50:04 +0000
committerDave Korn <davek@gcc.gnu.org>2010-12-06 00:50:04 +0000
commit7de6ba7a0bf338489274404b854f5fb84f63c731 (patch)
tree850ddf293ebc3d4f93b3ac5289571066fd89941e /lto-plugin
parenta65264ae6f470eb00fb22c43d6354d1d85356aa1 (diff)
re PR target/40125 (libgcc_s DLL installed in wrong directory in cross toolchain)
config/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> PR target/40125 PR lto/46695 * lthostflags.m4: New file. (ACX_LT_HOST_FLAGS): Define. libgfortran/ChangeLog: 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> 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 <dave.korn.cygwin@gmail.com> 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 <dave.korn.cygwin@gmail.com> 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 <dave.korn.cygwin@gmail.com> 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 <dave.korn.cygwin@gmail.com> 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 <dave.korn.cygwin@gmail.com> 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 <dave.korn.cygwin@gmail.com> 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 <dave.korn.cygwin@gmail.com> 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. From-SVN: r167480
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog11
-rw-r--r--lto-plugin/Makefile.am3
-rw-r--r--lto-plugin/Makefile.in5
-rw-r--r--lto-plugin/aclocal.m41
-rwxr-xr-xlto-plugin/configure27
-rw-r--r--lto-plugin/configure.ac1
6 files changed, 44 insertions, 4 deletions
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 <dave.korn.cygwin@gmail.com>
+
+ 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 <kai.tietz@onevision.com>
* 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