From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qBcqAsgtgWCHswAAgWs5BA (envelope-from ) for ; Thu, 22 Apr 2021 10:03:20 +0200 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 WP94OcctgWAkcQAAB5/wlQ (envelope-from ) for ; Thu, 22 Apr 2021 08:03:19 +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 B477D9AF3 for ; Thu, 22 Apr 2021 10:03:19 +0200 (CEST) Received: from localhost ([::1]:51142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZUIw-0003uZ-Uh for larch@yhetil.org; Thu, 22 Apr 2021 04:03:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZUIe-0003uM-Hd for guix-devel@gnu.org; Thu, 22 Apr 2021 04:03:00 -0400 Received: from flashner.co.il ([178.62.234.194]:40252) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZUIc-0007eU-NS for guix-devel@gnu.org; Thu, 22 Apr 2021 04:03:00 -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 To: 47615@debbugs.gnu.org, guix-devel@gnu.org Subject: [PATCH v2 05/12] gnu: mesa: Add support for powerpc-linux. 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 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il 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_PASS=-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: , 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=1619078599; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=HrohhW2gQNasn+gdu+GtVMYi9d0F5KkPct+o8CTmxH4=; b=gu+GQ2XYzpuOjUAGLWFzpwge91H1A02rROK6ijOebD5MV8o+4BfZRqwrE3PPvcsLmDWJ3w SxXpH6yKcB0/KUesjlvLuIWo3k5wNerDdPMXwU+pXK14GwR+a4mf4GWExVOBhXLqptlRl8 tu9AqKaUWYCejtOhy2HS+qVAIjgluzWS/s8m8wSjVZ7pQiZt/l1fjlWhWgJ574yVDhrGRL bPU5ugfyEh0VcZ32Q6Hp9RSKVGUgSAIMhwCJ1l6ES/acFCS9SMH57vF83wo8CzWYeSb5s/ FRumwUx/jxzyvg3in/M+avvKUJApQ/0SD57DjAnX8y0141eI9h9wnSCiyOzbFA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619078599; a=rsa-sha256; cv=none; b=eVXjVsmPH5S7LHn51Q+u8+Nx2D5PzkDINEikWgFo9PKa69WpB/S6zHtsloDCRlXGgerU09 hIbKaTx19JZmHXvfNpFXCiIH/1R7LnXcRR6SNhv5eap41hM2XR0F60+fsFbp2AiyZOvcqU x+2DAxgXAhTp/bwCtl5jgraF4Q0I+PLjuIOHxD9cw6KDb7ki/SZqlljS1gd2zjgqiVngHR fss8x/e+dvklgFkMfFTru2xuUKN5vMiUFcmCCa3TJBcczrbgXUEjuEl1Bm1bo71UbuSGqf 4gbLxsbp1Rms4VGEUNb5WhsGZqhw0ZCSqCvq+d25vH6fHFNo8FSdm3eQBn2uZg== ARC-Authentication-Results: i=1; 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-Spam-Score: 2.56 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: B477D9AF3 X-Spam-Score: 2.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: NtJsmld4qkGV * 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. -- 2.31.1