--- a/src/boehm-gc/configure.ac +++ b/src/boehm-gc/configure.ac @@ -498,14 +498,8 @@ AC_DEFINE(USE_MMAP, 1, [use MMAP instead of sbrk to get new memory]) fi -if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then - toolexecdir='$(exec_prefix)/$(target_noncanonical)' - toolexeclibdir='$(toolexecdir)/lib' -else - toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' - toolexeclibdir='$(libdir)' -fi +toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' +toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libada/configure.ac +++ b/src/libada/configure.ac @@ -65,15 +65,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libffi/configure.ac +++ b/src/libffi/configure.ac @@ -486,14 +486,9 @@ AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and want to suppress spurious messages.]) fi) -if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then - toolexecdir='$(exec_prefix)/$(target_alias)' - toolexeclibdir='$(toolexecdir)/lib' -else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' -fi +toolexecdir='$(libdir)/gcc-lib/$(target_alias)' +toolexeclibdir='$(libdir)' + multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libgcc/configure.ac +++ b/src/libgcc/configure.ac @@ -85,8 +85,6 @@ slibdir="$with_slibdir", if test "${version_specific_libs}" = yes; then slibdir='$(libsubdir)' -elif test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then - slibdir='$(exec_prefix)/$(host_noncanonical)/lib' else slibdir='$(libdir)' fi) @@ -131,15 +129,8 @@ 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 + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libgfortran/configure.ac +++ b/src/libgfortran/configure.ac @@ -98,15 +98,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libgo/configure.ac +++ b/src/libgo/configure.ac @@ -77,14 +77,8 @@ # Calculate glibgo_toolexecdir, glibgo_toolexeclibdir # Install a library built with a cross compiler in tooldir, not libdir. -if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then - nover_glibgo_toolexecdir='${exec_prefix}/${host_alias}' - nover_glibgo_toolexeclibdir='${toolexecdir}/lib' -else - nover_glibgo_toolexecdir='${libdir}/gcc/${host_alias}' - nover_glibgo_toolexeclibdir='${libdir}' -fi +nover_glibgo_toolexecdir='${libdir}/gcc/${host_alias}' +nover_glibgo_toolexeclibdir='${libdir}' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libgomp/configure.ac +++ b/src/libgomp/configure.ac @@ -76,15 +76,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libitm/configure.ac +++ b/src/libitm/configure.ac @@ -90,15 +90,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libjava/configure.ac +++ b/src/libjava/configure.ac @@ -1566,15 +1566,8 @@ toolexeclibdir=$toolexecmainlibdir ;; 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)' - toolexecmainlibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' - toolexecmainlibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexecmainlibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /. --- a/src/libobjc/configure.ac +++ b/src/libobjc/configure.ac @@ -109,15 +109,8 @@ 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 + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libquadmath/configure.ac +++ b/src/libquadmath/configure.ac @@ -93,15 +93,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libssp/configure.ac +++ b/src/libssp/configure.ac @@ -170,15 +170,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libstdc++-v3/acinclude.m4 +++ b/src/libstdc++-v3/acinclude.m4 @@ -840,14 +840,8 @@ # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir # Install a library built with a cross compiler in tooldir, not libdir. if test x"$glibcxx_toolexecdir" = x"no"; then - if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then - glibcxx_toolexecdir='${exec_prefix}/${host_alias}' - glibcxx_toolexeclibdir='${toolexecdir}/lib' - else - glibcxx_toolexecdir='${libdir}/gcc/${host_alias}' - glibcxx_toolexeclibdir='${libdir}' - fi + glibcxx_toolexecdir='${libdir}/gcc/${host_alias}' + glibcxx_toolexeclibdir='${libdir}' multi_os_directory=`$CXX -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/zlib/configure.ac +++ b/src/zlib/configure.ac @@ -91,14 +91,9 @@ AC_CHECK_HEADERS(unistd.h) -if test -n "$with_cross_host" && - test x"$with_cross_host" != x"no"; then - toolexecdir='$(exec_prefix)/$(target_alias)' - toolexeclibdir='$(toolexecdir)/lib' -else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' -fi +toolexecdir='$(libdir)/gcc-lib/$(target_alias)' +toolexeclibdir='$(libdir)' + if test "$GCC" = yes && $CC -print-multi-os-directory > /dev/null 2>&1; then multiosdir=/`$CC -print-multi-os-directory` case $multiosdir in --- a/src/libatomic/configure.ac +++ b/src/libatomic/configure.ac @@ -96,15 +96,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /. --- a/src/libsanitizer/configure.ac +++ b/src/libsanitizer/configure.ac @@ -38,15 +38,8 @@ 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_alias)' - toolexeclibdir='$(toolexecdir)/lib' - else - toolexecdir='$(libdir)/gcc-lib/$(target_alias)' - toolexeclibdir='$(libdir)' - fi + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) ;; # Avoid trailing /.