]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
package/mesa3d: add missing elfutils dependency with R600 and RadeonSI driver
authorRomain Naour <romain.naour@gmail.com>
Sat, 28 Apr 2018 17:28:03 +0000 (19:28 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 1 May 2018 20:57:24 +0000 (22:57 +0200)
Commit "add dependency on elfutils for R600 with LLVM" [1] select
elfutils package at Kconfig level without adding it the make dependency.

Enabling r600 support lead to a build issue when building from
scratch with "make mesa3d".

Fixes:
checking for RADEON... yes
configure: error: r600 requires libelf when using llvm

elfutils dependency is needed by r600 with llvm support and radeonSI.

Fixes:
checking for RADEON... yes
checking for AMDGPU... yes
configure: error: radeonsi requires libelf when using llvm

Add a new BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS hidden Config.in boolean
selected by R600 and RadeonSI at Kconfig level.
When selected, BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS add elfutils dependency
at make level.

[1] 92fda8761aa8024be53a8edb8c102d1ba6401bce

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: MichaƂ Kalbarczyk <michal@gamecodehq.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mesa3d/Config.in
package/mesa3d/mesa3d.mk

index d620c0ab52479a38893fe6fb1bae32e671ac0db2..8c1877fbc1433eb10acbf897788c0ad0d404f743 100644 (file)
@@ -25,6 +25,10 @@ menuconfig BR2_PACKAGE_MESA3D
 
 if BR2_PACKAGE_MESA3D
 
+# Some Gallium driver needs libelf when built with LLVM support
+config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
+       bool
+
 config BR2_PACKAGE_MESA3D_LLVM
        bool "llvm support"
        depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
@@ -104,6 +108,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
        select BR2_PACKAGE_LIBDRM_RADEON
        select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_LLVM
        select BR2_PACKAGE_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
+       select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
        select BR2_PACKAGE_MESA3D_NEEDS_XA
        help
          Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs.
@@ -124,6 +129,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
        select BR2_PACKAGE_LIBDRM_RADEON
        select BR2_PACKAGE_LLVM_AMDGPU
        select BR2_PACKAGE_ELFUTILS
+       select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
        select BR2_PACKAGE_MESA3D_NEEDS_XA
        help
          Driver for ATI/AMD Radeon HD7000/HD8000/Rx200 GPUs.
index c882a229be5275c7dc3a35ef8041fb177c6032f7..fb9189741f73fe3881fe0d2dfb6fdf8a5e59270c 100644 (file)
@@ -43,6 +43,10 @@ else
 MESA3D_CONF_OPTS += --disable-llvm
 endif
 
+ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)
+MESA3D_DEPENDENCIES += elfutils
+endif
+
 # The Sourcery MIPS toolchain has a special (non-upstream) feature to
 # have "compact exception handling", which unfortunately breaks with
 # mesa3d, so we disable it here by passing -mno-compact-eh.