diff --git a/Dockerfile b/Dockerfile index 4b39ca6..dc9e5e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,5 +12,6 @@ COPY --from=build-termux /usr/local/go/ /usr/local/go-termux/ RUN apt-get update && apt-get install -y sdkmanager ENV NDK_VERSION r26d +ENV ANDROID_VERSION 34 RUN sdkmanager --install "ndk;${NDK_VERSION}" COPY go-termux.sh /usr/local/bin/go-termux diff --git a/go-termux.sh b/go-termux.sh index 823f0ef..601ad87 100755 --- a/go-termux.sh +++ b/go-termux.sh @@ -1,8 +1,9 @@ #!/bin/bash -bindir=/opt/android-sdk/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin -[ "$GOARCH" = "amd64" ] && export CC="$bindir/x86_64-linux-android34-clang" -[ "$GOARCH" = "arm64" ] && export CC="$bindir/aarch64-linux-android34-clang" -[ "$GOARCH" = "arm" ] && export CC="$bindir/armv7a-linux-androideabi34-clang" +bindir="/opt/android-sdk/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin" +[ "$GOARCH" = "amd64" ] && export CC="$bindir/x86_64-linux-android${ANDROID_VERSION}-clang" +[ "$GOARCH" = "arm64" ] && export CC="$bindir/aarch64-linux-android${ANDROID_VERSION}-clang" +[ "$GOARCH" = "arm" ] && export CC="$bindir/armv7a-linux-androideabi${ANDROID_VERSION}-clang" +[ "$GOARCH" = "386" ] && export CC="$bindir/i686-linux-android${ANDROID_VERSION}-clang" exec /usr/local/go-termux/bin/go "$@"