From e8e66971cdc6d1390d47a227899e2e340ff44d66 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 24 Jan 2020 11:24:25 +0000 Subject: Add `--with-toolexeclibdir=' configuration option Provide means, in the form of a `--with-toolexeclibdir=' configuration option, to override the default installation directory for target libraries, otherwise known as $toolexeclibdir. This is so that it is possible to get newly-built libraries, particularly the shared ones, installed in a common place, so that they can be readily used by the target system as their host libraries, possibly over NFS, without a need to manually copy them over from the currently hardcoded location they would otherwise be installed in. In the presence of the `--enable-version-specific-runtime-libs' option and for configurations building native GCC the option is ignored. config/ * toolexeclibdir.m4: New file. gcc/ * doc/install.texi (Cross-Compiler-Specific Options): Document `--with-toolexeclibdir' option. libada/ * Makefile.in (configure_deps): Add `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. libatomic/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libffi/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * include/Makefile.in: Regenerate. * man/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libgcc/ * Makefile.in (configure_deps): Add `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. libgfortran/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libgomp/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libhsail-rt/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libitm/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. libobjc/ * Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'. * aclocal.m4: Include `toolexeclibdir.m4'. * configure.ac: Handle `--with-toolexeclibdir='. * configure: Regenerate. liboffloadmic/ * plugin/configure.ac: Handle `--with-toolexeclibdir='. * plugin/Makefile.in: Regenerate. * plugin/aclocal.m4: Regenerate. * plugin/configure: Regenerate. * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libphobos/ * m4/druntime.m4: Handle `--with-toolexeclibdir='. * m4/Makefile.in: Regenerate. * libdruntime/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libquadmath/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libsanitizer/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * asan/Makefile.in: Regenerate. * interception/Makefile.in: Regenerate. * libbacktrace/Makefile.in: Regenerate. * lsan/Makefile.in: Regenerate. * sanitizer_common/Makefile.in: Regenerate. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.in: Regenerate. libssp/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. libstdc++-v3/ * acinclude.m4: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: 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. * src/c++11/Makefile.in: Regenerate. * src/c++17/Makefile.in: Regenerate. * src/c++98/Makefile.in: Regenerate. * src/filesystem/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. libvtv/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate. zlib/ * configure.ac: Handle `--with-toolexeclibdir='. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. --- libitm/ChangeLog | 8 ++++++++ libitm/Makefile.in | 1 + libitm/aclocal.m4 | 1 + libitm/configure | 33 ++++++++++++++++++++++++++++++--- libitm/configure.ac | 11 ++++++++++- libitm/testsuite/Makefile.in | 1 + 6 files changed, 51 insertions(+), 4 deletions(-) (limited to 'libitm') diff --git a/libitm/ChangeLog b/libitm/ChangeLog index b1313d727bc..feccd160330 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,11 @@ +2020-01-24 Maciej W. Rozycki + + * configure.ac: Handle `--with-toolexeclibdir='. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * testsuite/Makefile.in: Regenerate. + 2020-01-01 Jakub Jelinek Update copyright years. diff --git a/libitm/Makefile.in b/libitm/Makefile.in index 6f77755590e..7f53ea9b9db 100644 --- a/libitm/Makefile.in +++ b/libitm/Makefile.in @@ -107,6 +107,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/override.m4 \ $(top_srcdir)/../config/stdint.m4 \ $(top_srcdir)/../config/tls.m4 \ + $(top_srcdir)/../config/toolexeclibdir.m4 \ $(top_srcdir)/../config/weakref.m4 \ $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ diff --git a/libitm/aclocal.m4 b/libitm/aclocal.m4 index 26748bfc649..4f65f6944b7 100644 --- a/libitm/aclocal.m4 +++ b/libitm/aclocal.m4 @@ -1199,6 +1199,7 @@ m4_include([../config/multi.m4]) m4_include([../config/override.m4]) m4_include([../config/stdint.m4]) m4_include([../config/tls.m4]) +m4_include([../config/toolexeclibdir.m4]) m4_include([../config/weakref.m4]) m4_include([../ltoptions.m4]) m4_include([../ltsugar.m4]) diff --git a/libitm/configure b/libitm/configure index 6342c5805b9..97db1bc8845 100644 --- a/libitm/configure +++ b/libitm/configure @@ -802,6 +802,7 @@ enable_version_specific_runtime_libs enable_generated_files_in_srcdir enable_silent_rules enable_multilib +with_toolexeclibdir enable_dependency_tracking enable_shared enable_static @@ -1472,6 +1473,9 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-toolexeclibdir=DIR + install libraries built with a cross compiler within + DIR --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] @@ -3527,6 +3531,22 @@ fi ac_config_commands="$ac_config_commands default-1" + +# 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 + + + # Calculate toolexeclibdir # Also toolexecdir, though it's only used in toolexeclibdir case ${enable_version_specific_runtime_libs} in @@ -3542,7 +3562,14 @@ case ${enable_version_specific_runtime_libs} in 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' + case ${with_toolexeclibdir} in + no) + toolexeclibdir='$(toolexecdir)/lib' + ;; + *) + toolexeclibdir=${with_toolexeclibdir} + ;; + esac else toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' @@ -12037,7 +12064,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12040 "configure" +#line 12067 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12143,7 +12170,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12146 "configure" +#line 12173 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libitm/configure.ac b/libitm/configure.ac index ca66033df77..9422889112e 100644 --- a/libitm/configure.ac +++ b/libitm/configure.ac @@ -78,6 +78,8 @@ target_alias=${target_alias-$host_alias} AM_INIT_AUTOMAKE([1.9.0 foreign no-dist -Wall -Wno-portability -Wno-override]) AM_ENABLE_MULTILIB(, ..) +GCC_WITH_TOOLEXECLIBDIR + # Calculate toolexeclibdir # Also toolexecdir, though it's only used in toolexeclibdir case ${enable_version_specific_runtime_libs} in @@ -93,7 +95,14 @@ case ${enable_version_specific_runtime_libs} in 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' + case ${with_toolexeclibdir} in + no) + toolexeclibdir='$(toolexecdir)/lib' + ;; + *) + toolexeclibdir=${with_toolexeclibdir} + ;; + esac else toolexecdir='$(libdir)/gcc-lib/$(target_alias)' toolexeclibdir='$(libdir)' diff --git a/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in index 991f02c0b3b..120696d1c25 100644 --- a/libitm/testsuite/Makefile.in +++ b/libitm/testsuite/Makefile.in @@ -102,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/override.m4 \ $(top_srcdir)/../config/stdint.m4 \ $(top_srcdir)/../config/tls.m4 \ + $(top_srcdir)/../config/toolexeclibdir.m4 \ $(top_srcdir)/../config/weakref.m4 \ $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ -- cgit v1.2.3