| 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 |
We might be able to drop this in favour of using --with-nonshared-cflags |
| 8 |
when we being using newer versions of glibc. |
| 9 |
|
| 10 |
--- a/Makeconfig |
| 11 |
+++ b/Makeconfig |
| 12 |
@@ -992,6 +992,10 @@ object-suffixes := |
| 13 |
CPPFLAGS-.o = $(pic-default) |
| 14 |
# libc.a must be compiled with -fPIE/-fpie for static PIE. |
| 15 |
CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) $(pie-default) |
| 16 |
+ |
| 17 |
+# Map Guix store paths to /usr |
| 18 |
+CFLAGS-.o += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;` |
| 19 |
+ |
| 20 |
libtype.o := lib%.a |
| 21 |
object-suffixes += .o |
| 22 |
ifeq (yes,$(build-shared)) |