diff mbox series

[09/11] openmp: Omit time stamps from generated files

Message ID 20250424-clang-merge-v1-9-5a492a8461aa@gmail.com
State New
Headers show
Series clang-merge: Bring clang recipes from meta-clang | expand

Commit Message

Khem Raj April 24, 2025, 7:20 a.m. UTC
This improves reproducibility where openmp-src becomes consistent across time

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ot-emit-date-and-time-into-generate-files.patch | 37 ++++++++++++++++++++++
 meta/recipes-devtools/clang/common.inc             |  1 +
 2 files changed, 38 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/clang/clang/0040-openmp-Do-not-emit-date-and-time-into-generate-files.patch b/meta/recipes-devtools/clang/clang/0040-openmp-Do-not-emit-date-and-time-into-generate-files.patch
new file mode 100644
index 0000000000000000000000000000000000000000..9c416080ae6035c9747b40e5c39e7a6e477d3859
--- /dev/null
+++ b/meta/recipes-devtools/clang/clang/0040-openmp-Do-not-emit-date-and-time-into-generate-files.patch
@@ -0,0 +1,37 @@ 
+From 5674e8fb8eafa189a4843080d8fe782d6b5f13f2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Apr 2025 11:52:48 -0700
+Subject: [PATCH] openmp: Do not emit date and time into generate files
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This improves reproducibility where the generated files do not
+contain time stamps e.g.
+
+//·The·file·was·generated·from·en_US.txt·by·message-converter.py·on·Wed·Apr·23·16:00:53·2025.·//
+./usr/src/debug/openmp/20.1.2/runtime/src/kmp_i18n_id.inc
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ openmp/runtime/tools/message-converter.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/openmp/runtime/tools/message-converter.py b/openmp/runtime/tools/message-converter.py
+index a493d64c1692..0bd5f929fab6 100644
+--- a/openmp/runtime/tools/message-converter.py
++++ b/openmp/runtime/tools/message-converter.py
+@@ -188,11 +188,10 @@ def insert_header(f, data, commentChar="//"):
+     f.write(
+         "{0} Do not edit this file! {0}\n"
+         "{0} The file was generated from"
+-        " {1} by {2} on {3}. {0}\n\n".format(
++        " {1} by {2} {0}\n\n".format(
+             commentChar,
+             os.path.basename(data.filename),
+             os.path.basename(__file__),
+-            datetime.datetime.now().ctime(),
+         )
+     )
+ 
diff --git a/meta/recipes-devtools/clang/common.inc b/meta/recipes-devtools/clang/common.inc
index 6c89d853d5219b4d1f2907100dfad91953b126e9..5208b451d6a616c81c6b4fea1709d3fd460e6f50 100644
--- a/meta/recipes-devtools/clang/common.inc
+++ b/meta/recipes-devtools/clang/common.inc
@@ -71,6 +71,7 @@  SRC_URI = "\
     file://0037-clangd-Add-a-build-option-to-disable-building-dexp.patch \
     file://0038-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \
     file://0039-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch \
+    file://0040-openmp-Do-not-emit-date-and-time-into-generate-files.patch \
 "
 # Fallback to no-PIE if not set
 GCCPIE ??= ""