Source: chibicc
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 /usr/bin/chibicc:

  
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/chibicc.html

  /build/1st/chibicc-0+git20220719+ds/codegen.c:18
  vs.
  /build/2/chibicc-0+git20220719+ds/2nd/codegen.c:18

The attached patch fixes this in debian/rules by adding a dh_auto_build
override which passes the default CFLAGS.

With this patch applied chibicc should build reproducibly on
tests.reproducible-builds.org!

Thanks for maintaining chibicc!

live well,
  vagrant
From 5c37115b41af9fefeec01905bbac0142c33a08df Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Sun, 25 Sep 2022 18:34:21 +0000
Subject: [PATCH] debian/rules: Pass CFLAGS to dh_auto_build.

The default CFLAGS are ignored otherwise, which include flags to avoid
embedding the build path.

https://reproducible-builds.org/docs/build-path/
---
 debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 167fe42..6b36119 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,3 +12,6 @@ export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 
 %:
 	dh $@
+
+override_dh_auto_build:
+	dh_auto_build -- CFLAGS="$(CFLAGS)"
-- 
2.37.2

Attachment: signature.asc
Description: PGP signature

Reply via email to