[Buildroot] [RFCv1 4/4] core: implement per-package SDK and target

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Nov 25 20:01:52 UTC 2017


Hello,

On Sat, 25 Nov 2017 18:30:26 +0100, Arnout Vandecappelle wrote:

> > Here is how I'm thinking of solving the problem:
> > 
> >  - Next to <pkg>_PATCH_DEPENDENCIES, introduce the concept of
> >    <pkg>_EXTRACT_DEPENDENCIES.  
> 
>  _PATCH_DEPENDENCIES is different: it introduces a dependency between foo-patch
> and bar-patch. Here you want a dependency between foo-extract and tar.

True.

>  So this bit doesn't make sense: _PATCH_DEPENDENCIES are not (necessarily) built
> before foo-patch. So to be reproducible, it should *not* be rsynced yet.
> 
> > 
> > Thoughts?  
> 
>  I'm not at all happy with this approach. It adds generic-package stuff that is
> used for only one package, and it spreads the logic out over different places.
> 
>  I'd rather make the logic explicit in dependencies.mk. Something like
> 
> ifneq ($(filter host-tar,$(DEPENDENCIES_HOST_PREREQ)),)
> $(filter-out host-tar,$(DEPENDENCIES_HOST_PREREQ)): host-tar
> endif
> 
> ifneq ($(filter host-ccache,$(DEPENDENCIES_HOST_PREREQ)),)
> $(filter-out host-tar host-ccache,$(DEPENDENCIES_HOST_PREREQ)): host-ccache
> endif

I don't understand how this can work.

The big thing to remember is that when I'm building a package, it only
sees in its per-package host/staging directory the dependencies
explicitly listed in this package <pkg>_DEPENDENCIES variable.

With your approach, neither host-tar nor host-ccache are listed in any
package <pkg>_DEPENDENCIES variable, so the per-package host directory
of host-ccache and host-tar will never be rsync'ed into the per-package
host directories of other packages.

Due to this, the package infrastructure _will_ have to know about the
fact that all packages depend on host-tar/host-ccache, for the simple
reason that we need to know that we have to rsync host-tar/host-ccache
when populating the per-package host directory in the configure step.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the buildroot mailing list