Re: [oe-core][PATCHv2] default-providers.inc: add PREFERRED_PROVIDER variables for llvm

2023-11-28 Thread Markus Volk

Thanks. I have sent a v3

On Mon, Nov 27 2023 at 10:35:37 PM +00:00:00, Peter Kjellerstedt 
 wrote:

 -Original Message-
 From: openembedded-core@lists.openembedded.org 
 
> On Behalf Of 
Markus Volk

 Sent: den 27 november 2023 11:25
 To: openembedded-core@lists.openembedded.org 

 Subject: [oe-core][PATCHv2] default-providers.inc: add 
PREFERRED_PROVIDER variables for llvm


 gallium-llvm needs to be built with clang if you, for example
 want to have support for opencl or want to build the intel-clc 
compiler.

 meta-clang recommends to set

 PREFERRED_PROVIDER_llvm = "clang"
 PREFERRED_PROVIDER_llvm-native = "clang-native"

 The current problem is that this is not taken into account in mesa 
and therefore
 both llvm and clang are included. This leads to files that are 
provided by both

 packages and would also unnecessarily increase the build time.

 Add PREFERRED_PROVIDER_llvm and PREFERRED_PROVIDER_llvm-native and 
make

 sure that the mesa recipe takes these variables into account.

 Signed-off-by: Markus Volk >

 ---
  meta/conf/distro/include/default-providers.inc | 2 ++
  meta/recipes-graphics/mesa/mesa.inc| 2 +-
  2 files changed, 3 insertions(+), 1 deletion(-)

 diff --git a/meta/conf/distro/include/default-providers.inc 
b/meta/conf/distro/include/default-providers.inc

 index d18173c744..819d71628b 100644
 --- a/meta/conf/distro/include/default-providers.inc
 +++ b/meta/conf/distro/include/default-providers.inc
 @@ -37,6 +37,8 @@ PREFERRED_PROVIDER_dbus-glib ?= "dbus-glib"
  PREFERRED_PROVIDER_dbus-glib-native ?= "dbus-glib-native"
  PREFERRED_PROVIDER_gdk-pixbuf ?= "gdk-pixbuf"
  PREFERRED_PROVIDER_libgcc ?= "libgcc"
 +PREFERRED_PROVIDER_llvm ?= "llvm"
 +PREFERRED_PROVIDER_llvm-native ?= "llvm-native"


Don't insert them between PREFERRED_PROVIDER_libgcc and
PREFERRED_PROVIDER_nativesdk-libgcc. They belong together.


  PREFERRED_PROVIDER_nativesdk-libgcc ?= "nativesdk-libgcc"
  PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers"
  PREFERRED_PROVIDER_nativesdk-linux-libc-headers ?= 
"nativesdk-linux-libc-headers"
 diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc

 index e5c405a972..1a971242c9 100644
 --- a/meta/recipes-graphics/mesa/mesa.inc
 +++ b/meta/recipes-graphics/mesa/mesa.inc
 @@ -183,7 +183,7 @@ GALLIUMDRIVERS:append = 
"${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600',
  GALLIUMDRIVERS:append = "${@bb.utils.contains 
('PACKAGECONFIG', 'virgl', ',virgl', 
'', d)}"


  PACKAGECONFIG[gallium] = 
"-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, 
-Dgallium-drivers='', libdrm"
 -PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled 
-Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
 +PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled 
-Dshared-llvm=enabled, -Dllvm=disabled, ${PREFERRED_PROVIDER_llvm} 
${PREFERRED_PROVIDER_llvm-native} elfutils"


This should not be needed. When PREFERRED_PROVIDER_llvm and
PREFERRED_PROVIDER_llvm-native are set, bitbake should automatically
take care of depending on the correct recipes.


  PACKAGECONFIG[xa]  = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
  PACKAGECONFIG[va] = 
"-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
  PACKAGECONFIG[vdpau] = 
"-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"

 --
 2.42.1


//Peter




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191392): 
https://lists.openembedded.org/g/openembedded-core/message/191392
Mute This Topic: https://lists.openembedded.org/mt/102826427/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCHv2] default-providers.inc: add PREFERRED_PROVIDER variables for llvm

2023-11-27 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core@lists.openembedded.org 
>  On Behalf Of Markus Volk
> Sent: den 27 november 2023 11:25
> To: openembedded-core@lists.openembedded.org
> Subject: [oe-core][PATCHv2] default-providers.inc: add PREFERRED_PROVIDER 
> variables for llvm
> 
> gallium-llvm needs to be built with clang if you, for example
> want to have support for opencl or want to build the intel-clc compiler.
> meta-clang recommends to set
> 
> PREFERRED_PROVIDER_llvm = "clang"
> PREFERRED_PROVIDER_llvm-native = "clang-native"
> 
> The current problem is that this is not taken into account in mesa and 
> therefore
> both llvm and clang are included. This leads to files that are provided by 
> both
> packages and would also unnecessarily increase the build time.
> 
> Add PREFERRED_PROVIDER_llvm and PREFERRED_PROVIDER_llvm-native and make
> sure that the mesa recipe takes these variables into account.
> 
> Signed-off-by: Markus Volk 
> ---
>  meta/conf/distro/include/default-providers.inc | 2 ++
>  meta/recipes-graphics/mesa/mesa.inc| 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/conf/distro/include/default-providers.inc 
> b/meta/conf/distro/include/default-providers.inc
> index d18173c744..819d71628b 100644
> --- a/meta/conf/distro/include/default-providers.inc
> +++ b/meta/conf/distro/include/default-providers.inc
> @@ -37,6 +37,8 @@ PREFERRED_PROVIDER_dbus-glib ?= "dbus-glib"
>  PREFERRED_PROVIDER_dbus-glib-native ?= "dbus-glib-native"
>  PREFERRED_PROVIDER_gdk-pixbuf ?= "gdk-pixbuf"
>  PREFERRED_PROVIDER_libgcc ?= "libgcc"
> +PREFERRED_PROVIDER_llvm ?= "llvm"
> +PREFERRED_PROVIDER_llvm-native ?= "llvm-native"

Don't insert them between PREFERRED_PROVIDER_libgcc and 
PREFERRED_PROVIDER_nativesdk-libgcc. They belong together.

>  PREFERRED_PROVIDER_nativesdk-libgcc ?= "nativesdk-libgcc"
>  PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers"
>  PREFERRED_PROVIDER_nativesdk-linux-libc-headers ?= 
> "nativesdk-linux-libc-headers"
> diff --git a/meta/recipes-graphics/mesa/mesa.inc 
> b/meta/recipes-graphics/mesa/mesa.inc
> index e5c405a972..1a971242c9 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -183,7 +183,7 @@ GALLIUMDRIVERS:append = 
> "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600',
>  GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', 
> ',virgl', '', d)}"
> 
>  PACKAGECONFIG[gallium] = 
> "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, 
> -Dgallium-drivers='', libdrm"
> -PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, 
> -Dllvm=disabled, llvm llvm-native elfutils"
> +PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, 
> -Dllvm=disabled, ${PREFERRED_PROVIDER_llvm} ${PREFERRED_PROVIDER_llvm-native} 
> elfutils"

This should not be needed. When PREFERRED_PROVIDER_llvm and 
PREFERRED_PROVIDER_llvm-native are set, bitbake should automatically 
take care of depending on the correct recipes.

>  PACKAGECONFIG[xa]  = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
>  PACKAGECONFIG[va] = 
> "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
>  PACKAGECONFIG[vdpau] = 
> "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
> --
> 2.42.1

//Peter


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191328): 
https://lists.openembedded.org/g/openembedded-core/message/191328
Mute This Topic: https://lists.openembedded.org/mt/102826427/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCHv2] default-providers.inc: add PREFERRED_PROVIDER variables for llvm

2023-11-27 Thread Markus Volk
On Mon, Nov 27 2023 at 08:44:01 PM +01:00:00, Alexandre Belloni 
 wrote:
Please always include a changelog here, especially when sending 
multiple

versions in rapid succession.


Technically there is nothing that needs to be included in the changelog.
Its just that I was just to dumb to understand what make -e does at 
first and v2 just was wrong, although it worked.

But I didn't want to highlight that ;)


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191325): 
https://lists.openembedded.org/g/openembedded-core/message/191325
Mute This Topic: https://lists.openembedded.org/mt/102826427/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCHv2] default-providers.inc: add PREFERRED_PROVIDER variables for llvm

2023-11-27 Thread Alexandre Belloni via lists.openembedded.org
On 27/11/2023 11:24:49+0100, Markus Volk wrote:
> gallium-llvm needs to be built with clang if you, for example
> want to have support for opencl or want to build the intel-clc compiler.
> meta-clang recommends to set
> 
> PREFERRED_PROVIDER_llvm = "clang"
> PREFERRED_PROVIDER_llvm-native = "clang-native"
> 
> The current problem is that this is not taken into account in mesa and 
> therefore
> both llvm and clang are included. This leads to files that are provided by 
> both
> packages and would also unnecessarily increase the build time.
> 
> Add PREFERRED_PROVIDER_llvm and PREFERRED_PROVIDER_llvm-native and make sure 
> that the mesa recipe takes these variables into account.
> 
> Signed-off-by: Markus Volk 
> ---

Please always include a changelog here, especially when sending multiple
versions in rapid succession.

>  meta/conf/distro/include/default-providers.inc | 2 ++
>  meta/recipes-graphics/mesa/mesa.inc| 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/conf/distro/include/default-providers.inc 
> b/meta/conf/distro/include/default-providers.inc
> index d18173c744..819d71628b 100644
> --- a/meta/conf/distro/include/default-providers.inc
> +++ b/meta/conf/distro/include/default-providers.inc
> @@ -37,6 +37,8 @@ PREFERRED_PROVIDER_dbus-glib ?= "dbus-glib"
>  PREFERRED_PROVIDER_dbus-glib-native ?= "dbus-glib-native"
>  PREFERRED_PROVIDER_gdk-pixbuf ?= "gdk-pixbuf"
>  PREFERRED_PROVIDER_libgcc ?= "libgcc"
> +PREFERRED_PROVIDER_llvm ?= "llvm"
> +PREFERRED_PROVIDER_llvm-native ?= "llvm-native"
>  PREFERRED_PROVIDER_nativesdk-libgcc ?= "nativesdk-libgcc"
>  PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers"
>  PREFERRED_PROVIDER_nativesdk-linux-libc-headers ?= 
> "nativesdk-linux-libc-headers"
> diff --git a/meta/recipes-graphics/mesa/mesa.inc 
> b/meta/recipes-graphics/mesa/mesa.inc
> index e5c405a972..1a971242c9 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -183,7 +183,7 @@ GALLIUMDRIVERS:append = 
> "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600',
>  GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', 
> ',virgl', '', d)}"
>  
>  PACKAGECONFIG[gallium] = 
> "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, 
> -Dgallium-drivers='', libdrm"
> -PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, 
> -Dllvm=disabled, llvm llvm-native elfutils"
> +PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, 
> -Dllvm=disabled, ${PREFERRED_PROVIDER_llvm} ${PREFERRED_PROVIDER_llvm-native} 
> elfutils"
>  PACKAGECONFIG[xa]  = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
>  PACKAGECONFIG[va] = 
> "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
>  PACKAGECONFIG[vdpau] = 
> "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
> -- 
> 2.42.1
> 

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191321): 
https://lists.openembedded.org/g/openembedded-core/message/191321
Mute This Topic: https://lists.openembedded.org/mt/102826427/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-