androidsdk: fix rpath that includes 32-bit zlib

This commit is contained in:
Sander van der Burg 2016-07-07 16:23:25 +00:00
parent 3adb769776
commit 92ef67b57c
3 changed files with 6 additions and 6 deletions

View file

@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
\( -type f -a -name "*.so*" \) -o \
\( -type f -a -perm -0100 \) \
\) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \
--set-rpath ${stdenv.lib.makeLibraryPath [ zlib ncurses ]} {} \;
--set-rpath ${stdenv.lib.makeLibraryPath [ zlib.out ncurses ]} {} \;
# fix ineffective PROGDIR / MYNDKDIR determination
for i in ndk-build ndk-gdb ndk-gdb-py
do

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
cd ${version}
# Patch the interpreter
for i in aapt aidl bcc_compat dexdump llvm-rs-cc
for i in aidl bcc_compat dexdump llvm-rs-cc
do
patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i
done
@ -52,16 +52,16 @@ stdenv.mkDerivation rec {
done
# These binaries also need zlib in addition to libstdc++
for i in arm-linux-androideabi-ld i686-linux-android-ld mipsel-linux-android-ld split-select zipalign
for i in arm-linux-androideabi-ld i686-linux-android-ld mipsel-linux-android-ld split-select aapt zipalign
do
patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i
patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib:`pwd`/lib $i
patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit.out}/lib:`pwd`/lib $i
done
# These binaries need to find libstdc++, libgcc_s, and zlib
for i in aapt dexdump
do
patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib:`pwd`/lib $i
patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit.out}/lib:`pwd`/lib $i
done
''}

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
for i in etc1tool
do
patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib:`pwd`/lib $i
patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit.out}/lib:`pwd`/lib $i
done
''}