From patchwork Thu Apr 22 07:59:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 28744 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 C9B0027BC7D; Thu, 22 Apr 2021 09:04:25 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 25F7327BC7C for ; Thu, 22 Apr 2021 09:04:25 +0100 (BST) Received: from localhost ([::1]:52598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZUK0-0004bD-Bl for patchwork@mira.cbaines.net; Thu, 22 Apr 2021 04:04:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZUJf-0004Ys-Mo for guix-patches@gnu.org; Thu, 22 Apr 2021 04:04:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZUJf-0008IU-6z for guix-patches@gnu.org; Thu, 22 Apr 2021 04:04:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZUJe-0008N2-Ic for guix-patches@gnu.org; Thu, 22 Apr 2021 04:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47615] [PATCH v2 05/12] gnu: mesa: Add support for powerpc-linux. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Apr 2021 08:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47615 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47615@debbugs.gnu.org, guix-devel@gnu.org Cc: Efraim Flashner Received: via spool by 47615-submit@debbugs.gnu.org id=B47615.161907858532096 (code B ref 47615); Thu, 22 Apr 2021 08:04:02 +0000 Received: (at 47615) by debbugs.gnu.org; 22 Apr 2021 08:03:05 +0000 Received: from localhost ([127.0.0.1]:60660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZUIj-0008Lc-CQ for submit@debbugs.gnu.org; Thu, 22 Apr 2021 04:03:05 -0400 Received: from flashner.co.il ([178.62.234.194]:43508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZUIh-0008L1-GS for 47615@debbugs.gnu.org; Thu, 22 Apr 2021 04:03:04 -0400 Received: from localhost (unknown [31.210.177.125]) by flashner.co.il (Postfix) with ESMTPSA id AA3E1403A4; Thu, 22 Apr 2021 08:02:57 +0000 (UTC) From: Efraim Flashner Date: Thu, 22 Apr 2021 10:59:18 +0300 Message-Id: <938df4b3ea20c9624ad83129d372812a1b003a87.1619076704.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 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/gl.scm (mesa)[inputs]: Add llvm, glslang for powerpc. [arguments]: Customize the configure flags for powerpc. Add powerpc specific phase to skip failing tests. --- gnu/packages/gl.scm | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) Blanket skipping of the test suite removed, instead we have a phase to skip certain tests. When rebased on core-updates there will be 3 such phases and adjustments to the packaging already for powerpc64le and aarch64. I'll make adjustments to that when I rebase next. diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index c194d269f8..ec76029cf9 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -271,7 +271,7 @@ also known as DXTn or DXTC) for Mesa.") ("libxrandr" ,libxrandr) ("libxvmc" ,libxvmc) ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux") + ((or "x86_64-linux" "i686-linux" "powerpc-linux") ;; Note: update the 'clang' input of mesa-opencl when bumping this. `(("llvm" ,llvm-11))) (_ @@ -283,7 +283,7 @@ also known as DXTn or DXTC) for Mesa.") ("flex" ,flex) ("gettext" ,gettext-minimal) ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux") + ((or "x86_64-linux" "i686-linux" "powerpc-linux") `(("glslang" ,glslang))) (_ `())) @@ -298,6 +298,8 @@ also known as DXTn or DXTC) for Mesa.") ((or "armhf-linux" "aarch64-linux") ;; TODO: Fix svga driver for aarch64 and armhf. '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl")) + ("powerpc-linux" + '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl")) (_ '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl"))) ;; Enable various optional features. TODO: opencl requires libclc, @@ -318,12 +320,14 @@ also known as DXTn or DXTC) for Mesa.") ,@(match (%current-system) ((or "i686-linux" "x86_64-linux") '("-Dvulkan-drivers=intel,amd")) + ("powerpc-linux" ; No default on this platform. + '("-Dvulkan-drivers=amd")) (_ '("-Dvulkan-drivers=auto"))) ;; Enable the Vulkan overlay layer on i686-linux and x86-64-linux. ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux") + ((or "x86_64-linux" "i686-linux" "powerpc-linux") '("-Dvulkan-overlay-layer=true")) (_ '())) @@ -337,6 +341,9 @@ also known as DXTn or DXTC) for Mesa.") ((or "x86_64-linux" "i686-linux") '("-Ddri-drivers=i915,i965,nouveau,r200,r100" "-Dllvm=enabled")) ; default is x86/x86_64 only + ("powerpc-linux" + '("-Ddri-drivers=nouveau,r200,r100" + "-Dllvm=enabled")) (_ '("-Ddri-drivers=nouveau,r200,r100")))) @@ -350,6 +357,24 @@ also known as DXTn or DXTC) for Mesa.") (guix build meson-build-system)) #:phases (modify-phases %standard-phases + ,@(if (string-prefix? "powerpc-" (or (%current-target-system) + (%current-system))) + ;; There are some tests which fail specifically on powerpc. + `((add-after 'unpack 'disable-failing-test + (lambda _ + (substitute* '(;; LLVM ERROR: Relocation type not implemented yet! + "src/gallium/drivers/llvmpipe/meson.build" + ;; This is probably a big-endian test failure. + "src/gallium/targets/osmesa/meson.build") + (("if with_tests") "if not with_tests")) + (substitute* "src/util/tests/format/meson.build" + ;; This is definately an endian-ness test failure. + (("'u_format_test', ") "")) + ;; It is only this portion of the test which fails. + (substitute* "src/mesa/main/tests/meson.build" + ((".*mesa_formats.*") "")) + #t))) + '()) ,@(if (string-prefix? "i686" (or (%current-target-system) (%current-system))) ;; Disable new test from Mesa 19 that fails on i686. Upstream @@ -390,7 +415,7 @@ also known as DXTn or DXTC) for Mesa.") (let ((out (assoc-ref outputs "out")) (bin (assoc-ref outputs "bin"))) ,@(match (%current-system) - ((or "i686-linux" "x86_64-linux") + ((or "i686-linux" "x86_64-linux" "powerpc-linux") ;; Install the Vulkan overlay control script to a separate ;; output to prevent a reference on Python, saving ~70 MiB ;; on the closure size.