Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] android-tools: enable cross-compiling
@ 2019-07-10  9:18 voidlinux-github
  2019-07-10  9:39 ` voidlinux-github
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: voidlinux-github @ 2019-07-10  9:18 UTC (permalink / raw)
  To: ml

[-- 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
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: android-tools: enable cross-compiling
  2019-07-10  9:18 [PR PATCH] android-tools: enable cross-compiling voidlinux-github
@ 2019-07-10  9:39 ` voidlinux-github
  2019-07-10 14:00 ` voidlinux-github
  2019-07-10 16:03 ` [PR PATCH] [Merged]: " voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-07-10  9:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

New comment by zdtcd on void-packages repository

https://github.com/void-linux/void-packages/pull/12963#issuecomment-509990145
Comment:
Do we support cross-compile for x86_64 from i686 host?
I couldn't pkg that way.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: android-tools: enable cross-compiling
  2019-07-10  9:18 [PR PATCH] android-tools: enable cross-compiling voidlinux-github
  2019-07-10  9:39 ` voidlinux-github
@ 2019-07-10 14:00 ` voidlinux-github
  2019-07-10 16:03 ` [PR PATCH] [Merged]: " voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-07-10 14:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

New comment by Hoshpak on void-packages repository

https://github.com/void-linux/void-packages/pull/12963#issuecomment-510073560
Comment:
No, the assumption for cross-compiling is that the host is always x86_64.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: android-tools: enable cross-compiling
  2019-07-10  9:18 [PR PATCH] android-tools: enable cross-compiling voidlinux-github
  2019-07-10  9:39 ` voidlinux-github
  2019-07-10 14:00 ` voidlinux-github
@ 2019-07-10 16:03 ` voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-07-10 16:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

There's a merged pull request on the void-packages repository

android-tools: enable cross-compiling
https://github.com/void-linux/void-packages/pull/12963
Description: This also fix build problem on i686 container/chroot inside x86_64 host: https://github.com/void-linux/void-packages/pull/12834

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-10 16:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10  9:18 [PR PATCH] android-tools: enable cross-compiling voidlinux-github
2019-07-10  9:39 ` voidlinux-github
2019-07-10 14:00 ` voidlinux-github
2019-07-10 16:03 ` [PR PATCH] [Merged]: " voidlinux-github

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).