We use the attached patch in Debian to work around an issue in GCC.
See https://tests.reproducible-builds.org/debian/issues/unstable/gcc_captures_build_path_issue.html
Also this makes the Makefiles more self-consistent, most use a relative path as "basedir".
Thanks to Sven Hartge <sven@svenhartge.de>
.PATH: .
# one up
-basedir = @BUILD_DIR@
+basedir = ..
# top dir
-topdir = @BUILD_DIR@
+topdir = ..
# this dir relative to top dir
thisdir = src
dir_group=@dir_group@
# one up
-basedir = @BUILD_DIR@/src
+basedir = ..
# top dir
-topdir = @BUILD_DIR@
+topdir = ../..
# this dir relative to top dir
thisdir = src/dird