libgo: handle --with-toolexeclibdir=.
authorIan Lance Taylor <iant@golang.org>
Fri, 24 Jan 2020 14:31:04 +0000 (06:31 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 24 Jan 2020 14:33:46 +0000 (06:33 -0800)
Patch by Maciej W. Rozycki.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216239

gcc/go/gofrontend/MERGE
libgo/Makefile.in
libgo/aclocal.m4
libgo/configure
libgo/configure.ac
libgo/testsuite/Makefile.in

index fc1dbaca8b9b892b78b0ba7e7ab19cbba6ac9b32..38872c44eabec0be805c26dee1c58f3d332262d6 100644 (file)
@@ -1,4 +1,4 @@
-10a8dbfc9945c672d59af8edb9790e2019cdeb27
+197381c6364431a7a05e32df683874b7cadcc4b4
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 88c687464fc2da3fdba90a65a1c13de560b1307a..0ff6ba144b81a6cff13faa8cbfd25fefb4450a45 100644 (file)
@@ -114,6 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
+       $(top_srcdir)/../config/toolexeclibdir.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/config/libtool.m4 \
        $(top_srcdir)/config/ltoptions.m4 \
index 951aed3a81b27a09897f61098ba159ccabfb05d9..739b97a0275377e2b72e9d0cdc589a989f8fba8f 100644 (file)
@@ -1192,6 +1192,7 @@ m4_include([../config/hwcaps.m4])
 m4_include([../config/lead-dot.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
+m4_include([../config/toolexeclibdir.m4])
 m4_include([../config/unwind_ipinfo.m4])
 m4_include([config/libtool.m4])
 m4_include([config/ltoptions.m4])
index 385ca9a65cd981e114a242d94443c8fa7698d937..2f787392abd220946547acc40b58e657e348155f 100755 (executable)
@@ -849,6 +849,7 @@ enable_fast_install
 enable_libtool_lock
 enable_werror
 enable_version_specific_runtime_libs
+with_toolexeclibdir
 with_libffi
 with_libatomic
 with_system_libunwind
@@ -1503,6 +1504,9 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
+  --with-toolexeclibdir=DIR
+                          install libraries built with a cross compiler within
+                          DIR
   --without-libffi        don't use libffi
   --without-libatomic     don't use libatomic
   --with-system-libunwind use installed libunwind
@@ -11486,7 +11490,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11489 "configure"
+#line 11493 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11592,7 +11596,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11595 "configure"
+#line 11599 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $version_specific_libs" >&5
 $as_echo "$version_specific_libs" >&6; }
 
+
+# Check whether --with-toolexeclibdir was given.
+if test "${with_toolexeclibdir+set}" = set; then :
+  withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
+  /)
+    ;;
+  */)
+    with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
+    ;;
+esac
+else
+  with_toolexeclibdir=no
+fi
+
+
+
 # Version-specific runtime libs processing.
 if test $version_specific_libs = yes; then
   glibgo_toolexecdir='${libdir}/gcc/${host_alias}'
 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'
+  case ${with_toolexeclibdir} in
+    no)
+      nover_glibgo_toolexeclibdir='${toolexecdir}/lib'
+      ;;
+    *)
+      nover_glibgo_toolexeclibdir=${with_toolexeclibdir}
+      ;;
+  esac
 else
   nover_glibgo_toolexecdir='${libdir}/gcc/${host_alias}'
   nover_glibgo_toolexeclibdir='${libdir}'
index 07c03bcdf2616d3cb98e53061756777e2384951c..f800d44a0e9cf194e1e3fff87dbdd9a093c4ba39 100644 (file)
@@ -80,6 +80,8 @@ AC_ARG_ENABLE([version-specific-runtime-libs],
   [version_specific_libs=no])
 AC_MSG_RESULT($version_specific_libs)
 
+GCC_WITH_TOOLEXECLIBDIR
+
 # Version-specific runtime libs processing.
 if test $version_specific_libs = yes; then
   glibgo_toolexecdir='${libdir}/gcc/${host_alias}'
@@ -91,7 +93,14 @@ fi
 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'
+  case ${with_toolexeclibdir} in
+    no)
+      nover_glibgo_toolexeclibdir='${toolexecdir}/lib'
+      ;;
+    *)
+      nover_glibgo_toolexeclibdir=${with_toolexeclibdir}
+      ;;
+  esac
 else
   nover_glibgo_toolexecdir='${libdir}/gcc/${host_alias}'
   nover_glibgo_toolexeclibdir='${libdir}'
index 7b4b27f0c309ddd1bd2bfe121b1a20e3914af8e3..3d55e2649d3c296aa44071b5d5f6a00cc463d544 100644 (file)
@@ -95,6 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
+       $(top_srcdir)/../config/toolexeclibdir.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/config/libtool.m4 \
        $(top_srcdir)/config/ltoptions.m4 \