zlib: Fix iOS cross build
1. CHOST is how one specifies the cross host platform with this non-standard configure script. We were just getting lucky with Linux cross. 2. install_name_tool needs the the binutils prefix.
This commit is contained in:
parent
750933a17c
commit
cc83d59333
@ -3,7 +3,7 @@
|
|||||||
, static ? false
|
, static ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (rec {
|
||||||
name = "zlib-${version}";
|
name = "zlib-${version}";
|
||||||
version = "1.2.11";
|
version = "1.2.11";
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||||||
# what causes this difference.
|
# what causes this difference.
|
||||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
for file in $out/lib/*.so* $out/lib/*.dylib* ; do
|
for file in $out/lib/*.so* $out/lib/*.dylib* ; do
|
||||||
install_name_tool -id "$file" $file
|
${stdenv.cc.bintools.targetPrefix}install_name_tool -id "$file" $file
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
# Non-typical naming confuses libtool which then refuses to use zlib's DLL
|
# Non-typical naming confuses libtool which then refuses to use zlib's DLL
|
||||||
@ -78,4 +78,8 @@ stdenv.mkDerivation rec {
|
|||||||
license = licenses.zlib;
|
license = licenses.zlib;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
} // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
||||||
|
preConfigure = ''
|
||||||
|
export CHOST=${stdenv.hostPlatform.config}
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user