[oe] [PATCH] sane-toolchain-eglibc.inc: Set TARGET_OS = linux-gnuspe for e500

Phil Blundell philb at gnu.org
Sun Aug 30 20:27:23 UTC 2009


On Sun, 2009-08-30 at 11:08 -0700, Khem Raj wrote:
> On Sun, Aug 30, 2009 at 4:18 AM, Phil Blundell<philb at gnu.org> wrote:
> > Actually, I'm now beginning to think that this approach is backwards and
> > it would be better to do things the other way around.  That is, stick
> > with TARGET_OS as the primary configuration variable that the user sets,
> > and infer everything else (including ${LIBC}) from the value that they
> > have chosen.  That seems like it would avoid a lot of these issues with
> > bits of OE second-guessing the user and it would also help to prevent a
> > further proliferation of poorly-documented configuration variables.
> 
> hmm yes and these function could be turned into checking functions
> of some sort if needed. So user can get notified for what sins he has
> done by selecting a particular TARGET_OS :)

That kind of thing, yes.

> where do you think it should be defined then ?
> it definitely needs to know about machine so machine conf seems
> to be correct and distros are not per arch bases so defining it in
> distros would not work the way it does now.

If "it" means TARGET_OS then I think it probably should be defined by
DISTRO.conf just as it is now.  DISTROs do need to have some
architecture knowledge (and, in fact, I would guess that the vast
majority of currently-defined DISTROs are single-architecture-only) so
this doesn't seem like it should be a problem.

> I do not like guessing work too but somehow it should not be
> too much of a pain for a user to set it too.
>
> not many users would know so many details about machine libraries
> and ABIs and how they impact the target triplets. More than
> often they will get it wrong.

All that the end user needs to do is set MACHINE and DISTRO and he
should be in business; the distro will figure everything else out.

Worrying about target triplets is the job of the distro maintainer, and
they ought to know what they're doing for at least the set of
architectures that they care about.

> Saying that user defines MACHINE and LIBC one wants in his DISTRO
> and computing  TARGET_TRIPLET from this does not sound a bad idea to me.
> may be we can change TARGET_OS to not indicate the last part of target triplet
> instead it is something like say 'linux' 'freebsd' or 'none'  and then
> we can concatenate them
> as we are doing to form the real target triplet.
> 
> I think this would enhance the user experience of OE.

I'm not sure that changing the meaning of TARGET_OS at this stage is a
good idea.  If you wanted to add a new include file that folks can use
to auto-compute a TARGET_OS value from a (LIBC, ABI) kind of tuple then
that wouldn't be an unreasonable thing to do.  I still feel that random
fluctuations of target abi as a result of changes to MACHINE are
probably a toxic idea and something best avoided, unless there is a
reliable method of interlocking them with PACKAGE_ARCH in some way.

p.





More information about the Openembedded-devel mailing list