Merge bitcoin/bitcoin#26018: guix: consistently use -ffile-prefix-map

af2a7c8943 guix: consistently use -ffile-prefix-map (fanquake)

Pull request description:

  Aside from being the [newer, more comprehensive option](https://reproducible-builds.org/docs/build-path/), it's what we
  claim to use in the patch docs, and everywhere else in guix.

ACKs for top commit:
  achow101:
    ACK af2a7c8943
  hebasto:
    ACK af2a7c8943

Tree-SHA512: d34f6bc2a52811be42b911643adfefe0f232247a89dca992429a32964e1fc32225c7e996d53db4cecf455a492940d6492ad15c0e7360a98e4265b51f72a1b6d4
pull/26054/head
fanquake 2 years ago
commit b2215b316d
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -15,7 +15,7 @@ when we being using newer versions of glibc.
CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
+
+# Map Guix store paths to /usr
+CFLAGS-.oS += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -fdebug-prefix-map={}=/usr" \;`
+CFLAGS-.oS += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;`
+
CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
libtype.oS = lib%_nonshared.a

@ -15,7 +15,7 @@ when we being using newer versions of glibc.
CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) $(pie-default)
+
+# Map Guix store paths to /usr
+CFLAGS-.o += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -fdebug-prefix-map={}=/usr" \;`
+CFLAGS-.o += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;`
+
libtype.o := lib%.a
object-suffixes += .o

Loading…
Cancel
Save