From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] android-tools: enable cross-compiling
Date: Wed, 10 Jul 2019 11:18:23 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-12963@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
There is a new pull request by zdtcd against master on the void-packages repository
https://github.com/zdtcd/void-packages android-tools
https://github.com/void-linux/void-packages/pull/12963
android-tools: enable cross-compiling
This also fix build problem on i686 container/chroot inside x86_64 host.
A patch file from https://github.com/void-linux/void-packages/pull/12963.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-android-tools-12963.patch --]
[-- Type: application/text/x-diff, Size: 1728 bytes --]
From 983a566a214b093690ecb28c678d99c0294499cf Mon Sep 17 00:00:00 2001
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
Date: Wed, 10 Jul 2019 16:08:47 +0700
Subject: [PATCH] android-tools: enable cross-compiling
This also fix build problem on i686 container/chroot inside x86_64 host.
---
srcpkgs/android-tools/template | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/android-tools/template b/srcpkgs/android-tools/template
index 6dc7fc46282..a98bb216ada 100644
--- a/srcpkgs/android-tools/template
+++ b/srcpkgs/android-tools/template
@@ -32,8 +32,6 @@ checksum="@dfaea8c40be4a8bbd1df513ab3516ff88e92430ee0fde399dd7e7e09ec21cd29
@5c2fcb88154f9b6ffed8d24a069e4bad0a7aea1936be2ce18af972ad8762e09a
@452e29d95f8da494896e3335931e928d9b7c94500a5793101bb19629cd7dea8c"
-nocross="error: requested alignment 64 is larger than 8 [-Werror=attributes]"
-
do_extract() {
local tarball p
for p in ${distfiles}; do
@@ -51,11 +49,25 @@ pre_configure() {
mkdir -p boringssl/build
cd boringssl/build
+ # Don't check for CROSS_COMPILING, since i686 container/chroot inside
+ # x86_64 host will failed to build this.
+ if [ "${XBPS_TARGET_MACHINE}" = i686 ] && [ "$(uname -m)" = "x86_64" ]; then
+ boring_ssl_cmake_args="-DCMAKE_TOOLCHAIN_FILE=cross_boring_ssl.cmake"
+ cat > cross_boring_ssl.cmake <<-_EOF
+ SET(CMAKE_SYSTEM_NAME Linux)
+ SET(CMAKE_SYSTEM_VERSION 1)
+ SET(CMAKE_C_COMPILER ${CC})
+ SET(CMAKE_CXX_COMPILER ${CXX})
+ SET(CMAKE_SYSTEM_PROCESSOR x86)
+ _EOF
+ fi
+
cmake -GNinja \
-DBUILD_SHARED_LIBS=FALSE \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
+ $boring_ssl_cmake_args \
..
ninja
}
next reply other threads:[~2019-07-10 9:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 9:18 voidlinux-github [this message]
2019-07-10 9:39 ` voidlinux-github
2019-07-10 14:00 ` voidlinux-github
2019-07-10 16:03 ` [PR PATCH] [Merged]: " voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-12963@inbox.vuxu.org \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).