[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 30/151: INSTALL.md: provide Android build instructions
From: |
gnunet |
Subject: |
[gnurl] 30/151: INSTALL.md: provide Android build instructions |
Date: |
Fri, 20 Dec 2019 14:25:39 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 0a906a45aff21d2fd4a493b5a117050d0919e4cf
Author: Andreas Falkenhahn <address@hidden>
AuthorDate: Sat Nov 16 22:05:43 2019 +0100
INSTALL.md: provide Android build instructions
Closes #4606
---
docs/INSTALL.md | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index 5beb5d762..14b21132d 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -284,6 +284,47 @@ will run on cats as old as OS X 10.6 ("Snow Leopard")
(using bash):
./configure --with-darwinssl
make
+# Android
+
+When building curl for Android it's recommended to use a Linux environment
+since using curl's `configure` script is the easiest way to build curl
+for Android. Before you can build curl for Android, you need to install the
+Android NDK first. This can be done using the SDK Manager that is part of
+Android Studio. Once you have installed the Android NDK, you need to figure out
+where it has been installed and then set up some environment variables before
+launching `configure`. On macOS, those variables could look like this to
compile
+for `aarch64` and API level 29:
+
+ export NDK=~/Library/Android/sdk/ndk/20.1.5948944
+ export HOST_TAG=darwin-x86_64
+ export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
+ export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar
+ export AS=$TOOLCHAIN/bin/aarch64-linux-android-as
+ export CC=$TOOLCHAIN/bin/aarch64-linux-android29-clang
+ export CXX=$TOOLCHAIN/bin/aarch64-linux-android29-clang++
+ export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld
+ export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib
+ export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip
+
+When building on Linux or targetting other API levels or architectures, you
need
+to adjust those variables accordingly. After that you can build curl like this:
+
+ ./configure --host aarch64-linux-android --with-pic --disable-shared
+
+Note that this won't give you SSL/TLS support. If you need SSL/TLS, you have
+to build curl against a SSL/TLS layer, e.g. OpenSSL, because it's impossible
for
+curl to access Android's native SSL/TLS layer. To build curl for Android using
+OpenSSL, follow the OpenSSL build instructions and then install `libssl.a` and
+`libcrypto.a` to `$TOOLCHAIN/sysroot/usr/lib` and copy `include/openssl` to
+`$TOOLCHAIN/sysroot/usr/include`. Now you can build curl for Android using
+OpenSSL like this:
+
+ ./configure --host aarch64-linux-android --with-pic --disable-shared
--with-ssl="$TOOLCHAIN/sysroot/usr"
+
+Note, however, that you must target at least Android M (API level 23) or
`configure`
+won't be able to detect OpenSSL since `stderr` (and the like) weren't defined
+before Android M.
+
# Cross compile
Download and unpack the curl package.
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 32/151: multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds, (continued)
- [gnurl] 32/151: multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds, gnunet, 2019/12/20
- [gnurl] 29/151: doh: improced both encoding and decoding, gnunet, 2019/12/20
- [gnurl] 28/151: ngtcp2: increase QUIC window size when data is consumed, gnunet, 2019/12/20
- [gnurl] 34/151: ngtcp2: free used resources on disconnect, gnunet, 2019/12/20
- [gnurl] 45/151: openssl: Revert to less sensitivity for SYSCALL errors, gnunet, 2019/12/20
- [gnurl] 44/151: openssl: improve error message for SYSCALL during connect, gnunet, 2019/12/20
- [gnurl] 40/151: curl: add --parallel-immediate, gnunet, 2019/12/20
- [gnurl] 37/151: RELEASE-NOTES: synced, gnunet, 2019/12/20
- [gnurl] 42/151: include: make CURLE_HTTP3 use a new error code, gnunet, 2019/12/20
- [gnurl] 39/151: docs: fix typos, gnunet, 2019/12/20
- [gnurl] 30/151: INSTALL.md: provide Android build instructions,
gnunet <=
- [gnurl] 43/151: test1175: verify symbols-in-versions and libcurl-errors.3 in sync, gnunet, 2019/12/20
- [gnurl] 41/151: bump: next release will be 7.68.0, gnunet, 2019/12/20
- [gnurl] 35/151: altsvc: bump to h3-24, gnunet, 2019/12/20
- [gnurl] 36/151: ngtcp2: use overflow buffer for extra HTTP/3 data, gnunet, 2019/12/20
- [gnurl] 31/151: lib: Move lib/ssh.h -> lib/vssh/ssh.h, gnunet, 2019/12/20
- [gnurl] 46/151: RELEASE-NOTES: synced, gnunet, 2019/12/20
- [gnurl] 49/151: schannel: fix --tls-max for when min is --tlsv1 or default, gnunet, 2019/12/20
- [gnurl] 65/151: http_ntlm: Remove duplicate NSS initialisation, gnunet, 2019/12/20
- [gnurl] 54/151: curl: fix --upload-file . hangs if delay in STDIN, gnunet, 2019/12/20
- [gnurl] 47/151: projects: Fix Visual Studio projects SSH builds, gnunet, 2019/12/20