From ba386bea11173bfa2f7c76b6368a49a43f366eea Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 24 Jan 2020 06:31:04 -0800 Subject: [PATCH] libgo: handle --with-toolexeclibdir=. Patch by Maciej W. Rozycki. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216239 --- gcc/go/gofrontend/MERGE | 2 +- libgo/Makefile.in | 1 + libgo/aclocal.m4 | 1 + libgo/configure | 33 ++++++++++++++++++++++++++++++--- libgo/configure.ac | 11 ++++++++++- libgo/testsuite/Makefile.in | 1 + 6 files changed, 44 insertions(+), 5 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index fc1dbaca8b9..38872c44eab 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 88c687464fc..0ff6ba144b8 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -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 \ diff --git a/libgo/aclocal.m4 b/libgo/aclocal.m4 index 951aed3a81b..739b97a0275 100644 --- a/libgo/aclocal.m4 +++ b/libgo/aclocal.m4 @@ -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]) diff --git a/libgo/configure b/libgo/configure index 385ca9a65cd..2f787392abd 100755 --- a/libgo/configure +++ b/libgo/configure @@ -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 @@ -13800,6 +13804,22 @@ fi { $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}' @@ -13811,7 +13831,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}' diff --git a/libgo/configure.ac b/libgo/configure.ac index 07c03bcdf26..f800d44a0e9 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -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}' diff --git a/libgo/testsuite/Makefile.in b/libgo/testsuite/Makefile.in index 7b4b27f0c30..3d55e2649d3 100644 --- a/libgo/testsuite/Makefile.in +++ b/libgo/testsuite/Makefile.in @@ -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 \ -- 2.30.2