From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YG2NJ9z71F5XJQAA0tVLHw (envelope-from ) for ; Mon, 01 Jun 2020 13:00:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kDeDI9z71F6BLgAAB5/wlQ (envelope-from ) for ; Mon, 01 Jun 2020 13:00:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 487389404CF for ; Mon, 1 Jun 2020 13:00:12 +0000 (UTC) Received: from localhost ([::1]:40486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfk31-0002pT-85 for larch@yhetil.org; Mon, 01 Jun 2020 09:00:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfk2s-0002pL-H7 for guix-patches@gnu.org; Mon, 01 Jun 2020 09:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfk2s-0000F6-66 for guix-patches@gnu.org; Mon, 01 Jun 2020 09:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfk2s-0003ti-4A for guix-patches@gnu.org; Mon, 01 Jun 2020 09:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41643] [PATCH] build-system: linux-module: Allow passing #:make-flags argument. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Jun 2020 13:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41643 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41643@debbugs.gnu.org Cc: Danny Milosavljevic X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159101637014881 (code B ref -1); Mon, 01 Jun 2020 13:00:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Jun 2020 12:59:30 +0000 Received: from localhost ([127.0.0.1]:34785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfk2M-0003rx-7L for submit@debbugs.gnu.org; Mon, 01 Jun 2020 08:59:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:42368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfk2K-0003rp-6i for submit@debbugs.gnu.org; Mon, 01 Jun 2020 08:59:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfk2J-0002cM-Sf for guix-patches@gnu.org; Mon, 01 Jun 2020 08:59:27 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:32962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfk2I-0008SK-Bf for guix-patches@gnu.org; Mon, 01 Jun 2020 08:59:27 -0400 Received: from dayas.fritz.box (128-244-187.fonira.net [185.128.244.187]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 2B4E833682F4; Mon, 1 Jun 2020 14:59:22 +0200 (CEST) From: Danny Milosavljevic Date: Mon, 1 Jun 2020 14:59:10 +0200 Message-Id: <20200601125910.12840-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=85.13.145.193; envelope-from=dannym@scratchpost.org; helo=dd26836.kasserver.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/01 08:59:22 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: H/5z+AaoID78 * guix/build-system/linux-module.scm (linux-module-build): Add #:make-flags. (linux-module-build-cross): Add #:make-flags. * guix/build/linux-module-build-system.scm (install): Pass make-flags. --- guix/build-system/linux-module.scm | 4 ++++ guix/build/linux-module-build-system.scm | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm index ca104f7c75..1077215671 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -129,6 +129,7 @@ (phases '(@ (guix build linux-module-build-system) %standard-phases)) (outputs '("out")) + (make-flags ''()) (system (%current-system)) (guile #f) (substitutable? #t) @@ -156,6 +157,7 @@ #:arch ,(system->arch (or target system)) #:tests? ,tests? #:outputs %outputs + #:make-flags ,make-flags #:inputs %build-inputs))) (define guile-for-build @@ -181,6 +183,7 @@ target native-drvs target-drvs (guile #f) (outputs '("out")) + (make-flags ''()) (search-paths '()) (native-search-paths '()) (tests? #f) @@ -228,6 +231,7 @@ #:target ,target #:arch ,(system->arch (or target system)) #:outputs %outputs + #:make-flags ,make-flags #:inputs %build-target-inputs #:native-inputs %build-host-inputs #:search-paths diff --git a/guix/build/linux-module-build-system.scm b/guix/build/linux-module-build-system.scm index 73d6b101f6..d51d76f94b 100644 --- a/guix/build/linux-module-build-system.scm +++ b/guix/build/linux-module-build-system.scm @@ -58,12 +58,13 @@ ;; This block was copied from make-linux-libre--only took the "modules_install" ;; part. -(define* (install #:key inputs native-inputs outputs #:allow-other-keys) +(define* (install #:key make-flags inputs native-inputs outputs + #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (moddir (string-append out "/lib/modules"))) ;; Install kernel modules (mkdir-p moddir) - (invoke "make" "-C" + (apply invoke "make" "-C" (string-append (assoc-ref inputs "linux-module-builder") "/lib/modules/build") (string-append "M=" (getcwd)) @@ -76,7 +77,8 @@ (string-append "INSTALL_PATH=" out) (string-append "INSTALL_MOD_PATH=" out) "INSTALL_MOD_STRIP=1" - "modules_install"))) + "modules_install" + (or make-flags '())))) (define %standard-phases (modify-phases gnu:%standard-phases @@ -84,7 +86,8 @@ (replace 'build build) (replace 'install install))) -(define* (linux-module-build #:key inputs (phases %standard-phases) +(define* (linux-module-build #:key inputs + (phases %standard-phases) #:allow-other-keys #:rest args) "Build the given package, applying all of PHASES in order, with a Linux kernel in attendance."