All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>,
	Romain Naour <romain.naour@gmail.com>,
	buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 1/1] package/mesa3d: set cpp_rtti option
Date: Tue, 26 Jul 2022 18:28:18 +0200	[thread overview]
Message-ID: <20220726162818.GM3168@scaer> (raw)
In-Reply-To: <CADvTj4oJCWJ2Pq4US_QAo34sSi_w6LZqt-t=w_v78VvviVfRfg@mail.gmail.com>

James, All,

On 2022-07-26 09:31 -0600, James Hilliard spake thusly:
> On Tue, Jul 26, 2022 at 2:47 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > On 2022-07-26 00:34 -0600, James Hilliard spake thusly:
> > > This needs to be set based on BR2_PACKAGE_LLVM_RTTI being set.
> > BR2_PACKAGE_LLVM_RTTI is a sub-option of llvm, so it somehow means
> > that llvm should be a dependency of mesa3d, which your patch does not
> > add.
> It's an optional dependency.

I know. But how does it make sense to add BR2_PACKAGE_LLVM_RTTI without
a dependency on llvm?

And note that mesa3d does not use the fact that llvm is enabled, to
enable its llvm support; one has to explicitly request it with
BR2_PACKAGE_MESA3D_LLVM.

> > But we already have a conditional dependency on llvm, so this nex rtti
> > option should be a sub-condition of BR2_PACKAGE_MESA3D_LLVM?
> Setting -Dcpp_rtti=false when llvm isn't used is harmless, it seemed clearer
> to just have the single independent conditional for BR2_PACKAGE_LLVM_RTTI.

If you have a configuration with:

    BR2_PACKAGE_LLVM=y
    BR2_PACKAGE_LLVM_RTTI=y
    BR2_PACKAGE_MESA3D=y
    # BR2_PACKAGE_MESA3D_LLVM is unset

Then llvm support is not built in mesa3d, yet your code would cause us
to pass -Dcpp_rtti=true, which does not seem to make sense.

So, I think we want that to move to the existing condition, like so:

    diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
    index 96520e2efd..980faced31 100644
    --- a/package/mesa3d/mesa3d.mk
    +++ b/package/mesa3d/mesa3d.mk
    @@ -48,6 +48,11 @@ ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
     MESA3D_DEPENDENCIES += host-llvm llvm
     MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'
     MESA3D_CONF_OPTS += -Dllvm=enabled
    +ifeq ($(BR2_PACKAGE_LLVM_RTTI),y)
    +MESA3D_CONF_OPTS += -Dcpp_rtti=true
    +else
    +MESA3D_CONF_OPTS += -Dcpp_rtti=false
    +endif
     else
     # Avoid automatic search of llvm-config
     MESA3D_CONF_OPTS += -Dllvm=disabled

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-07-26 16:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  6:34 [Buildroot] [PATCH 1/1] package/mesa3d: set cpp_rtti option James Hilliard
2022-07-26  8:47 ` Yann E. MORIN
2022-07-26 15:31   ` James Hilliard
2022-07-26 16:28     ` Yann E. MORIN [this message]
2022-07-26 17:18       ` James Hilliard
2022-09-14 23:04         ` James Hilliard

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=20220726162818.GM3168@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=bernd.kuhls@t-online.de \
    --cc=buildroot@buildroot.org \
    --cc=james.hilliard1@gmail.com \
    --cc=romain.naour@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.