From unknown Sun Jun 22 08:08:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26999: [PATCH] gnu: sunxi-tools: Build armhf target tools. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 May 2017 18:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26999 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 26999@debbugs.gnu.org Cc: Danny Milosavljevic X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.149521964110550 (code B ref -1); Fri, 19 May 2017 18:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 May 2017 18:47:21 +0000 Received: from localhost ([127.0.0.1]:55608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBmvp-0002k6-8u for submit@debbugs.gnu.org; Fri, 19 May 2017 14:47:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBmvn-0002js-NP for submit@debbugs.gnu.org; Fri, 19 May 2017 14:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBmvh-0005H1-FS for submit@debbugs.gnu.org; Fri, 19 May 2017 14:47:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47946) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dBmvh-0005Gx-CQ for submit@debbugs.gnu.org; Fri, 19 May 2017 14:47:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBmvg-0003qy-3H for guix-patches@gnu.org; Fri, 19 May 2017 14:47:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBmvc-0005G1-5L for guix-patches@gnu.org; Fri, 19 May 2017 14:47:12 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:42400) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dBmvb-0005Fo-UH for guix-patches@gnu.org; Fri, 19 May 2017 14:47:08 -0400 Received: from dayas.3.home (178.113.140.102.wireless.dyn.drei.com [178.113.140.102]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 20D141CA02D3; Fri, 19 May 2017 20:47:02 +0200 (CEST) From: Danny Milosavljevic Date: Fri, 19 May 2017 20:46:56 +0200 Message-Id: <20170519184656.11834-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.12.1 Tags: patch X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * gnu/packages/admin.scm (sunxi-tools) [native-inputs]: Add cross-gcc, cross-libc. [arguments]: Add "set-environment-up" phase. Replace "build" phase. Add "build-armhf" phase. Update make-flags. --- gnu/packages/admin.scm | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index aa6ccc0a7..1bee5de09 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -57,6 +57,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages tcl) #:use-module (gnu packages compression) + #:use-module (gnu packages cross-base) #:use-module (gnu packages tls) #:use-module (gnu packages gnupg) #:use-module (gnu packages bison) @@ -1904,7 +1905,11 @@ Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.") '(delete-file-recursively "bin")) (file-name (string-append name "-" version ".tar.gz")))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf" + (cross-binutils "arm-linux-gnueabihf") + (cross-libc "arm-linux-gnueabihf"))) + ("cross-libc" ,(cross-libc "arm-linux-gnueabihf")))) (inputs `(("libusb" ,libusb))) (build-system gnu-build-system) @@ -1912,12 +1917,34 @@ Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.") `(#:tests? #f ; no tests exist #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "CROSS_COMPILE=" - "CC=gcc" - "all") + (string-append "CROSS_COMPILE=" + "arm-linux-gnueabihf-") + "CC=gcc") #:phases (modify-phases %standard-phases (delete 'configure) + (add-before 'build 'set-environment-up + (lambda* (#:key make-flags #:allow-other-keys) + (define (cross? x) + (string-contains x "cross-arm-linux")) + (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) + (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH")) + (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + (for-each + (lambda (env-name) + (let* ((env-value (getenv env-name)) + (search-path (search-path-as-string->list env-value)) + (new-search-path (filter (lambda (e) (not (cross? e))) search-path)) + (new-env-value (list->search-path-as-string new-search-path ":"))) + (setenv env-name new-env-value))) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH")) + #t)) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" "tools" make-flags)))) + (add-after 'build 'build-armhf + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" "target-tools" "misc" make-flags)))) (replace 'install (lambda* (#:key make-flags #:allow-other-keys) (zero? (apply system* "make" "install-all" "install-misc" From unknown Sun Jun 22 08:08:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26999: [PATCH v2] gnu: sunxi-tools: Build armhf target tools. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 May 2017 20:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26999 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 26999@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 26999-submit@debbugs.gnu.org id=B26999.149522655320662 (code B ref 26999); Fri, 19 May 2017 20:43:02 +0000 Received: (at 26999) by debbugs.gnu.org; 19 May 2017 20:42:33 +0000 Received: from localhost ([127.0.0.1]:55630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBojJ-0005NC-1T for submit@debbugs.gnu.org; Fri, 19 May 2017 16:42:33 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:56750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBojH-0005N4-Mp for 26999@debbugs.gnu.org; Fri, 19 May 2017 16:42:32 -0400 Received: from dayas.3.home (178.113.140.102.wireless.dyn.drei.com [178.113.140.102]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 461661CA02D3; Fri, 19 May 2017 22:42:30 +0200 (CEST) From: Danny Milosavljevic Date: Fri, 19 May 2017 22:42:24 +0200 Message-Id: <20170519204224.27469-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170519184656.11834-1-dannym@scratchpost.org> References: <20170519184656.11834-1-dannym@scratchpost.org> Tags: patch X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * gnu/packages/admin.scm (sunxi-tools) [native-inputs]: Add cross-gcc, cross-libc. [arguments]: Add "set-environment-up" phase. Replace "build" phase. Add "build-armhf" phase. Update make-flags. --- gnu/packages/admin.scm | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index aa6ccc0a7..8bcfe065a 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -57,6 +57,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages tcl) #:use-module (gnu packages compression) + #:use-module (gnu packages cross-base) #:use-module (gnu packages tls) #:use-module (gnu packages gnupg) #:use-module (gnu packages bison) @@ -1904,20 +1905,48 @@ Kerberos and Heimdal and FAST is supported with recent MIT Kerberos.") '(delete-file-recursively "bin")) (file-name (string-append name "-" version ".tar.gz")))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf" + (cross-binutils "arm-linux-gnueabihf") + (cross-libc "arm-linux-gnueabihf"))) + ("cross-libc" ,(cross-libc "arm-linux-gnueabihf")))) (inputs `(("libusb" ,libusb))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests exist + `(#:tests? #f ; no tests exist #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "CROSS_COMPILE=" - "CC=gcc" - "all") + (string-append "CROSS_COMPILE=" + "arm-linux-gnueabihf-") + "CC=gcc") #:phases (modify-phases %standard-phases (delete 'configure) + (add-before 'build 'set-environment-up + (lambda* (#:key make-flags #:allow-other-keys) + (define (cross? x) + (string-contains x "cross-arm-linux")) + (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) + (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH")) + (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + (for-each + (lambda (env-name) + (let* ((env-value (getenv env-name)) + (search-path (search-path-as-string->list env-value)) + (new-search-path (filter (lambda (e) (not (cross? e))) + search-path)) + (new-env-value (list->search-path-as-string + new-search-path ":"))) + (setenv env-name new-env-value))) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH")) + #t)) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" "tools" "misc" make-flags)))) + (add-after 'build 'build-armhf + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" "target-tools" make-flags)))) (replace 'install (lambda* (#:key make-flags #:allow-other-keys) (zero? (apply system* "make" "install-all" "install-misc" From debbugs-submit-bounces@debbugs.gnu.org Thu May 25 07:04:38 2017 Received: (at control) by debbugs.gnu.org; 25 May 2017 11:04:39 +0000 Received: from localhost ([127.0.0.1]:36971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDqZK-0005kz-OO for submit@debbugs.gnu.org; Thu, 25 May 2017 07:04:38 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:52342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDqZJ-0005ks-DH for control@debbugs.gnu.org; Thu, 25 May 2017 07:04:37 -0400 Received: from localhost (178.113.188.144.wireless.dyn.drei.com [178.113.188.144]) by dd1012.kasserver.com (Postfix) with ESMTPSA id C00B71CA00C4 for ; Thu, 25 May 2017 13:04:35 +0200 (CEST) Date: Thu, 25 May 2017 13:04:29 +0200 From: Danny Milosavljevic To: Message-ID: <20170525130429.537a9197@scratchpost.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 26900 close 26906 close 26999 [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [85.13.128.8 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 26900 close 26906 close 26999 [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [85.13.128.8 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject close 26900 close 26906 close 26999