summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorRob Landley2006-03-24 02:42:58 +0000
committerRob Landley2006-03-24 02:42:58 +0000
commitd1968672ef0d0475179ca717983616a89d318ec2 (patch)
tree315754397537615b32029f564db24f4b7c68ca9a /applets
parent787140df3992ccc3ebdc09f6d2dcb584f580f49f (diff)
downloadbusybox-d1968672ef0d0475179ca717983616a89d318ec2.zip
busybox-d1968672ef0d0475179ca717983616a89d318ec2.tar.gz
When cross-compiling, the install directory for shared libraries has to come
from gcc (target machine), not uname (host machine).
Diffstat (limited to 'applets')
-rwxr-xr-xapplets/install.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/applets/install.sh b/applets/install.sh
index 0173e7a..e154996 100755
--- a/applets/install.sh
+++ b/applets/install.sh
@@ -18,11 +18,12 @@ esac
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