From abfe0c5bb31a554574788af56f10b91640ac30ff Mon Sep 17 00:00:00 2001 From: davek Date: Wed, 26 Jan 2011 04:19:58 +0000 Subject: gcc/ChangeLog: PR target/40125 * config.gcc (i[34567]86-*-pe | i[34567]86-*-cygwin*): Select suitable t-dlldir{,-x} fragment for build and add it to tmake_file. (i[34567]86-*-mingw* | x86_64-*-mingw*): Likewise. * Makefile.in (libgcc.mvars): Also export SHLIB_DLLDIR to libgcc. * config/i386/t-dlldir: New file. (SHLIB_DLLDIR): Define. * config/i386/t-dlldir-x: New file. (SHLIB_DLLDIR): Define. * config/i386/t-cygming: Error out if SHLIB_DLLDIR is not set. (SHLIB_INSTALL): Use it. libgcc/ChangeLog: PR target/40125 * configure.ac: Call ACX_NONCANONICAL_TARGET. (toolexecdir): Calculate and AC_SUBST. (toolexeclibdir): Likewise. * Makefile.in (target_noncanonical): Import. (toolexecdir): Likewise. (toolexeclibdir): Likewise. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169274 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgcc/ChangeLog | 11 +++++++++++ libgcc/Makefile.in | 6 ++++++ libgcc/configure | 35 +++++++++++++++++++++++++++++++++++ libgcc/configure.ac | 31 +++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 309ada4ea6c..3368decd997 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,14 @@ +2011-01-26 Dave Korn + + PR target/40125 + * configure.ac: Call ACX_NONCANONICAL_TARGET. + (toolexecdir): Calculate and AC_SUBST. + (toolexeclibdir): Likewise. + * Makefile.in (target_noncanonical): Import. + (toolexecdir): Likewise. + (toolexeclibdir): Likewise. + * configure: Regenerate. + 2010-12-13 Nathan Froyd PR target/46040 diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index dc4838fdbe1..7e2ab93fc42 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -41,6 +41,7 @@ enable_decimal_float = @enable_decimal_float@ fixed_point = @fixed_point@ host_noncanonical = @host_noncanonical@ +target_noncanonical = @target_noncanonical@ # List of extra object files that should be compiled for this target machine. # The rules for compiling them should be in the t-* file for the machine. @@ -175,6 +176,9 @@ STRIP_FOR_TARGET = $(STRIP) libsubdir = $(libdir)/gcc/$(host_noncanonical)/$(version) # Used to install the shared libgcc. slibdir = @slibdir@ +# Maybe used for DLLs on Windows targets. +toolexecdir = @toolexecdir@ +toolexeclibdir = @toolexeclibdir@ export AR_FOR_TARGET export AR_CREATE_FOR_TARGET @@ -194,6 +198,8 @@ export STRIP_FOR_TARGET export RANLIB_FOR_TARGET export libsubdir export slibdir +export toolexecdir +export toolexeclibdir version := $(shell $(CC) -dumpversion) diff --git a/libgcc/configure b/libgcc/configure index 0344380b929..8a27aab1886 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -576,10 +576,13 @@ RANLIB NM LIPO AR +toolexeclibdir +toolexecdir target_subdir host_subdir build_subdir build_libsubdir +target_noncanonical host_noncanonical host_os host_vendor @@ -2174,6 +2177,8 @@ esac esac + + # post-stage1 host modules use a different CC_FOR_BUILD so, in order to # have matching libraries, they should use host libraries: Makefile.tpl # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). @@ -2204,6 +2209,36 @@ fi target_subdir=${target_noncanonical} +# Calculate toolexeclibdir +# Also toolexecdir, though it's only used in toolexeclibdir +case ${version_specific_libs} in + yes) + # Need the gcc compiler version to know where to install libraries + # and header files if --enable-version-specific-runtime-libs option + # is selected. + toolexecdir='$(libdir)/gcc/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' + ;; + no) + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/lib' + else + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexeclibdir='$(libdir)' + fi + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + ;; +esac + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 diff --git a/libgcc/configure.ac b/libgcc/configure.ac index fc157d30a79..7dbe114e394 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -104,8 +104,39 @@ esac AC_CANONICAL_HOST ACX_NONCANONICAL_HOST +ACX_NONCANONICAL_TARGET GCC_TOPLEV_SUBDIRS +# Calculate toolexeclibdir +# Also toolexecdir, though it's only used in toolexeclibdir +case ${version_specific_libs} in + yes) + # Need the gcc compiler version to know where to install libraries + # and header files if --enable-version-specific-runtime-libs option + # is selected. + toolexecdir='$(libdir)/gcc/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' + ;; + no) + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/lib' + else + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexeclibdir='$(libdir)' + fi + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + ;; +esac +AC_SUBST(toolexecdir) +AC_SUBST(toolexeclibdir) + dnl These must be called before AM_PROG_LIBTOOL, because it may want dnl to call AC_CHECK_PROG. AC_CHECK_TOOL(AR, ar) -- cgit v1.2.1