From 3b177c08a0fe1700b1924337a6b0689e6d4db39b Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 9 Oct 2025 11:21:53 +0200 Subject: [PATCH] Add reproducible.patch for reproducible builds --- reproducible.patch | 18 ++++++++++++++++++ rocclr.spec | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 reproducible.patch diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..5dc3eb2 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,18 @@ +Avoid adding randomness into hip_pch.o + +via +/usr/lib64/rocm/llvm/lib/cmake/llvm/../../../bin/llvm-mc -o hip_pch.o /tmp/hip_pch.$PID/hip_pch.mcin --filetype=obj + +diff --git a/hipamd/src/hip_embed_pch.sh b/hipamd/src/hip_embed_pch.sh +index 6c92d43..0a15078 100755 +--- a/hipamd/src/hip_embed_pch.sh ++++ b/hipamd/src/hip_embed_pch.sh +@@ -100,7 +100,7 @@ EOF + } + + generate_pch() { +- tmp=$tmpdir/hip_pch.$$ ++ tmp=$tmpdir/hip_pch.x + mkdir -p $tmp + + create_hip_macro_file $tmp/hip_macros.h diff --git a/rocclr.spec b/rocclr.spec index 3bc57c0..37a987d 100644 --- a/rocclr.spec +++ b/rocclr.spec @@ -91,6 +91,8 @@ Source1: https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/ro # a fix for building blender Patch8: 0001-add-long-variants-for-__ffsll.patch +# Fix for reproducible builds +Patch9: reproducible.patch #https://github.com/ROCm/clr/pull/97 patch10: %{url}/pull/97/commits/909fa3dcb644f7ca422ed1a980a54ac426d831b1.patch -- 2.51.1