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 sPlGI9mL4V8TZwAA0tVLHw (envelope-from ) for ; Tue, 22 Dec 2020 06:02:01 +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 GJMSH9mL4V/vUwAAB5/wlQ (envelope-from ) for ; Tue, 22 Dec 2020 06:02:01 +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 91F9394030E for ; Tue, 22 Dec 2020 06:02:00 +0000 (UTC) Received: from localhost ([::1]:58502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krakB-0000Jy-Ht for larch@yhetil.org; Tue, 22 Dec 2020 01:01:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krajz-0000Js-QZ for guix-devel@gnu.org; Tue, 22 Dec 2020 01:01:47 -0500 Received: from world.peace.net ([64.112.178.59]:48680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krajv-0006Tv-CN for guix-devel@gnu.org; Tue, 22 Dec 2020 01:01:47 -0500 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1krajt-0001FW-9q; Tue, 22 Dec 2020 01:01:41 -0500 From: Mark H Weaver To: John Doe , Chris Marusich , Efraim Flashner Subject: Re: [PATCH] gnu: libffi: Add unreleased patch to fix float128 on powerpc64le. In-Reply-To: <87y2hqifp3.fsf@netris.org> References: <87y2hqifp3.fsf@netris.org> Date: Tue, 22 Dec 2020 01:00:44 -0500 Message-ID: <87tuseidlk.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.112.178.59; envelope-from=mhw@netris.org; helo=world.peace.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, 45252@debbugs.gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.32 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 91F9394030E X-Spam-Score: -2.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: k1kWAXViMimG Earlier, I wrote: > When invoking 'patch' in Guix, you should *always* use "--force" instead > of "--batch". (See for my earlier message). Since writing the message above, I've found another problem in the same commit (7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99): it searches for the 'patch' program in 'inputs'. This is a mistake, because when cross-compiling, 'inputs' will contain software compiled to run on the target system instead of the build system. If 'native-inputs' is not #f, we should search for the 'patch' program in 'native-inputs' instead of 'inputs'. Unless there's now a better way that I don't know, I suggest adding 'native-inputs' to the list of keyword arguments accepted by the 'lambda*', and changing 'inputs' to "(or native-inputs inputs)" in the call to 'assoc-ref'. Something like this (untested): _ ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system) __________________________________________ (%current-system))) _______ '(#:phases (modify-phases %standard-phases ____________________ (add-after 'unpack 'apply-patch2 ______________________ (lambda* (#:key inputs native-inputs ________________________________ #:allow-other-keys) ________________________ (let ((patch (assoc-ref (or native-inputs inputs) ________________________________________________ "powerpc64le-patch"))) __________________________ (invoke "patch" "--force" "-p1" __________________________________ "-i" patch)))))) _______ '()) I see now that both of these mistakes were already present in the "powerpc-*" case immediately above the recently-added "powerpc64le-*" case. The "powerpc-*" case was added earlier this year in the following commit: https://git.sv.gnu.org/cgit/guix.git/commit/?id=02f5ee01c96589fc13f1e21b85b0b48100aec4e8 I'm CC'ing 'guix-devel' to raise awareness about these common mistakes, in the hopes that reviewers will be more likely to notice them in the future. Thanks, Mark