DPDK patches and discussions
 help / color / mirror / Atom feed
From: luca.boccassi@gmail.com
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, thomas@monjalon.net,
	Luca Boccassi <luca.boccassi@gmail.com>
Subject: [dpdk-dev] [PATCH v8 6/6] mk: install symlinks before build step
Date: Thu, 12 Oct 2017 14:15:54 +0100	[thread overview]
Message-ID: <20171012131554.1533-7-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20171012131554.1533-1-luca.boccassi@gmail.com>

From: Luca Boccassi <luca.boccassi@gmail.com>

A race condition can happen during parallel builds, where a header
might be installed in RTE_OUT/include before CFLAGS is recursively
expanded. This causes GCC to sometimes pick the header path as
SRCDIR/... and sometimes as RTE_OUT/include/... making the build
unreproducible, as the full path is used for the expansion of
__FILE__ and in the DWARF directory listing.

Installing all symlinks before all builds solves the problem. It is
still suboptimal, as the (fixed) path recorded in the DWARF dir
listing will include the user-configurable build output directory,
and thus will result in a different binary between different users
despite all other conditions being equal, but it is a simpler
approach that will anyway be obsolete once the build system is
switched to Meson.

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
---
 mk/rte.lib.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 13115d146..4767ce4f2 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -59,14 +59,20 @@ endif
 
 
 _BUILD = $(LIB)
-_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
+PREINSTALL = $(SYMLINK-FILES-y)
+_INSTALL = $(INSTALL-FILES-y) $(RTE_OUTPUT)/lib/$(LIB)
 _CLEAN = doclean
 
 .PHONY: all
 all: install
 
 .PHONY: install
+ifeq ($(SYMLINK-FILES-y),)
 install: build _postinstall
+else
+install: _preinstall build _postinstall
+build: _preinstall
+endif
 
 _postinstall: build
 
-- 
2.11.0

  parent reply	other threads:[~2017-10-12 13:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <drivers/net/vmxnet3/vmxnet3_rxtx.c.rej>
2017-09-05 20:51 ` [dpdk-dev] [PATCH v7 0/6] Reproducible build luca.boccassi
2017-09-05 20:51   ` [dpdk-dev] [PATCH v7 1/6] mk: sort list of shared objects in linker script luca.boccassi
2017-09-05 20:51   ` [dpdk-dev] [PATCH v7 2/6] mk: sort list of files in examples.dox luca.boccassi
2017-09-05 20:51   ` [dpdk-dev] [PATCH v7 3/6] mk: sort headers before wildcard inclusion luca.boccassi
2017-09-05 20:51   ` [dpdk-dev] [PATCH v7 4/6] mk: sort source files before passing them to the compiler luca.boccassi
2017-09-05 20:51   ` [dpdk-dev] [PATCH v7 5/6] mk: sort object files when building deps lists luca.boccassi
2017-09-05 20:51   ` [dpdk-dev] [PATCH v7 6/6] mk: install symlinks before build step luca.boccassi
2017-10-12  2:58     ` Thomas Monjalon
2017-10-12 12:19       ` Luca Boccassi
2017-09-05 20:56   ` [dpdk-dev] [PATCH v7 0/6] Reproducible build Luca Boccassi
2017-09-05 21:00   ` Stephen Hemminger
2017-09-05 21:15     ` Luca Boccassi
2017-09-06  8:46       ` Bruce Richardson
2017-09-06  9:10         ` Luca Boccassi
2017-09-06 10:45           ` Bruce Richardson
2017-10-12 13:15   ` [dpdk-dev] [PATCH v8 " luca.boccassi
2017-10-12 13:15     ` [dpdk-dev] [PATCH v8 1/6] mk: sort list of shared objects in linker script luca.boccassi
2017-10-12 13:15     ` [dpdk-dev] [PATCH v8 2/6] mk: sort list of files in examples.dox luca.boccassi
2017-10-12 13:15     ` [dpdk-dev] [PATCH v8 3/6] mk: sort headers before wildcard inclusion luca.boccassi
2017-10-12 13:15     ` [dpdk-dev] [PATCH v8 4/6] mk: sort source files before passing them to the compiler luca.boccassi
2017-10-12 13:15     ` [dpdk-dev] [PATCH v8 5/6] mk: sort object files when building deps lists luca.boccassi
2017-10-12 13:15     ` luca.boccassi [this message]
2017-10-12 20:31     ` [dpdk-dev] [PATCH v8 0/6] Reproducible build Thomas Monjalon

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=20171012131554.1533-7-luca.boccassi@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.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;
as well as URLs for NNTP newsgroup(s).