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. --- libquadmath/ChangeLog | 7 +++++++ libquadmath/Makefile.in | 1 + libquadmath/aclocal.m4 | 1 + libquadmath/configure | 33 ++++++++++++++++++++++++++++++--- libquadmath/configure.ac | 11 ++++++++++- 5 files changed, 49 insertions(+), 4 deletions(-) (limited to 'libquadmath') diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index 9b159b5af6e..0b1db14d8d6 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -1,3 +1,10 @@ +2020-01-24 Maciej W. Rozycki + + * configure.ac: Handle `--with-toolexeclibdir='. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * configure: Regenerate. + 2020-01-01 Jakub Jelinek Update copyright years. diff --git a/libquadmath/Makefile.in b/libquadmath/Makefile.in index 32cf5098508..8c011212258 100644 --- a/libquadmath/Makefile.in +++ b/libquadmath/Makefile.in @@ -100,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/no-executables.m4 \ $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/toolexeclibdir.m4 \ $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \ diff --git a/libquadmath/aclocal.m4 b/libquadmath/aclocal.m4 index 42c0880be36..f15cc0b9f08 100644 --- a/libquadmath/aclocal.m4 +++ b/libquadmath/aclocal.m4 @@ -1174,6 +1174,7 @@ m4_include([../config/lthostflags.m4]) m4_include([../config/multi.m4]) m4_include([../config/no-executables.m4]) m4_include([../config/override.m4]) +m4_include([../config/toolexeclibdir.m4]) m4_include([../ltoptions.m4]) m4_include([../ltsugar.m4]) m4_include([../ltversion.m4]) diff --git a/libquadmath/configure b/libquadmath/configure index 053d8deef53..339e80944e6 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -786,6 +786,7 @@ enable_fast_install with_gnu_ld enable_libtool_lock enable_maintainer_mode +with_toolexeclibdir enable_symvers enable_cet enable_generated_files_in_srcdir @@ -1451,6 +1452,9 @@ Optional Packages: --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] + --with-toolexeclibdir=DIR + install libraries built with a cross compiler within + DIR --with-gcc-major-version-only use only GCC major number in filesystem paths @@ -10810,7 +10814,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10813 "configure" +#line 10817 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10916,7 +10920,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10919 "configure" +#line 10923 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12088,6 +12092,22 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# 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 ${version_specific_libs} in @@ -12103,7 +12123,14 @@ case ${version_specific_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/libquadmath/configure.ac b/libquadmath/configure.ac index b75465bee8d..f9d745e60ca 100644 --- a/libquadmath/configure.ac +++ b/libquadmath/configure.ac @@ -82,6 +82,8 @@ if test "x$GCC" != "xyes"; then fi AC_PROG_CPP +GCC_WITH_TOOLEXECLIBDIR + # Calculate toolexeclibdir # Also toolexecdir, though it's only used in toolexeclibdir case ${version_specific_libs} in @@ -97,7 +99,14 @@ case ${version_specific_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)' -- cgit v1.2.1