Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC] pkg-generic: add per-package staging directory
Date: Sat, 31 Jan 2015 23:02:00 +0100	[thread overview]
Message-ID: <20150131230200.0490cafe@free-electrons.com> (raw)
In-Reply-To: <1422602264-4725-1-git-send-email-Fabio.Porcedda@gmail.com>

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.

Best regards,

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

  reply	other threads:[~2015-01-31 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  7:17 [Buildroot] [RFC] pkg-generic: add per-package staging directory Fabio Porcedda
2015-01-31 22:02 ` Thomas Petazzoni [this message]
2015-02-02  9:20   ` Fabio Porcedda
2015-02-03 11:19     ` Fabio Porcedda

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=20150131230200.0490cafe@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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