From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 6B6A32C17 for ; Tue, 5 Sep 2017 22:52:58 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id l19so877623wmi.1 for ; Tue, 05 Sep 2017 13:52:58 -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=mrHLRNhAY2CCHx0ZLOkaIqdgXXm6NxZ1nee3UcaQUW8=; b=ce+GidreIGQ/o4AEr2ErXWn0UIaeoNbOlmIzkBif2W0RdKJY7/8lsuDS9e2G/nTtIW xiOu1DVj0njgsN0YB0PkLtH6zfpTx3OlJE4coahntdnEhWnPHf9hQv8N3eOn+oOk2fdb rear5c+CDUOcRsrWCYKJruZiL0mRqzP4CFLUzR0CNzjkiGkHhb5AOVhzXhF0WuECH2Qy HKfYoyZkMhYUv29VoA37cccOzxGoMPqwTOUq2PAk6Ij+8OvRBRRn97K8tfNSHA/tpKrK JJFNHTN6DDy5C5XoRwXtTInpsP+uzDdFDjvv0Q1mJsvWp+Ywhhl8Kr+c9WVXzUcyKvcP HMfQ== 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=mrHLRNhAY2CCHx0ZLOkaIqdgXXm6NxZ1nee3UcaQUW8=; b=KSo9kMpcjG+eT/tPRExQSK9BfQjB24pkB8XQ+ZcwWwmYcFmfxGmYeXEqNrSI9Idqfo BmVzZEVfXStAfKEhrMXR5H20zzzSxC5plIupdkT/NxuCcOB+3oBEPYLA+4KQDww0jS5m CcyO7kqJEmrfk/pxPy2ALRmatPBteHet7aTdUVe08BehgKKWrn4vvWprODewO8tNt6pZ 0O3AQ7YI/1h7SX43M7BeZqRkNuD0sqdvBud1FXSqdcl+mKQ7Zq/TONhmxg+VkZNiAv4y 2intH8T5D5x+WEz7ih/ChGxsxJRuC5cGkbl2/G9H4HvpjJGeUKCW/+R4fRrCfTmN9sm7 2Igg== X-Gm-Message-State: AHPjjUhihAAw80JjkmcdIVdDpQnfWsEV7HncPeFHy8Xcw/Pv3b829MDT lqRAJG40BpcgikanXYs= X-Google-Smtp-Source: ADKCNb7APoj0qwZGtXR5Y/C+fegJfmRXcaajrV/GAU0Cn11/Rovy4s/FNeKABwBmShpxOlLpRXg2vg== X-Received: by 10.28.158.200 with SMTP id h191mr136687wme.25.1504644777783; Tue, 05 Sep 2017 13:52:57 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id b58sm2149617wrg.86.2017.09.05.13.52.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Sep 2017 13:52:57 -0700 (PDT) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Luca Boccassi Date: Tue, 5 Sep 2017 21:51:59 +0100 Message-Id: <20170905205159.8606-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170905205159.8606-1-luca.boccassi@gmail.com> References: <20170905205159.8606-1-luca.boccassi@gmail.com> Subject: [dpdk-dev] [PATCH v7 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: Tue, 05 Sep 2017 20:52:58 -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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index 13115d146..643da47da 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -59,14 +59,19 @@ 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 +endif _postinstall: build -- 2.11.0