From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KA70DDw8e2C4BwAAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 21:51:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UHXdBzw8e2BzSgAA1q6Kng (envelope-from ) for ; Sat, 17 Apr 2021 19:51:24 +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 B56FB19187 for ; Sat, 17 Apr 2021 21:51:23 +0200 (CEST) Received: from localhost ([::1]:54842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXqyQ-00009a-Vm for larch@yhetil.org; Sat, 17 Apr 2021 15:51:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXqyF-00009S-09 for guix-devel@gnu.org; Sat, 17 Apr 2021 15:51:11 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:40646) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXqyC-00058l-HK for guix-devel@gnu.org; Sat, 17 Apr 2021 15:51:10 -0400 Received: by mail-pg1-x52e.google.com with SMTP id b17so21485086pgh.7 for ; Sat, 17 Apr 2021 12:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ujVzrwkJ1/8V4u5fVVKgTViYquIx36Vry28Tmu8etOY=; b=hYXq013lNIhnhOWWa/Ap9m+MMroH5LEtKZ8YRKPlnI4vGhGX6zLi6MqELVqDssr1Ve pfmB3ppYLtgdZyIayXBD9t3p2PxnXzroQ0qpDbvzTo1vr10rEAun1pJBQV71OLH9Dpde ZCHBVNb67/erfuQTwSxu1gqD7tduJvazyK3qwyvQfpqeC0iL+AlsfZZ6i/EVSBtUrewq +zsEHMBgSpYrIoHwVmFAlKHw7lIWndP56pACxRH7YyCVDfBbT9tjcJmMbYAkuYp84N88 45q+bD4xi9D8Nv1VZrEqpYJ3RQOHR6KOBQhCNMbUoN53damiSHQAKE/nxaXmtOevgNLQ w7bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ujVzrwkJ1/8V4u5fVVKgTViYquIx36Vry28Tmu8etOY=; b=dDcdakrNFyjtwojrNblJjTo1Ru435UnuzaWmoSrPLN8ACPV720H/AltrEGE8qPxCyT 3i1oxIlsmIRRpN4ZGauuhV1uqPyinBHfUBZy7KuMTxYAaIMgPEHFRSHW+x7Kz9kO0Xw+ dN1MK+O7ziUrDU1QEp88DI46I2fygg0BjHYyf3O0k9wCa2X7mn0ALpSnsf9EdDYJtUzH ssq0qEF00+SmxoL0KiPnKinyBkHBbvdNbutRoYqqcOOpm/T60WGGZu9y5QG302CifzDL pAcXBLPND9/WsD1GLY0E9qAqUDzvsiwtBZpOn9jKdFPuiMzp9F1jXOZOFHKVynBH8j4S 2FLg== X-Gm-Message-State: AOAM532EHzd2l/Lgqg+xbfr84A9GiVPgEPAW/paCwvm5gxYxv7guwN00 s0fGo/N4DYxKHYCSNXssHWjeK0ZnYfpcnA== X-Google-Smtp-Source: ABdhPJxX4FnuK+CnRlUUyZvqOfprfYz5wNOQP5rtUFLhWh/mh3OUGkTVTISCkflzx4t0qFrA2/8bAg== X-Received: by 2002:a63:4547:: with SMTP id u7mr4630693pgk.351.1618689065711; Sat, 17 Apr 2021 12:51:05 -0700 (PDT) Received: from garuda-lan (c-24-18-44-142.hsd1.wa.comcast.net. [24.18.44.142]) by smtp.gmail.com with ESMTPSA id l1sm8787226pgt.29.2021.04.17.12.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Apr 2021 12:51:04 -0700 (PDT) From: Chris Marusich To: Efraim Flashner Subject: Re: bug#47615: [PATCH 0/9] Add 32-bit powerpc support References: Date: Sat, 17 Apr 2021 12:51:01 -0700 In-Reply-To: (Efraim Flashner's message of "Tue, 6 Apr 2021 15:32:47 +0300") Message-ID: <8735vo1yhm.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=cmmarusich@gmail.com; helo=mail-pg1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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, 47615@debbugs.gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618689083; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ujVzrwkJ1/8V4u5fVVKgTViYquIx36Vry28Tmu8etOY=; b=OMSKfBj+WHen7eMBkMEx29sRg/JkGnqPnLD05gofpuSJa8HxLTfvASjqlchQ+MuAzvEil2 vW0ternjhAdhTxZBH8dfK9bVqMLixkI6teUoaDzeHxzbEi5Ao6v9MtsBFW8g59TylCL5LW lW0AS0RanUAUHXl66zy4mi/LXVFQazXjsro0UWUzK3mRUVjEEJci+Ek5dHOCwSzTma0kHI jK3pECSdKluSzl2Yf9bhyhhG/2eqIsUSjo/TODiM8ZwIRaVsairwDWt80mWSQ/EpLNl36Y waqgz20LA7Qytz80ZmDJY5lPXyCB+2XEe28xirXfpMGm0h95/iHGFXZEtfvViw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618689083; a=rsa-sha256; cv=none; b=i9RlDrAv0Z3ln9XSYlhGdv2YbKBt5X/SYj7MdP1cQnwxFSvpxzzwvtzewvyvDIMrIzyMAJ tFRNyNPmkbqyL0LyxMNcBAKhg6H53QZWwn2Scd+/i71w03SVeog03VrvbXM4dgvyqzzimK uOH/jHiQXo9Z7lfNlim3UOc5PqP08k5gEJmyCjllaVl2VZzo5/xvwgo2Dv2TYvdJKceB4K h/romxbDpY5bPNTZm12rmKeHH1ZZOpOf6QFKBNGuB5Xwrtmj1bNxMTreYrHtQyF0pOk07P xGOY4yM0oglC5lsvBHptyM1SVEiLRLO4F2ne1QpG+lS7FcPuDtoUbmpBNzIyww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=hYXq013l; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Spam-Score: -0.94 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=hYXq013l; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: B56FB19187 X-Spam-Score: -0.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: X2qWYKfwb5Li --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Efraim Flashner writes: > * gnu/packages/base.scm (binutils)[arguments]: Add phase on > powerpc-linux to adjust the test suite. > * gnu/packages/commencement.scm (binutils-boot0)[arguments]: Move custom > phases after inherited arguments. Add phase on powerpc-linux to adjust > the test suite. Nits: adjust the test suite to do what? The message would be clearer if it explained the purpose of the adjustment. You could also name the phases you added/moved, for extra clarity, if you want to. > diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm > index dbb7c619fe..b9fc0a6e29 100644 > --- a/gnu/packages/base.scm > +++ b/gnu/packages/base.scm > @@ -531,7 +531,16 @@ change. GNU make offers many powerful extensions ov= er the standard utility.") >=20=20 > ;; Make sure 'ar' and 'ranlib' produce archive= s in a > ;; deterministic fashion. > - "--enable-deterministic-archives"))) > + "--enable-deterministic-archives") > + ,@(if (string=3D? (%current-system) "powerpc-linux") > + `(#:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'disable-rust-libiberty-test > + (lambda _ > + (substitute* "libiberty/testsuite/Makefile.in" > + ((" check-rust-demangle ") "")) > + #t)))) > + '()))) What's the problem? Presumably the test fails; a comment here could clarify that. If it's a test failure, has the issue been reported upstream? > (synopsis "Binary utilities: bfd gas gprof ld") > (description > diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm > index 7c39a84008..f707a01d30 100644 > --- a/gnu/packages/commencement.scm > +++ b/gnu/packages/commencement.scm > @@ -2653,7 +2653,22 @@ exec " gcc "/bin/" program > #:modules ((guix build gnu-build-system) > (guix build utils) > (ice-9 ftw)) ; for 'scandir' > + > + ;; #:phases gets modified for powerpc-linux in binutils, > + ;; so #:phases here needs to be after the inherited one. > + ,@(substitute-keyword-arguments (package-arguments binutils) > + ((#:configure-flags cf) > + `(cons ,(string-append "--target=3D" (boot-triplet)) > + ,cf))) > + > #:phases (modify-phases %standard-phases > + ,@(if (string=3D? (%current-system) "powerpc-linux") > + '((add-after 'unpack 'disable-rust-libiberty-test > + (lambda _ > + (substitute* "libiberty/testsuite/Makefile.i= n" > + ((" check-rust-demangle ") "")) > + #t))) > + '()) > (add-after 'install 'add-symlinks > (lambda* (#:key outputs #:allow-other-keys) > ;; The cross-gcc invokes 'as', 'ld', etc, without = the > @@ -2667,12 +2682,8 @@ exec " gcc "/bin/" program > (with-directory-excursion (string-append out "/b= in") > (for-each (lambda (name) > (symlink name (remove-triplet-pref= ix name))) > - (scandir "." has-triplet-prefix?))))= ))) > + (scandir "." has-triplet-prefix?))))= ))))) >=20=20 > - ,@(substitute-keyword-arguments (package-arguments binutils) > - ((#:configure-flags cf) > - `(cons ,(string-append "--target=3D" (boot-triplet)) > - ,cf))))) > (inputs (%boot0-inputs)))) >=20=20 > (define libstdc++-boot0 I think you can put all of this in the substitute-keyword-arguments form, which would (1) eliminate the need for a comment, (2) eliminate the need to worry about the order of the keyword arguments, and (3) eliminate the need to duplicate the new phase in two package definitions: (define binutils-boot0 (package (inherit binutils) (source (bootstrap-origin (package-source binutils))) (name "binutils-cross-boot0") (arguments `(#:guile ,%bootstrap-guile #:implicit-inputs? #f #:modules ((guix build gnu-build-system) (guix build utils) (ice-9 ftw)) ; for 'scandir' ,@(substitute-keyword-arguments (package-arguments binutils) ((#:configure-flags cf) `(cons ,(string-append "--target=3D" (boot-triplet)) ,cf)) ;; The presence of '%standard-phases as the default value here is ;; important. It ensures that even when (package-argument ;; binutils) does not already contain the #:phases keyword ;; argument, the substitution will occur. If you omit a default ;; value and (package-arguments binutils) does not contain the ;; #:phases keyword argument (e.g., on an x86_64-linux system), ;; then the substitution will not occur, and no phases at all wi= ll ;; be added. ((#:phases phases '%standard-phases) `(modify-phases ,phases ,@(if (string=3D? (%current-system) "powerpc-linux") '((add-after 'unpack 'disable-rust-libiberty-test (lambda _ (substitute* "libiberty/testsuite/Makefile.in" ((" check-rust-demangle ") "")) #t))) '()) (add-after 'install 'add-symlinks (lambda* (#:key outputs #:allow-other-keys) ;; The cross-gcc invokes 'as', 'ld', etc, without the ;; triplet prefix, so add symlinks. (let ((out (assoc-ref outputs "out")) (triplet-prefix (string-append ,(boot-triplet) "-"= ))) (define (has-triplet-prefix? name) (string-prefix? triplet-prefix name)) (define (remove-triplet-prefix name) (substring name (string-length triplet-prefix))) (with-directory-excursion (string-append out "/bin") (for-each (lambda (name) (symlink name (remove-triplet-prefix name))) (scandir "." has-triplet-prefix?))))))))))) (inputs (%boot0-inputs)))) I played with this in the REPL, and it seems to produce the desired result (e.g., inspect by running ,pp (package-arguments binutils-boot0) or similar at the REPL). However, I didn't actually try building anything with it. What do you think? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmB7PCUVHGNtbWFydXNp Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadzd8QAMTP+xnDz8TkkR2c/inoWE+SpqOI VKV+Ox8TMlLaxqe53M5eHiiS78/Po3on/R9EMGW5PiMCwElDJ4K4sEXK89sGVp2P wmdNNk6Em31vbPhjxX5m2aXx9HkxXavQ75mjoJXDvauHLGn+1trUrK+sXXZa/W2Q dW+TptVwBsFUnss+PE/vafnXQm9Y3RA5YT1hrQ7qvr7VyRREcI1qtIomnHsgs0LO BRYQWevv+UPR9PAZXm30VkmSbLfBswlHWjVDiAMS22wXb2ut3BYuEpw5kGnvd9bI GypZ/6qrCAe6xXUcm8c2AVHgIHJcnm89Yym/2Gq4m2EcU1vLwk68XsjqHIN4ZlHy jdmUjNqUJ6lEy9r3siTBqL7rHYqimIKcYn8Dif5BDwqCfS4aXH2nQK8iNiqKKcpS lhfx0Dw3OKqHDE8w55S1TxEHGyKyfp4Yxmgu+yZDILMUqKHztoPsxzEOq3Ay8EF3 m4P0uOIEkeN3U/i6DQnnUsb2q1lr454PNoECc/Mf1o78EUJQA6eDB0Mf1TZMsNVW lmsRnkQFfV5r6dqifT4YUQztEC2JGyHJoqVqnwXEHUDgIDLS4xXVWiq43RZTDfTi CxU7EZ1G5DS3qITASCWN8/+pxhn4NPT9cvPEBx3YchJife8ndSOr+2Ks6eGKZo37 z+lspupMIoyewouS =b8AE -----END PGP SIGNATURE----- --=-=-=--