OSDN Git Service

config/ChangeLog:
authordavek <davek@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Dec 2010 00:50:04 +0000 (00:50 +0000)
committerdavek <davek@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Dec 2010 00:50:04 +0000 (00:50 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167480 138bc75d-0d04-0410-961f-82ee72b054a4

60 files changed:
config/ChangeLog
config/lthostflags.m4 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/aclocal.m4
libgfortran/configure
libgfortran/configure.ac
libgomp/ChangeLog
libgomp/Makefile.am
libgomp/Makefile.in
libgomp/aclocal.m4
libgomp/configure
libgomp/configure.ac
libgomp/testsuite/Makefile.in
libjava/ChangeLog
libjava/Makefile.in
libjava/aclocal.m4
libjava/configure
libjava/configure.ac
libjava/configure.host
libjava/gcj/Makefile.in
libjava/include/Makefile.in
libjava/testsuite/Makefile.in
libobjc/ChangeLog
libobjc/Makefile.in
libobjc/aclocal.m4
libobjc/configure
libobjc/configure.ac
libquadmath/ChangeLog
libquadmath/Makefile.am
libquadmath/Makefile.in
libquadmath/aclocal.m4
libquadmath/configure
libquadmath/configure.ac
libssp/ChangeLog
libssp/Makefile.am
libssp/Makefile.in
libssp/aclocal.m4
libssp/configure
libssp/configure.ac
libstdc++-v3/ChangeLog
libstdc++-v3/Makefile.in
libstdc++-v3/aclocal.m4
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/configure.host
libstdc++-v3/doc/Makefile.in
libstdc++-v3/include/Makefile.in
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/po/Makefile.in
libstdc++-v3/python/Makefile.in
libstdc++-v3/src/Makefile.in
libstdc++-v3/testsuite/Makefile.in
lto-plugin/ChangeLog
lto-plugin/Makefile.am
lto-plugin/Makefile.in
lto-plugin/aclocal.m4
lto-plugin/configure
lto-plugin/configure.ac

index 87af62b..83eab40 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2010-12-02  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        * mh-cygwin (LDFLAGS): Turn up stack allocation to 12MB.
diff --git a/config/lthostflags.m4 b/config/lthostflags.m4
new file mode 100644 (file)
index 0000000..bc0f59e
--- /dev/null
@@ -0,0 +1,33 @@
+dnl Copyright (C) 2010 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl usage: ACX_LT_HOST_FLAGS([default_flags])
+dnl Defines and AC_SUBSTs lt_host_flags
+
+
+AC_DEFUN([ACX_LT_HOST_FLAGS], [
+AC_REQUIRE([AC_CANONICAL_SYSTEM])
+
+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=[$1]
+    ;;
+esac
+
+AC_SUBST(lt_host_flags)
+])
index 51dacdd..9ca794c 100644 (file)
@@ -1,3 +1,13 @@
+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.
+
 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>
 
index d9e6c64..d1e6d4f 100644 (file)
@@ -31,7 +31,7 @@ version_dep =
 endif
 
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \
-           -no-undefined -bindir "$(bindir)"
+           $(lt_host_flags)
 
 toolexeclib_LTLIBRARIES = libgfortran.la
 toolexeclib_DATA = libgfortran.spec
index da68aef..9c35f27 100644 (file)
@@ -45,14 +45,16 @@ DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \
        $(srcdir)/libgfortran.spec.in $(srcdir)/../depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../ltoptions.m4 \
+       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+       $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
-       $(top_srcdir)/../config/stdint.m4 \
-       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/acx.m4 \
+       $(top_srcdir)/../config/stdint.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -445,6 +447,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
@@ -478,7 +481,7 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
 @LIBGFOR_USE_SYMVER_GNU_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = $(srcdir)/gfortran.map
 @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.map-sun
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \
-           -no-undefined -bindir "$(bindir)"
+           $(lt_host_flags)
 
 toolexeclib_LTLIBRARIES = libgfortran.la
 toolexeclib_DATA = libgfortran.spec
index 3599702..6929503 100644 (file)
@@ -968,13 +968,14 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
+m4_include([../lt~obsolete.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
 m4_include([../config/stdint.m4])
-m4_include([../ltoptions.m4])
-m4_include([../ltsugar.m4])
-m4_include([../ltversion.m4])
-m4_include([../lt~obsolete.m4])
 m4_include([acinclude.m4])
index a9d8092..57b620a 100755 (executable)
@@ -616,6 +616,7 @@ FCFLAGS
 FC
 enable_static
 enable_shared
+lt_host_flags
 CPP
 OTOOL64
 OTOOL
@@ -11372,7 +11373,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11375 "configure"
+#line 11376 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11478,7 +11479,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11481 "configure"
+#line 11482 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11717,6 +11718,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
+
+
+
+
+
 #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10
 
 # We need gfortran to compile parts of the library
index 47315d5..4c3daf4 100644 (file)
@@ -202,6 +202,7 @@ AC_PROG_INSTALL
 #AC_MSG_NOTICE([====== Starting libtool configuration])
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 #AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10
index f594717..2209d5e 100644 (file)
@@ -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 (libgomp_la_LDFLAGS): Use lt_host_flags.
+       * aclocal.m4: Regenerate.
+       * configure: Regenerate.
+       * Makefile.in: Regenerate.
+       * testsuite/Makefile.in: Regenerate.
+
 2010-12-02  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/46753
index 2428e66..c0c9167 100644 (file)
@@ -53,7 +53,7 @@ libgomp_version_dep =
 endif
 libgomp_version_info = -version-info $(libtool_VERSION)
 libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
-        -no-undefined -bindir "$(bindir)"
+        $(lt_host_flags)
 libgomp_la_DEPENDENCIES = $(libgomp_version_dep)
 libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS)
 
index ee57f67..9a7f713 100644 (file)
@@ -44,17 +44,18 @@ DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(srcdir)/omp_lib.f90.in $(srcdir)/libgomp_f.h.in \
        $(srcdir)/libgomp.spec.in $(srcdir)/../depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../ltoptions.m4 \
+       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
-       $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -263,6 +264,7 @@ libtool_VERSION = @libtool_VERSION@
 link_gomp = @link_gomp@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
@@ -306,7 +308,7 @@ nodist_toolexeclib_HEADERS = libgomp.spec
 @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.map-sun
 libgomp_version_info = -version-info $(libtool_VERSION)
 libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
-        -no-undefined -bindir "$(bindir)"
+        $(lt_host_flags)
 
 libgomp_la_DEPENDENCIES = $(libgomp_version_dep)
 libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS)
index ba1b35b..2232a7d 100644 (file)
@@ -968,17 +968,18 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
+m4_include([../lt~obsolete.m4])
 m4_include([../config/acx.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/enable.m4])
 m4_include([../config/futex.m4])
 m4_include([../config/lead-dot.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
 m4_include([../config/stdint.m4])
 m4_include([../config/tls.m4])
-m4_include([../ltoptions.m4])
-m4_include([../ltsugar.m4])
-m4_include([../ltversion.m4])
-m4_include([../lt~obsolete.m4])
 m4_include([acinclude.m4])
index 14b6e3f..4dbdc87 100755 (executable)
@@ -638,6 +638,7 @@ MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
 enable_static
 enable_shared
+lt_host_flags
 CPP
 OTOOL64
 OTOOL
@@ -11089,7 +11090,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11092 "configure"
+#line 11093 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11195,7 +11196,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11198 "configure"
+#line 11199 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11435,6 +11436,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
+
+
+
+
+
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
index 0e976a8..d87ed29 100644 (file)
@@ -135,6 +135,7 @@ AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
 
 # Configure libtool
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 
index 46ea231..6ab9787 100644 (file)
@@ -37,17 +37,18 @@ target_triplet = @target@
 subdir = testsuite
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../ltoptions.m4 \
+       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
-       $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -179,6 +180,7 @@ libtool_VERSION = @libtool_VERSION@
 link_gomp = @link_gomp@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index 345e6da..16cfc79 100644 (file)
@@ -1,3 +1,16 @@
+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.
+
 2010-11-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o):
index dc3012a..f60b9e3 100644 (file)
@@ -99,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
@@ -724,6 +725,7 @@ libexecdir = @libexecdir@
 libstdcxx_incdir = @libstdcxx_incdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 mkinstalldirs = @mkinstalldirs@
index fd5fe17..b1991de 100644 (file)
@@ -1034,6 +1034,7 @@ m4_include([../config/lead-dot.m4])
 m4_include([../config/lib-ld.m4])
 m4_include([../config/lib-link.m4])
 m4_include([../config/lib-prefix.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/no-executables.m4])
 m4_include([../config/override.m4])
index 80a59d6..8ffc640 100755 (executable)
@@ -753,6 +753,7 @@ GCJDEPMODE
 GCJFLAGS
 ac_ct_GCJ
 GCJ
+lt_host_flags
 CXXCPP
 CPP
 OTOOL64
@@ -13354,7 +13355,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13357 "configure"
+#line 13358 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13460,7 +13461,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13463 "configure"
+#line 13464 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16726,6 +16727,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
+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
+
+
+
+
 if test -n "$ac_tool_prefix"; then
   for ac_prog in gcj
   do
@@ -19439,7 +19462,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then :
   enableval=$enable_sjlj_exceptions; :
 else
   cat > conftest.$ac_ext << EOF
-#line 19442 "configure"
+#line 19465 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
index c64f6f3..52e5d78 100644 (file)
@@ -547,6 +547,7 @@ AC_SUBST(INCLTDL)
 AC_SUBST(LIBLTDL)
 AC_SUBST(DIRLTDL)
 AC_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AM_PROG_GCJ
 AM_PROG_CC_C_O
 
index 665fbe3..5b88478 100644 (file)
@@ -356,7 +356,7 @@ case "${host}" in
        BACKTRACESPEC=
        # Win32 DLLs are limited to 64k exported symbols each.
        enable_libgcj_sublibs_default=yes
-       libgcj_sublib_ltflags='-no-undefined -bindir $(bindir) \
+       libgcj_sublib_ltflags='$(lt_host_flags) \
            -Wl,-u,__ZN3org4ietf4jgss10GSSManagerC1Ev,-L..,-lgcj-noncore-dummy'
        libgcj_sublib_core_extra_deps=libgcj-noncore-dummy.dll.a
   ;;
index ef25131..3273f4e 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
@@ -307,6 +308,7 @@ libexecdir = @libexecdir@
 libstdcxx_incdir = @libstdcxx_incdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 mkinstalldirs = @mkinstalldirs@
index 41cdbb6..edda77a 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
@@ -308,6 +309,7 @@ libexecdir = @libexecdir@
 libstdcxx_incdir = @libstdcxx_incdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 mkinstalldirs = @mkinstalldirs@
index fa3d7b9..56e390a 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
@@ -283,6 +284,7 @@ libexecdir = @libexecdir@
 libstdcxx_incdir = @libstdcxx_incdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 mkinstalldirs = @mkinstalldirs@
index 897c296..91154b3 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2010-12-03  Matthias Klose  <doko@ubuntu.com> 
 
        * configure.ac (VERSION): Bump the version to 3:0:0.
index 437764f..2051b3e 100644 (file)
@@ -43,6 +43,7 @@ toolexeclibdir = @toolexeclibdir@
 includedirname = @includedirname@
 libsuffix = @libsuffix@
 
+lt_host_flags = @lt_host_flags@
 extra_ldflags_libobjc = @extra_ldflags_libobjc@
 
 top_builddir = .
index fa11a5f..93a97e3 100644 (file)
@@ -198,6 +198,7 @@ m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
 m4_include([../ltversion.m4])
 m4_include([../lt~obsolete.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
 m4_include([acinclude.m4])
index 37402ca..1fdc23f 100755 (executable)
@@ -631,6 +631,7 @@ RANLIB
 AR
 AS
 extra_ldflags_libobjc
+lt_host_flags
 OBJEXT
 EXEEXT
 ac_ct_CC
@@ -3318,14 +3319,36 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 # extra LD Flags which are required for targets
+
+
+
+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
+
+
+
 case "${host}" in
   *-darwin*)
     # Darwin needs -single_module when linking libobjc
-    extra_ldflags_libobjc=-Wl,-single_module
+    extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module'
     ;;
   *-cygwin*|*-mingw*)
     # Tell libtool to build DLLs on Windows
-    extra_ldflags_libobjc='-no-undefined -bindir $(bindir)'
+    extra_ldflags_libobjc='$(lt_host_flags)'
     ;;
 esac
 
@@ -10568,7 +10591,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10571 "configure"
+#line 10594 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10674,7 +10697,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10677 "configure"
+#line 10700 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11457,7 +11480,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then :
   enableval=$enable_sjlj_exceptions; :
 else
   cat > conftest.$ac_ext << EOF
-#line 11460 "configure"
+#line 11483 "configure"
 @interface Frob
 @end
 @implementation Frob
index 6157d11..494a289 100644 (file)
@@ -156,14 +156,15 @@ AC_PROG_CC
 m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
 
 # extra LD Flags which are required for targets
+ACX_LT_HOST_FLAGS
 case "${host}" in
   *-darwin*)
     # Darwin needs -single_module when linking libobjc
-    extra_ldflags_libobjc=-Wl,-single_module
+    extra_ldflags_libobjc='$(lt_host_flags) -Wl,-single_module'
     ;;
   *-cygwin*|*-mingw*)
     # Tell libtool to build DLLs on Windows
-    extra_ldflags_libobjc='-no-undefined -bindir $(bindir)'
+    extra_ldflags_libobjc='$(lt_host_flags)'
     ;;
 esac
 AC_SUBST(extra_ldflags_libobjc)
index ee08c78..772a4f2 100644 (file)
@@ -1,3 +1,13 @@
+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.
+
 2010-11-30  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/46594
index 899051b..c1f0b63 100644 (file)
@@ -36,7 +36,7 @@ endif
 toolexeclib_LTLIBRARIES = libquadmath.la
 libquadmath_la_LIBADD = 
 libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
-                        $(version_arg) -no-undefined -bindir "$(bindir)" -lm
+                        $(version_arg) $(lt_host_flags) -lm
 libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD)
 
 nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h
index 69a0586..4916a50 100644 (file)
@@ -43,16 +43,16 @@ DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \
        $(srcdir)/../depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../ltoptions.m4 \
+       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+       $(top_srcdir)/../lt~obsolete.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/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
-       $(top_srcdir)/../config/override.m4 \
-       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/../config/override.m4 $(top_srcdir)/acinclude.m4 \
+       $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -250,6 +250,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
@@ -285,7 +286,7 @@ AUTOMAKE_OPTIONS = 1.8 foreign
 @BUILD_LIBQUADMATH_TRUE@toolexeclib_LTLIBRARIES = libquadmath.la
 @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LIBADD = 
 @BUILD_LIBQUADMATH_TRUE@libquadmath_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
-@BUILD_LIBQUADMATH_TRUE@                        $(version_arg) -no-undefined -bindir "$(bindir)" -lm
+@BUILD_LIBQUADMATH_TRUE@                        $(version_arg) $(lt_host_flags) -lm
 
 @BUILD_LIBQUADMATH_TRUE@libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD)
 @BUILD_LIBQUADMATH_TRUE@nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h
index f2234ba..18be34e 100644 (file)
@@ -1010,6 +1010,7 @@ 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/multi.m4])
 m4_include([../config/no-executables.m4])
 m4_include([../config/override.m4])
index df01612..8a5fa10 100644 (file)
@@ -617,6 +617,7 @@ MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
 enable_static
 enable_shared
+lt_host_flags
 CPP
 OTOOL64
 OTOOL
@@ -10249,7 +10250,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10252 "configure"
+#line 10253 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10355,7 +10356,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10358 "configure"
+#line 10359 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10595,6 +10596,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
+
+
+
+
+
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
index e3c36f9..82ee93f 100644 (file)
@@ -43,6 +43,7 @@ GCC_NO_EXECUTABLES
 
 # Configure libtool
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 
index a3fda21..0de6d51 100644 (file)
@@ -1,3 +1,13 @@
+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.
+
 2010-07-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * configure.ac (ssp_use_symver): Only check for Sun-style symbol
index e25bd84..5a2ecac 100644 (file)
@@ -50,7 +50,7 @@ libssp_la_SOURCES = \
 libssp_la_LIBADD = 
 libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD)
 libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
-                   $(version_arg) -no-undefined -bindir "$(bindir)"
+                   $(version_arg) $(lt_host_flags)
 
 libssp_nonshared_la_SOURCES = \
        ssp-local.c
index d9f952f..846088a 100644 (file)
@@ -43,15 +43,16 @@ DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(top_srcdir)/ssp/ssp.h.in $(srcdir)/../depcomp \
        $(nobase_libsubinclude_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.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/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
-       $(top_srcdir)/../config/override.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -219,6 +220,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
@@ -268,7 +270,7 @@ libssp_la_SOURCES = \
 libssp_la_LIBADD = 
 libssp_la_DEPENDENCIES = $(version_dep) $(libssp_la_LIBADD)
 libssp_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
-                   $(version_arg) -no-undefined -bindir "$(bindir)"
+                   $(version_arg) $(lt_host_flags)
 
 libssp_nonshared_la_SOURCES = \
        ssp-local.c
index b1f16d9..6cf482f 100644 (file)
@@ -968,14 +968,15 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
+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/multi.m4])
 m4_include([../config/no-executables.m4])
 m4_include([../config/override.m4])
-m4_include([../libtool.m4])
-m4_include([../ltoptions.m4])
-m4_include([../ltsugar.m4])
-m4_include([../ltversion.m4])
-m4_include([../lt~obsolete.m4])
index 50098d4..21614f9 100755 (executable)
@@ -606,6 +606,7 @@ toolexeclibdir
 toolexecdir
 enable_static
 enable_shared
+lt_host_flags
 OTOOL64
 OTOOL
 LIPO
@@ -10646,7 +10647,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10649 "configure"
+#line 10650 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10752,7 +10753,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10755 "configure"
+#line 10756 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10992,6 +10993,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
+
+
+
+
+
+
 # Calculate toolexeclibdir
 # Also toolexecdir, though it's only used in toolexeclibdir
 case ${version_specific_libs} in
index 8181bed..ee48f4d 100644 (file)
@@ -148,6 +148,7 @@ fi
 AC_SUBST(ssp_have_usable_vsnprintf)
 
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 
index 1096742..7a5b7f7 100644 (file)
@@ -1,3 +1,20 @@
+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.
+
 2010-12-04  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * include/std/mutex (try_lock, __try_lock_impl): Fix.
index 7c1f356..e208bb4 100644 (file)
@@ -42,23 +42,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am README ChangeLog \
        $(top_srcdir)/scripts/extract_symvers.in
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -245,6 +246,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index cea2d7e..bbf82ee 100644 (file)
@@ -654,6 +654,13 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
+m4_include([../lt~obsolete.m4])
+m4_include([crossconfig.m4])
+m4_include([linkage.m4])
 m4_include([../config/enable.m4])
 m4_include([../config/futex.m4])
 m4_include([../config/iconv.m4])
@@ -661,16 +668,10 @@ m4_include([../config/lead-dot.m4])
 m4_include([../config/lib-ld.m4])
 m4_include([../config/lib-link.m4])
 m4_include([../config/lib-prefix.m4])
+m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/no-executables.m4])
 m4_include([../config/override.m4])
 m4_include([../config/stdint.m4])
 m4_include([../config/unwind_ipinfo.m4])
-m4_include([../libtool.m4])
-m4_include([../ltoptions.m4])
-m4_include([../ltsugar.m4])
-m4_include([../ltversion.m4])
-m4_include([../lt~obsolete.m4])
-m4_include([crossconfig.m4])
-m4_include([linkage.m4])
 m4_include([acinclude.m4])
index 3cdb123..085fb62 100755 (executable)
@@ -690,6 +690,7 @@ GLIBCXX_HOSTED_FALSE
 GLIBCXX_HOSTED_TRUE
 enable_static
 enable_shared
+lt_host_flags
 CXXCPP
 OTOOL64
 OTOOL
@@ -11469,7 +11470,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11472 "configure"
+#line 11473 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11575,7 +11576,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11578 "configure"
+#line 11579 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14843,6 +14844,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+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
+
+
+
+
+
+
 # Eliminate -lstdc++ addition to postdeps for cross compiles.
 postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
 
@@ -14915,7 +14938,7 @@ fi
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 14918 "configure"
+#line 14941 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -15283,7 +15306,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15286 "configure"
+#line 15309 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15320,7 +15343,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15323 "configure"
+#line 15346 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15357,7 +15380,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15360 "configure"
+#line 15383 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15395,7 +15418,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15398 "configure"
+#line 15421 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15471,7 +15494,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15474 "configure"
+#line 15497 "configure"
 int main()
 {
   _Decimal32 d1;
index 04d0f3b..c3a5bdc 100644 (file)
@@ -96,6 +96,7 @@ if test "x${with_newlib}" != "xyes"; then
   AC_LIBTOOL_DLOPEN
 fi
 AM_PROG_LIBTOOL
+ACX_LT_HOST_FLAGS
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 
index 73cf216..e29404c 100644 (file)
@@ -209,7 +209,7 @@ case "${host_os}" in
     ;;
   cygwin*)
     os_include_dir="os/newlib"
-    OPT_LDFLAGS="${OPT_LDFLAGS} -no-undefined -bindir \$(bindir)"
+    OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)"
     ;;
   darwin | darwin[1-7] | darwin[1-7].*)
     # On Darwin, performance is improved if libstdc++ is single-module.
@@ -256,7 +256,7 @@ case "${host_os}" in
   mingw32*)
     os_include_dir="os/mingw32"
     error_constants_dir="os/mingw32"
-    OPT_LDFLAGS="${OPT_LDFLAGS} -no-undefined -bindir \$(bindir)"
+    OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)"
     ;;
   netbsd*)
     os_include_dir="os/bsd/netbsd"
index 005e1b8..6051aa6 100644 (file)
@@ -38,23 +38,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am
 subdir = doc
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -219,6 +220,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index 7ed9321..14314d7 100644 (file)
@@ -38,23 +38,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am
 subdir = include
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -219,6 +220,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index b0c5073..3a0da11 100644 (file)
@@ -40,23 +40,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am $(glibcxxinstall_HEADERS)
 subdir = libsupc++
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -278,6 +279,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index d705894..fbe88d8 100644 (file)
@@ -38,23 +38,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am
 subdir = po
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -219,6 +220,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index d42ecca..fb25379 100644 (file)
@@ -39,23 +39,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am
 subdir = python
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -243,6 +244,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index fe38f37..f083aeb 100644 (file)
@@ -39,23 +39,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -277,6 +278,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index d159355..4ac1f66 100644 (file)
@@ -38,23 +38,24 @@ DIST_COMMON = $(top_srcdir)/fragment.am $(srcdir)/Makefile.in \
        $(srcdir)/Makefile.am
 subdir = testsuite
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
+       $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+       $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
+       $(top_srcdir)/crossconfig.m4 $(top_srcdir)/linkage.m4 \
+       $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/futex.m4 \
        $(top_srcdir)/../config/iconv.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/lib-ld.m4 \
        $(top_srcdir)/../config/lib-link.m4 \
        $(top_srcdir)/../config/lib-prefix.m4 \
+       $(top_srcdir)/../config/lthostflags.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
-       $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
-       $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
-       $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \
-       $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \
-       $(top_srcdir)/../config/gc++filt.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/gc++filt.m4 \
        $(top_srcdir)/../config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
@@ -219,6 +220,7 @@ libexecdir = @libexecdir@
 libtool_VERSION = @libtool_VERSION@
 localedir = @localedir@
 localstatedir = @localstatedir@
+lt_host_flags = @lt_host_flags@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 multi_basedir = @multi_basedir@
index 2463d83..305db4e 100644 (file)
@@ -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.
index fb1d6c2..ba385c7 100644 (file)
@@ -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
index 41bf148..ad53a60 100644 (file)
@@ -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
index 9cf5004..889e8ee 100644 (file)
@@ -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])
index 8b94622..12e58e5 100755 (executable)
@@ -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*)
index 442b239..67147db 100644 (file)
@@ -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