From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libgles: postpone the check for a missing GLES provider
Date: Thu, 19 Dec 2013 21:43:21 +0100 [thread overview]
Message-ID: <20131219204321.GA14241@free.fr> (raw)
In-Reply-To: <52B325BE.1030307@mind.be>
Arnout, All,
On 2013-12-19 17:58 +0100, Arnout Vandecappelle spake thusly:
> On 17/12/13 23:35, Yann E. MORIN wrote:
> >Arnout, All,
> >
> >On 2013-12-17 23:20 +0100, Arnout Vandecappelle spake thusly:
> [snip]
> >> Here's a wild idea...
> >>
> >>In rpi-userland/Config.in:
> >>
> >>if BR2_PACKAGE_RPI_USERLAND
> >>config BR2_PACKAGE_LIBEGL_PROVIDER
> >> string
> >> default "rpi-userland"
> >>endif
> >>
> >>In opengl/libegl/libegl.mk:
> >>
> >>LIBEGL_DEPENDENCIES = $(call qstrip,$(BR2PACKAGE_LIBEGL_PROVIDER))
> >>
> >
> >That's about what I am experimenting right now! :-p
> >
> >But I've done it slightly differently:
> >
> >package/opengl/libegl/Config.in:
> > config BR2_LIBEGL_PROVIDER
> > string
> >
> >package/rpi-userland/Config.in:
> > config BR2_LIBEGL_PROVIDER
> > default "rpi-userland" if BR2_PACKAGE_RPI_USERLAND
> >
> >And the same .mk fragment you suggested for libegl.
>
> Nice! I'm all for it! I didn't know it was allowed in Kconfig to define the
> same symbol twice. But indeed, we already do that in arch/
In fact, you can define a symbol only once: the moment you give it a
type is when the symbol is actually 'defined'.
You can however use the symbol in different places, to set a default
value or other properties (depends, selecti, options...)
There are a few properties of a symbol that can only be set once:
- the type (obviously)
- the prompt, even if it is conditional
- the help text
> >My solution is a little bit more compact, and since it does not use a
> >package-named variable, we can say that packages do not step on
> >one-another's feet. Yet, a bit hackish, I have to concede...
> >
> >>
> >> It's still hackish of course, because:
> >>
> >>- rpi-userland/Config.in defines a symbol "belonging" to the libegl package;
> >>
> >>- only one provider can be defined, Kconfig will scream if it's defined
> >>twice;
> >
> >Is it even valid to have two providers of the same functioanlity? What
> >would happen: what libEGL.so would be used? Probably the last one
> >installed, ie. the one from the alphabetically-last provider.
>
> Completely true. With your construct, if somehow two providers are
> selected, Kconfig will probably just give you the first-sourced provider.
No, we can't know which one is used: the symbols are stored in buckets,
indexed by the hash of each symbol.
So, there is no (simple) way to know what symbols takes precedence, since
we can't easily predict what bucket they'll end up, so what symbol will
be hit first/last.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2013-12-19 20:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 15:18 [Buildroot] [BR2_EXTERNAL] Ability to specify regular packages behaviour from external.mk David Corvoysier
2013-12-10 19:07 ` [Buildroot] [PATH 0/1] Fix GLES when a provider is defined in BR2_EXTERNAL Yann E. MORIN
2013-12-10 19:07 ` [Buildroot] [PATCH] package/libgles: postpone the check for a missing GLES provider Yann E. MORIN
2013-12-11 10:46 ` Arnout Vandecappelle
2013-12-11 12:25 ` Yann E. MORIN
2013-12-11 13:03 ` David Corvoysier
2013-12-11 14:05 ` David Corvoysier
2013-12-12 22:00 ` Arnout Vandecappelle
2013-12-12 22:13 ` Thomas Petazzoni
2013-12-12 23:08 ` Arnout Vandecappelle
2013-12-17 6:11 ` Thomas Petazzoni
2013-12-17 7:58 ` Yann E. MORIN
2013-12-17 9:04 ` Thomas Petazzoni
2013-12-17 22:07 ` Yann E. MORIN
2013-12-17 22:20 ` Arnout Vandecappelle
2013-12-17 22:35 ` Yann E. MORIN
2013-12-19 16:58 ` Arnout Vandecappelle
2013-12-19 20:43 ` Yann E. MORIN [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=20131219204321.GA14241@free.fr \
--to=yann.morin.1998@free.fr \
--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