From: Maximilian Engelhardt Date: Fri, 11 Dec 2020 18:14:24 +0000 (+0100) Subject: debian/rules: don't include build path in binaries X-Git-Tag: archive/raspbian/4.14.1+11-gb0b734a8b3-1+rpi1^2~55 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1bd28ce912b9399b12e48e42f7158dcad27aa379;p=xen.git debian/rules: don't include build path in binaries This is part of making the package build reproducibly. Signed-off-by: Maximilian Engelhardt Acked-by: Hans van Kranenburg --- diff --git a/debian/rules b/debian/rules index 57dde6b0c8..38386568d6 100755 --- a/debian/rules +++ b/debian/rules @@ -19,7 +19,7 @@ SHELL := bash -e # Inexplicably, if you tell make `export V=value' and `$(shell ...)' # it does not pass V to the shell. WTF. So we set a variable # dbmo which we include in the relevant $(shell ...) invocations. -dbmo= DEB_BUILD_MAINT_OPTIONS=hardening=+all +dbmo= DEB_BUILD_MAINT_OPTIONS="hardening=+all reproducible=+fixfilepath" # Architecture handling. # @@ -140,8 +140,14 @@ make_args_common := \ XEN_COMPILE_ARCH=$(xen_arch_$(DEB_BUILD_ARCH)) \ V=1 +# Passing -ffile-prefix-map is needed for reproducible builds. +# Additionally passing -fdebug-prefix-map in necessary to work around a gcc bug +# where -ffile-prefix-map is ignored with assembly files. See +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93371 make_args_xen := $(make_args_common) \ - XEN_TARGET_ARCH=$(xen_arch_$(flavour)) + XEN_TARGET_ARCH=$(xen_arch_$(flavour)) \ + EXTRA_CFLAGS_XEN_CORE='-ffile-prefix-map=$(shell pwd)=. -fdebug-prefix-map=$(shell pwd)=.' + # (Xen upstream does not offer a separate CPPFLAGS, # so we pass those in CFLAGS.)