diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 608db00a968..ac1633a1a15 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -47,7 +47,7 @@ rec { armv5te-android-prebuilt = rec { config = "armv5tel-unknown-linux-androideabi"; sdkVer = "21"; - ndkVer = "10e"; + ndkVer = "18b"; platform = platforms.armv5te-android; useAndroidPrebuilt = true; }; @@ -55,7 +55,7 @@ rec { armv7a-android-prebuilt = rec { config = "armv7a-unknown-linux-androideabi"; sdkVer = "24"; - ndkVer = "17c"; + ndkVer = "18b"; platform = platforms.armv7a-android; useAndroidPrebuilt = true; }; @@ -63,7 +63,7 @@ rec { aarch64-android-prebuilt = rec { config = "aarch64-unknown-linux-android"; sdkVer = "24"; - ndkVer = "17c"; + ndkVer = "18b"; platform = platforms.aarch64-multiplatform; useAndroidPrebuilt = true; }; diff --git a/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix index d4189fe8455..d423ae5f1c4 100644 --- a/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix +++ b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix @@ -38,14 +38,16 @@ let hostInfo = ndkInfoFun stdenv.hostPlatform; targetInfo = ndkInfoFun stdenv.targetPlatform; - in rec { # Misc tools binaries = let ndkBinDir = - "${androidndk}/libexec/${androidndk.name}/toolchains/${targetInfo.triple}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}/bin"; + "${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/${targetInfo.triple}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}/bin"; + ndkGCCLibDir = + "${androidndk}/libexec/android-sdk/ndk-bundle/toolchains/${targetInfo.triple}-${targetInfo.gccVer}/prebuilt/${hostInfo.double}/lib/gcc/${targetInfo.triple}/4.9.x"; + in runCommand "ndk-gcc-binutils" { isGNU = true; # for cc-wrapper nativeBuildInputs = [ makeWrapper ]; @@ -54,8 +56,15 @@ rec { mkdir -p $out/bin for prog in ${ndkBinDir}/${targetInfo.triple}-*; do prog_suffix=$(basename $prog | sed 's/${targetInfo.triple}-//') - ln -s $prog $out/bin/${stdenv.targetPlatform.config}-$prog_suffix + cat > $out/bin/${stdenv.targetPlatform.config}-$prog_suffix <