File python-3.3.0b1-fix_date_time_compiler.patch of Package python3.35632

From 136d2ef60e9ea64d930524e68f6a0cd97c40b5be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
Date: Wed, 3 Apr 2024 10:41:34 +0200
Subject: [PATCH] replace DATE, TIME and COMPILER by fixed definitions to aid
 reproducible builds

Patch: python-3.3.0b1-fix_date_time_compiler.patch
---
 Makefile.pre.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Makefile.pre.in b/Makefile.pre.in
index f93bfdb0013..ea8a43f5e6e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -738,11 +738,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
 		$(MODOBJS) \
 		$(srcdir)/Modules/getbuildinfo.c
 	$(CC) -c $(PY_CORE_CFLAGS) \
+	      -DDATE="\"`date -u -r Makefile.pre.in +"%b %d %Y"`\"" \
+	      -DTIME="\"`date -u -r Makefile.pre.in +"%T"`\"" \
 	      -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \
 	      -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \
 	      -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \
 	      -o $@ $(srcdir)/Modules/getbuildinfo.c
 
+Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile
+	$(CC) -c $(PY_CORE_CFLAGS) \
+		-DCOMPILER='"[GCC]"' \
+		-o $@ $(srcdir)/Python/getcompiler.c
+
 Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
 	$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
 		-DPREFIX='"$(prefix)"' \
-- 
2.45.0
openSUSE Build Service is sponsored by