From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 41D5D1B324 for ; Thu, 12 Oct 2017 15:16:47 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id q124so13139463wmb.0 for ; Thu, 12 Oct 2017 06:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UnRK+OqDCqwk0KqNckkvhUMdx+9OQoDnEuWKIMpRhaU=; b=Vtr5Z0PMy53TcDR9CKAlNz2USF/NAAlBQfHAeNDv4yAuEYRcqLIUg11LP7NDJyRiGS 45MC6aLT+jGl4LjF1jjddgAvz4vwR8/rf4FA60NLw/tCYmCKo3Vx8VrG8kb7QqeXeuzG f/Rr3DRy9LEz3XUncrL/mr321vSN59gNNuduzGhiC3GsI1HtimjN0AkRhxftLbOTDxNe wbSVpEvxol/Hrysq32ZTS/O599f1br3vAbOsftNyXfQ7gTY0BLHqnngiYWhdneeNAmxy laZ/r0t8GyR1RwOVq41ONqAwxpllwMIR2DMepimApOjGnEWr8PmR/vc6NhK0Fjw9yeK5 DyTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UnRK+OqDCqwk0KqNckkvhUMdx+9OQoDnEuWKIMpRhaU=; b=fF/3+oncoNuHCGHl9ooh8LZVMLTnaITq6jRIu5cBjpMQ68ADtpPTRx9sOSJbnowAyC xQemNnBdjWC+RagZI1dA88KOBLRI3QJu8uvLN/MU8IAxbtmJmNlQM7DOISnOWLXje5Ap 7IptdR3XY9DDM3Z2/ZncVSmfPmSjxMFPp0ouU67HPiXI6+Hvu1KwTkdTHEltfkOKvOLd OTEGFNy0pRV7Yf0ep8a7BhD2Kz8Rmu7osQfpDgqusRA3Y50S17oHtrTnbZZarbWyNRYe zRRz2SV0weYTKCbMsaQJCpoBV/PspzRquvFx6E0lCAHnWXDRRXK/2Pr12AllRXDlc4Fm 1VDA== X-Gm-Message-State: AMCzsaV7f3Fu7pPt7btJUuMWH2to3ozA1AcUJX98oz5/+gdvQ6g4XtiH 4mopxPPvLfMCGBk3lz7OBcNBd+B4 X-Google-Smtp-Source: AOwi7QCoYV1lkMwNeGWGMKSrr7eDXH5uYkNBysXzuObKtnfVCM11Qryz6yzqg1Jmq93J6pWvLfgBJw== X-Received: by 10.80.151.71 with SMTP id d7mr2812474edb.236.1507814206664; Thu, 12 Oct 2017 06:16:46 -0700 (PDT) Received: from localhost ([213.251.34.151]) by smtp.gmail.com with ESMTPSA id i6sm10438726edk.3.2017.10.12.06.16.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Oct 2017 06:16:45 -0700 (PDT) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, Luca Boccassi Date: Thu, 12 Oct 2017 14:15:54 +0100 Message-Id: <20171012131554.1533-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171012131554.1533-1-luca.boccassi@gmail.com> References: <20170905205159.8606-1-luca.boccassi@gmail.com> <20171012131554.1533-1-luca.boccassi@gmail.com> Subject: [dpdk-dev] [PATCH v8 6/6] mk: install symlinks before build step X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2017 13:16:47 -0000 From: Luca Boccassi 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 Signed-off-by: Luca Boccassi --- 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