From patchwork Wed Aug 25 18:02:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 32264 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5760B27BBE3; Wed, 25 Aug 2021 19:05:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0A09927BBE1 for ; Wed, 25 Aug 2021 19:05:09 +0100 (BST) Received: from localhost ([::1]:58604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIxGu-0001ZO-4g for patchwork@mira.cbaines.net; Wed, 25 Aug 2021 14:05:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIxG0-00085h-Ot for guix-patches@gnu.org; Wed, 25 Aug 2021 14:04:12 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIxFy-0000ua-Lv for guix-patches@gnu.org; Wed, 25 Aug 2021 14:04:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mIxFy-0002p1-Hd for guix-patches@gnu.org; Wed, 25 Aug 2021 14:04:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 25 Aug 2021 18:04:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50201 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50201@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 50201-submit@debbugs.gnu.org id=B50201.162991464310692 (code B ref 50201); Wed, 25 Aug 2021 18:04:10 +0000 Received: (at 50201) by debbugs.gnu.org; 25 Aug 2021 18:04:03 +0000 Received: from localhost ([127.0.0.1]:47703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIxFq-0002m9-5G for submit@debbugs.gnu.org; Wed, 25 Aug 2021 14:04:02 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:50690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIxFY-0002fp-Tj for 50201@debbugs.gnu.org; Wed, 25 Aug 2021 14:03:46 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id lu3d2500J0mfAB406u3kUa; Wed, 25 Aug 2021 20:03:44 +0200 From: Maxime Devos Date: Wed, 25 Aug 2021 20:02:58 +0200 Message-Id: <20210825180332.5720-18-maximedevos@telenet.be> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210825180332.5720-1-maximedevos@telenet.be> References: <20210825180332.5720-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1629914624; bh=H1PPophH4rr1IUQEZXgGaqfqBQuITGY28xk7BK6DEZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Dj5OApMHKU7ReKVIyLnycrOd0yaly+jpGTAUaI0QykIcpfr+iL9JJS7IaAd6LYpGC oxmCGNyizZHusIQjjqzzfTX3zqvczO579Qh5Ol+M8q78h1i4m1FSnEzNQ2Zo0VPcRG ruAfKcsjaMvMGJ99btQzxk8rvy6/zj/kTA2+dNx/h7s89HBFFHahRmjSnbxY9Lc/0B plriA/wSCSbUayjiVbHYtnZfIj59I3cdQ3Ny0sa2PWHlYtsj4xsnO4l9QUn0EaxGlR zX+4VBugMhEDk8sfKmgo8/MHE4WVFS76VNJPpZpAAJNaa/NoydAyV649E5tYBNbCZ7 XnITmDh8Pbvog== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/dbm.scm (bdb-4.8)[arguments]<#:phases>{update-config.sub}: Update 'config.sub' when cross-compiling for 'powerpc64le' or 'aarch64'. --- gnu/packages/dbm.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index ce84ef9eda..607e4aecf8 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ (define-module (gnu packages dbm) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -57,6 +59,19 @@ #:disallowed-references ("doc") #:phases (modify-phases %standard-phases + ;; The configure script is too old to recognise aarch64 and + ;; powerpc64le as valid architectures. The trick below works + ;; for "--build", but not for "--host", so update config.sub. + ,@(if (and (%current-target-system) + (or (target-ppc64le? (%current-target-system)) + (target-aarch64? (%current-target-system)))) + `((add-after 'unpack 'update-config.sub + (lambda* (#:key native-inputs #:allow-other-keys) + (delete-file "dist/config.sub") + (symlink + (search-input-file native-inputs "/bin/config.sub") + "dist/config.sub")))) + '()) (replace 'configure (lambda* (#:key target outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) @@ -97,6 +112,12 @@ ;; of db_cxx.h into C++ files works; it leads to ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h. "--enable-cxx"))))))) + (native-inputs + (if (and (%current-target-system) + (or (target-ppc64le? (%current-target-system)) + (target-aarch64? (%current-target-system)))) + `(("config" ,config)) ; for config.sub + '())) (synopsis "Berkeley database") (description "Berkeley DB is an embeddable database allowing developers the choice of