commit b2867b1883dc0dda2b9e9d5df8b3f2019256c679
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Aug 29 16:13:47 2021 +0200

    Avoid leaking the source/build directories in debugging symbols of installed files
    
    (cherry picked from commit 2a67a2428bca95a46f91eaea57648996da3d5ec6)

commit 108f74e38144df8c795605d9964c4e17ab7f6b6d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Sep 4 18:27:47 2021 +0200

    reproducibility: Really avoid any STARPU_SRC/BUILD_DIR definition
    
    Even #define / #undef ends up in the debugging symbols
    
    (cherry picked from commit e4edec7354d60941d1eb72e8cbde88be5b6c6359)

---
 configure.ac                     |    3 ++-
 examples/Makefile.am             |    2 +-
 examples/stencil/Makefile.am     |    2 +-
 mpi/examples/Makefile.am         |    2 +-
 socl/examples/Makefile.am        |    2 +-
 src/common/config-src-build.h.in |    2 ++
 tests/loader.c                   |    1 +
 7 files changed, 9 insertions(+), 5 deletions(-)

--- a/configure.ac
+++ b/configure.ac
@@ -3513,6 +3513,7 @@ AC_CONFIG_COMMANDS([executable-scripts],
   test -e tools/starpu_paje_summary.Rmd || ln -sf $ac_abs_top_srcdir/tools/starpu_paje_summary.Rmd tools/starpu_paje_summary.Rmd
   test -e tools/starpu_trace_state_stats.py || ln -sf $ac_abs_top_srcdir/tools/starpu_trace_state_stats.py tools/starpu_trace_state_stats.py
   chmod +x tools/starpu_trace_state_stats.py
+  sed -i -e '/ STARPU_SRC_DIR /d' -e '/ STARPU_BUILD_DIR /d' src/common/config.h
 ])
 
 # Create links to ICD files in build/socl/vendors directory. SOCL will use this
@@ -3530,7 +3531,7 @@ done
 AC_SUBST(SOCL_VENDORS)
 
 AC_CONFIG_FILES(tests/regression/regression.sh tests/regression/profiles tests/regression/profiles.build.only)
-AC_CONFIG_HEADER(src/common/config.h include/starpu_config.h starpurm/include/starpurm_config.h)
+AC_CONFIG_HEADER(src/common/config.h src/common/config-src-build.h include/starpu_config.h starpurm/include/starpurm_config.h)
 
 SANITIZE=$(echo $CFLAGS | grep sanitize)
 AM_CONDITIONAL(STARPU_SANITIZE, test -n "$SANITIZE")
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -160,7 +160,7 @@ if !STARPU_HAVE_WINDOWS
 ## test loader program
 if !STARPU_CROSS_COMPILING
 LOADER			=	loader
-loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
+loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/ -I$(top_srcdir)/src/
 LOADER_BIN		=	$(abs_top_builddir)/examples/$(LOADER)
 loader_SOURCES		=	../tests/loader.c
 noinst_PROGRAMS		+=	loader
--- a/examples/stencil/Makefile.am
+++ b/examples/stencil/Makefile.am
@@ -73,7 +73,7 @@ if !STARPU_HAVE_WINDOWS
 ## test loader program
 if !STARPU_CROSS_COMPILING
 LOADER			=	loader
-loader_CPPFLAGS 	= 	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
+loader_CPPFLAGS 	= 	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/ -I$(top_srcdir)/src/
 LOADER_BIN		=	./$(LOADER)
 loader_SOURCES		=	../../tests/loader.c
 noinst_PROGRAMS		+=	loader
--- a/mpi/examples/Makefile.am
+++ b/mpi/examples/Makefile.am
@@ -26,7 +26,7 @@ noinst_PROGRAMS		=
 if STARPU_HAVE_WINDOWS
 LOADER_BIN		=
 else
-loader_CPPFLAGS 	= 	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
+loader_CPPFLAGS 	= 	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/ -I$(top_srcdir)/src/
 if !STARPU_SIMGRID
 LOADER			=	loader
 LOADER_BIN		=	$(abs_top_builddir)/mpi/examples/$(LOADER)
--- a/socl/examples/Makefile.am
+++ b/socl/examples/Makefile.am
@@ -31,7 +31,7 @@ check_PROGRAMS	=	$(SOCL_EXAMPLES)
 if !STARPU_HAVE_WINDOWS
 ## test loader program
 LOADER			=	loader
-loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
+loader_CPPFLAGS 	=	$(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/ -I$(top_srcdir)/src/
 LOADER_BIN		=	$(abs_top_builddir)/socl/examples/$(LOADER)
 loader_SOURCES		=	../../tests/loader.c
 noinst_PROGRAMS		+=	loader
--- /dev/null
+++ b/src/common/config-src-build.h.in
@@ -0,0 +1,2 @@
+#undef STARPU_SRC_DIR
+#undef STARPU_BUILD_DIR
--- a/tests/loader.c
+++ b/tests/loader.c
@@ -15,6 +15,7 @@
  */
 
 #include <common/config.h>
+#include <common/config-src-build.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
