mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
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.
This commit is contained in:
parent
4a53069b38
commit
39227724e8
1 changed files with 17 additions and 27 deletions
|
@ -294,25 +294,15 @@ also known as DXTn or DXTC) for Mesa.")
|
||||||
("libxml2" ,libxml2)
|
("libxml2" ,libxml2)
|
||||||
("libxrandr" ,libxrandr)
|
("libxrandr" ,libxrandr)
|
||||||
("libxvmc" ,libxvmc)
|
("libxvmc" ,libxvmc)
|
||||||
,@(match (%current-system)
|
;; Note: update the 'clang' input of mesa-opencl when bumping this.
|
||||||
((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux"
|
("llvm" ,llvm-11)
|
||||||
"powerpc-linux" "riscv64-linux")
|
|
||||||
;; Note: update the 'clang' input of mesa-opencl when bumping this.
|
|
||||||
`(("llvm" ,llvm-11)))
|
|
||||||
(_
|
|
||||||
`()))
|
|
||||||
("wayland" ,wayland)
|
("wayland" ,wayland)
|
||||||
("wayland-protocols" ,wayland-protocols)))
|
("wayland-protocols" ,wayland-protocols)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("bison" ,bison)
|
`(("bison" ,bison)
|
||||||
("flex" ,flex)
|
("flex" ,flex)
|
||||||
("gettext" ,gettext-minimal)
|
("gettext" ,gettext-minimal)
|
||||||
,@(match (%current-system)
|
("glslang" ,glslang)
|
||||||
((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux"
|
|
||||||
"powerpc-linux" "riscv64-linux")
|
|
||||||
`(("glslang" ,glslang)))
|
|
||||||
(_
|
|
||||||
`()))
|
|
||||||
("pkg-config" ,pkg-config)
|
("pkg-config" ,pkg-config)
|
||||||
("python" ,python-wrapper)
|
("python" ,python-wrapper)
|
||||||
("python-libxml2", python-libxml2) ;for OpenGL ES 1.1 and 2.0 support
|
("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
|
(arguments
|
||||||
`(#:configure-flags
|
`(#:configure-flags
|
||||||
'(,@(match (%current-system)
|
'(,@(match (%current-system)
|
||||||
((or "armhf-linux" "aarch64-linux")
|
("aarch64-linux"
|
||||||
;; TODO: Fix svga driver for non-Intel architectures.
|
;; TODO: Fix svga driver for non-Intel architectures.
|
||||||
'("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
|
'("-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")
|
((or "powerpc64le-linux" "powerpc-linux" "riscv64-linux")
|
||||||
'("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
|
'("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
|
||||||
(_
|
(_
|
||||||
|
@ -356,13 +349,8 @@ also known as DXTn or DXTC) for Mesa.")
|
||||||
(_
|
(_
|
||||||
'("-Dvulkan-drivers=auto")))
|
'("-Dvulkan-drivers=auto")))
|
||||||
|
|
||||||
;; Enable the Vulkan overlay layer on architectures using llvm.
|
;; Enable the Vulkan overlay layer on all architectures.
|
||||||
,@(match (%current-system)
|
"-Dvulkan-layers=device-select,overlay"
|
||||||
((or "x86_64-linux" "i686-linux" "powerpc64le-linux" "aarch64-linux"
|
|
||||||
"powerpc-linux" "riscv64-linux")
|
|
||||||
'("-Dvulkan-layers=device-select,overlay"))
|
|
||||||
(_
|
|
||||||
'()))
|
|
||||||
|
|
||||||
;; Also enable the tests.
|
;; Also enable the tests.
|
||||||
"-Dbuild-tests=true"
|
"-Dbuild-tests=true"
|
||||||
|
@ -371,13 +359,11 @@ also known as DXTn or DXTC) for Mesa.")
|
||||||
;; from the default dri drivers
|
;; from the default dri drivers
|
||||||
,@(match (%current-system)
|
,@(match (%current-system)
|
||||||
((or "x86_64-linux" "i686-linux")
|
((or "x86_64-linux" "i686-linux")
|
||||||
'("-Ddri-drivers=i915,i965,nouveau,r200,r100"
|
'("-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=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
|
;; XXX: 'debugoptimized' causes LTO link failures on some drivers. The
|
||||||
;; documentation recommends using 'release' for performance anyway.
|
;; 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.
|
;; The simplest way to skip it is to run a different test instead.
|
||||||
`((substitute* "src/freedreno/ir3/meson.build"
|
`((substitute* "src/freedreno/ir3/meson.build"
|
||||||
(("disasm\\.c'") "delay.c',\n link_args: ld_args_build_id"))))
|
(("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"))))))
|
'((display "No tests to disable on this architecture.\n"))))))
|
||||||
(add-before 'configure 'fix-dlopen-libnames
|
(add-before 'configure 'fix-dlopen-libnames
|
||||||
|
|
Loading…
Reference in a new issue