diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-15 00:03:37 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-15 00:03:37 +0000 |
commit | 5d941ad95bfcef44ccb2571a58ab8004864f6863 (patch) | |
tree | a8a3fa7456e785a41340328a74e22f3b0e52749c /libsanitizer/configure.ac | |
parent | 8e311e69ec61bd7b7d18bd8b8a9c7fae41b44b76 (diff) | |
download | gcc-5d941ad95bfcef44ccb2571a58ab8004864f6863.tar.gz |
Add support for multilib run-time libraries
PR other/55291
* configure.ac (--enable-version-specific-runtime-libs): New option.
(AC_CANONICAL_SYSTEM): New.
(AM_ENABLE_MULTILIB): Moved right after AM_INIT_AUTOMAKE.
(toolexecdir): Support multilib.
(toolexeclibdir): Likewise.
(multilib_arg): New.
* Makefile.in: Regenerated.
* aclocal.m4: Likewise.
* configure: Likewise.
* asan/Makefile.in: Likewise.
* interception/Makefile.in: Likewise.
* sanitizer_common/Makefile.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193516 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer/configure.ac')
-rw-r--r-- | libsanitizer/configure.ac | 62 |
1 files changed, 54 insertions, 8 deletions
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac index 0b6cdef9425..27a7f951dbf 100644 --- a/libsanitizer/configure.ac +++ b/libsanitizer/configure.ac @@ -4,7 +4,56 @@ AC_PREREQ([2.64]) AC_INIT(package-unused, version-unused, libsanitizer) AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h]) + +AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) +AC_ARG_ENABLE(version-specific-runtime-libs, +[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], +[case "$enableval" in + yes) version_specific_libs=yes ;; + no) version_specific_libs=no ;; + *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; + esac], +[version_specific_libs=no]) +AC_MSG_RESULT($version_specific_libs) + +# Do not delete or change the following two lines. For why, see +# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html +AC_CANONICAL_SYSTEM +target_alias=${target_alias-$host_alias} +AC_SUBST(target_alias) + AM_INIT_AUTOMAKE(foreign) +AM_ENABLE_MULTILIB(, ..) + +# Calculate toolexeclibdir +# Also toolexecdir, though it's only used in toolexeclibdir +case ${version_specific_libs} in + yes) + # Need the gcc compiler version to know where to install libraries + # and header files if --enable-version-specific-runtime-libs option + # is selected. + toolexecdir='$(libdir)/gcc/$(target_alias)' + 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 + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + ;; +esac +AC_SUBST(toolexecdir) +AC_SUBST(toolexeclibdir) # Checks for programs. AC_PROG_CC @@ -17,14 +66,11 @@ AM_PROG_LIBTOOL AC_SUBST(enable_shared) AC_SUBST(enable_static) -#AM_ENABLE_MULTILIB(, ..) -target_alias=${target_alias-$host_alias} -AC_SUBST(target_alias) - -toolexecdir='$(libdir)/gcc-lib/$(target_alias)' -toolexeclibdir='$(libdir)' -AC_SUBST(toolexecdir) -AC_SUBST(toolexeclibdir) +if test "${multilib}" = "yes"; then + multilib_arg="--enable-multilib" +else + multilib_arg= +fi AC_CONFIG_FILES([Makefile]) |