This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix slibdir for libgcc
- From: Daniel Jacobowitz <drow at false dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 Jan 2007 11:03:17 -0500
- Subject: Fix slibdir for libgcc
Richard Sandiford noticed that libgcc was installing libgcc_s.so in the
wrong directory when building cross compilers. I failed to copy the right
bits from other target libraries (IIRC I picked libiberty, which of course
doesn't build a shared library, so doesn't need to worry about this...).
He tested this for me on an m68k-linux cross; I've checked it in.
--
Daniel Jacobowitz
CodeSourcery
2007-01-25 Daniel Jacobowitz <dan@codesourcery.com>
* configure.ac: Add --enable-version-specific-runtime-libs.
Correct $slibdir default.
* configure: Regenerated.
Index: configure.ac
===================================================================
--- configure.ac (revision 120594)
+++ configure.ac (working copy)
@@ -52,13 +52,24 @@ AC_ARG_ENABLE(shared,
], [enable_shared=yes])
AC_SUBST(enable_shared)
+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)
+
AC_ARG_WITH(slibdir,
[ --with-slibdir=DIR shared libraries in DIR [LIBDIR]],
slibdir="$with_slibdir",
-if test "${enable_version_specific_runtime_libs+set}" = set; then
+if test "${version_specific_libs}" = yes; then
slibdir='$(libsubdir)'
-elif test "$host" != "$target"; then
- slibdir='$(build_tooldir)/lib'
+elif test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then
+ slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
else
slibdir='$(libdir)'
fi)