Source: binutils-msp430
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The build path is embedded in various binaries:

  
https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/binutils-msp430.html

  /usr/bin/msp430-addr2line

  /build/1st/binutils-msp430-2.24~ti1/binutils-2.40/bfd/elflink.c:9935
  vs.
  /build/2/binutils-msp430-2.24~ti1/2nd/binutils-2.40/bfd/elflink.c:9935

The attached patch to debian/rules fixes this by using the default
clfags for dpkg-buildflags, which includes -ffile-prefix-map to avoid
embedded build paths.

An alternate approach which may fix this issue is to switch to using a
newer debhelper compat level and dh, which may bring numerous other
benefits as well.

According to my local tests, with this patch applied binutils-msp430
should build reproducibly on tests.reproducible-builds.org!

Thanks for maintaining binutils-msp430!

live well,
  vagrant
From 73dd38286747b8fb031a9b4fa662334b1f7db6e9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Thu, 22 Jun 2023 16:21:25 -0700
Subject: [PATCH] debian/rules: Use default CFLAGS.

---
 debian/rules | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/rules b/debian/rules
index 852e34d..482d8d6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,7 @@ CONFARGS = --prefix=/usr \
            --target=$(TARGET)\
            --disable-static
 
+export CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
 
 unpack: unpack-stamp
 unpack-stamp:
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to