[Buildroot] [RFC] pkg-generic: add per-package staging directory

Fabio Porcedda fabio.porcedda at gmail.com
Mon Feb 2 09:20:34 UTC 2015


On Sat, Jan 31, 2015 at 11:02 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Dear Fabio Porcedda,
>
> On Fri, 30 Jan 2015 08:17:44 +0100, Fabio Porcedda wrote:
>> This commit add a per-package staging directory under output/stagingof/
>> to improve build reproducibility, because it prevents that a unspecified
>> dependency affects the build.
>>
>> It also help to enable default top-level parallel make.
>
> Thanks for attempting to look at this complicated problem. However,
> there is a fairly fundamental flaw in your proposal:
>
>> +$(2)_TARGET_CPPFLAGS += $(foreach dep,$($(2)_DEPENDENCIES),\
>> +     -I$(STAGINGOF_DIR)/$(dep)/usr/include)
>
> How is this going to account for headers installed in subdirs
> of /usr/include ? Those are normally discovered using pkg-config for
> example. But with your solution, pkg-config will continue to return
> paths in the "common" staging directory.
>
> My perception is that it's not really feasible to have one staging
> directory per-package, because it means that pkg-config would have to
> know, depending on which library it is asked to provide information
> for, should use a different sysroot dir.
>
> I believe the only solution is to create a temporary staging directory
> in which you copy/extract only the libraries that are explicitly listed
> as the dependency of the package being built.

It's just that if there is a way to don't copy files it will be faster.

Now I'm preparing a new version that do as you said.
I will try to use hard links if possible.

BR
-- 
Fabio Porcedda


More information about the buildroot mailing list