diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2022-05-27 18:28:44 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2022-05-28 22:02:36 +0300 |
commit | 39227724e8edccc8aa6e62be8920bf3c0c4579b0 (patch) | |
tree | 2aa879933e11d5a0d1e44e230f93a0a4ced88921 | |
parent | 4a53069b382f2b489ad197ede4d2c4cd2c7c8c16 (diff) | |
download | guix-39227724e8edccc8aa6e62be8920bf3c0c4579b0.tar.gz |
gnu: mesa: Build with llvm on armhf-linux.
* gnu/packages/gl.scm (mesa)[inputs]: Add llvm for all architectures. [native-inputs]: Add glslang for all architectures. [arguments]: Adjust configure-flags to give armhf-linux its own gallium-drivers and enable llvm support. Rewrite portions that no longer depend on specific architectures to enable flags. Adjust custom 'disable-failing-test phase to skip a test on armhf-linux.
-rw-r--r-- | gnu/packages/gl.scm | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index f4313b4151..d3ee7aed93 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -294,25 +294,15 @@ also known as DXTn or DXTC) for Mesa.") ("libxml2" ,libxml2) ("libxrandr" ,libxrandr) ("libxvmc" ,libxvmc) - ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" - "powerpc-linux" "riscv64-linux") - ;; Note: update the 'clang' input of mesa-opencl when bumping this. - `(("llvm" ,llvm-11))) - (_ - `())) + ;; Note: update the 'clang' input of mesa-opencl when bumping this. + ("llvm" ,llvm-11) ("wayland" ,wayland) ("wayland-protocols" ,wayland-protocols))) (native-inputs `(("bison" ,bison) ("flex" ,flex) ("gettext" ,gettext-minimal) - ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" - "powerpc-linux" "riscv64-linux") - `(("glslang" ,glslang))) - (_ - `())) + ("glslang" ,glslang) ("pkg-config" ,pkg-config) ("python" ,python-wrapper) ("python-libxml2", python-libxml2) ;for OpenGL ES 1.1 and 2.0 support @@ -322,9 +312,12 @@ also known as DXTn or DXTC) for Mesa.") (arguments `(#:configure-flags '(,@(match (%current-system) - ((or "armhf-linux" "aarch64-linux") + ("aarch64-linux" ;; TODO: Fix svga driver for non-Intel architectures. '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl")) + ("armhf-linux" + ;; Freedreno FTBFS when built on a 64-bit machine. + '("-Dgallium-drivers=etnaviv,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl")) ((or "powerpc64le-linux" "powerpc-linux" "riscv64-linux") '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl")) (_ @@ -356,13 +349,8 @@ also known as DXTn or DXTC) for Mesa.") (_ '("-Dvulkan-drivers=auto"))) - ;; Enable the Vulkan overlay layer on architectures using llvm. - ,@(match (%current-system) - ((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux" - "powerpc-linux" "riscv64-linux") - '("-Dvulkan-layers=device-select,overlay")) - (_ - '())) + ;; Enable the Vulkan overlay layer on all architectures. + "-Dvulkan-layers=device-select,overlay" ;; Also enable the tests. "-Dbuild-tests=true" @@ -371,13 +359,11 @@ also known as DXTn or DXTC) for Mesa.") ;; from the default dri drivers ,@(match (%current-system) ((or "x86_64-linux" "i686-linux") - '("-Ddri-drivers=i915,i965,nouveau,r200,r100" - "-Dllvm=enabled")) ; default is x86/x86_64 only - ((or "powerpc64le-linux" "aarch64-linux" "powerpc-linux" "riscv64-linux") - '("-Ddri-drivers=nouveau,r200,r100" - "-Dllvm=enabled")) + '("-Ddri-drivers=i915,i965,nouveau,r200,r100")) (_ - '("-Ddri-drivers=nouveau,r200,r100")))) + '("-Ddri-drivers=nouveau,r200,r100"))) + + "-Dllvm=enabled") ; default is x86/x86_64 only ;; XXX: 'debugoptimized' causes LTO link failures on some drivers. The ;; documentation recommends using 'release' for performance anyway. @@ -435,6 +421,10 @@ also known as DXTn or DXTC) for Mesa.") ;; The simplest way to skip it is to run a different test instead. `((substitute* "src/freedreno/ir3/meson.build" (("disasm\\.c'") "delay.c',\n link_args: ld_args_build_id")))) + ("armhf-linux" + ;; Disable some of the llvmpipe tests. + `((substitute* "src/gallium/drivers/llvmpipe/meson.build" + (("'lp_test_arit', ") "")))) (_ '((display "No tests to disable on this architecture.\n")))))) (add-before 'configure 'fix-dlopen-libnames |