From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/mesa3d: add dependency on elfutils to r600 with llvm
Date: Tue, 10 Apr 2018 23:33:36 +0200 [thread overview]
Message-ID: <20180410233336.6f7a0e07@windsurf> (raw)
In-Reply-To: <542b2d70-23ed-2d85-ba62-82c85118a7f3@smile.fr>
Hello,
On Tue, 10 Apr 2018 18:21:26 +0200, Valentin Korenblit wrote:
> > I don't understand why you have two mutually exclusive options here.
> > Why not instead have a sub-option ?
>
> I did this because once you have activated llvm support for Mesa, if
> you select Gallium R600 drivers, they will also need to be compiled
> with llvm support, which requires elfutils and AMDGPU backend as dependencies.
Aah, OK, I understand. This is really crappy (in Mesa3D).
> radeon_llvm_check() in configure.ac from Mesa adds these dependencies.
>
> Another possibility without creating a new option would be:
>
> config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
> bool "Gallium Radeon R600 driver"
> depends on BR2_i386 || BR2_x86_64
> depends on (!BR2_PACKAGE_MESA3D_LLVM || \
> (BR2_PACKAGE_MESA3D_LLVM && (BR2_TOOLCHAIN_USES_UCLIBC || \
> BR2_TOOLCHAIN_USES_GLIBC)) # elfutils
> select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
> 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_XA
> help
> Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs.
>
> comment "R600 driver needs a uClibc or glibc toolchain w/ llvm support"
> depends on BR2_PACKAGE_MESA3D_LLVM
>
> depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
This seems like the good solution to me.
Note that there is some work going on to make elfutils compatible with
musl: https://sourceware.org/bugzilla/show_bug.cgi?id=21002, but it
doesn't seem to be ready yet, so in the mean time what you propose
looks good to me.
I think the Config.in comment should be:
comment "R600 driver needs a uClibc or glibc toolchain when llvm is enabled"
I think the "w/ llvm support" that you proposed can be confusing: to me
it means "you need a toolchain with LLVM support". But it's not what's
happening. What's happening is: "if you have enabled LLVM support, then
your toolchain must be using glibc or uClibc".
In addition to the Config.in comment itself, a regular comment would be
good to explain what's going on, because it's really weird.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2018-04-10 21:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 15:19 [Buildroot] [PATCH] package/mesa3d: add dependency on elfutils to r600 with llvm Valentin Korenblit
2018-04-10 15:51 ` Thomas Petazzoni
2018-04-10 16:21 ` Valentin Korenblit
2018-04-10 21:33 ` Thomas Petazzoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180410233336.6f7a0e07@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox