diff options
author | 2017-09-05 21:59:15 +0100 | |
---|---|---|
committer | 2017-09-05 22:03:46 +0100 | |
commit | 79d6657d1a0aeef4716a44cf85b9656e62669e8b (patch) | |
tree | e042108c500df9bd11ed379b9296604c30ce6dc5 /debian/patches/mk-install-symlinks-before-build-step.patch | |
parent | f77a597f1c492e2abfe50f3734f156dbc888d497 (diff) |
Use simpler patch for reproducible builds
Change-Id: Iced5ea9dd62a0378afd2e8645264678795df442b
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'debian/patches/mk-install-symlinks-before-build-step.patch')
-rw-r--r-- | debian/patches/mk-install-symlinks-before-build-step.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches/mk-install-symlinks-before-build-step.patch b/debian/patches/mk-install-symlinks-before-build-step.patch new file mode 100644 index 00000000..42569269 --- /dev/null +++ b/debian/patches/mk-install-symlinks-before-build-step.patch @@ -0,0 +1,48 @@ +Description: mk: install symlinks before build step + +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. + +Origin: http://dpdk.org/dev/patchwork/patch/28391/ +Forwarded: yes +Author: Luca Boccassi <luca.boccassi@gmail.com> +Last-Update: 2017-09-05 +--- + mk/rte.lib.mk | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- 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 + |