svn commit: trunk/busybox/applets

landley at busybox.net landley at busybox.net
Fri Mar 24 02:43:00 UTC 2006


Author: landley
Date: 2006-03-23 18:42:58 -0800 (Thu, 23 Mar 2006)
New Revision: 14639

Log:
When cross-compiling, the install directory for shared libraries has to come
from gcc (target machine), not uname (host machine).


Modified:
   trunk/busybox/applets/install.sh


Changeset:
Modified: trunk/busybox/applets/install.sh
===================================================================
--- trunk/busybox/applets/install.sh	2006-03-24 00:16:17 UTC (rev 14638)
+++ trunk/busybox/applets/install.sh	2006-03-24 02:42:58 UTC (rev 14639)
@@ -18,11 +18,12 @@
 
 if [ "$DO_INSTALL_LIBS" != "n" ]; then
 	# get the target dir for the libs
-	# This is an incomplete/incorrect list for now
-	case $(uname -m) in
-	x86_64|ppc64*|sparc64*|ia64*|hppa*64*|s390x*) libdir=/lib64 ;;
-	*) libdir=/lib ;;
-	esac
+	# assume it starts with lib
+	libdir=$($CC -print-file-name=libc.so | \
+		 sed -n 's%^.*\(/lib[^\/]*\)/libc.so%\1%p')
+	if test -z "$libdir"; then
+		libdir=/lib
+	fi
 
 	mkdir -p $prefix/$libdir || exit 1
 	for i in $DO_INSTALL_LIBS; do




More information about the busybox-cvs mailing list