1 Without -ffile-prefix-map, the debug symbols will contain paths for the
2 guix store which will include the hashes of each package. However, the
3 hash for the same package will differ when on different architectures.
4 In order to be reproducible regardless of the architecture used to build
5 the package, map all guix store prefixes to something fixed, e.g. /usr.
6 7 --- a/libgcc/Makefile.in
8 +++ b/libgcc/Makefile.in
9 @@ -857,7 +857,7 @@ endif
10 # libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
11 # LIB2ADDEHSHARED matter. (Usually all three are identical.)
12 13 -c_flags := -fexceptions
14 +c_flags := -fexceptions $(shell find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;)
15 16 ifeq ($(enable_shared),yes)
17 18 @@ -880,7 +880,7 @@ endif
19 # Build LIBUNWIND. Use -fno-exceptions so that the unwind library does
20 # not generate calls to __gcc_personality_v0.
21 22 -c_flags := -fno-exceptions
23 +c_flags := -fno-exceptions $(shell find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;)
24 25 libunwind-objects += $(addsuffix $(objext),$(basename $(notdir $(LIBUNWIND))))
26 27 --
28 2.37.0
29 30