From: Lee Chee Yang <[email protected]>

Signed-off-by: Lee Chee Yang <[email protected]>
---
 .../improve_src_package_reproducibility.patch | 31 +++++++++++++++++++
 .../igc/intel-graphics-compiler_1.0.4756.bb   |  7 +++++
 2 files changed, 38 insertions(+)
 create mode 100644 
dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch

diff --git 
a/dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch
 
b/dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch
new file mode 100644
index 00000000..2f56d0b8
--- /dev/null
+++ 
b/dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch
@@ -0,0 +1,31 @@
+From 88b961ce4e2c9744631c51d13fa638e8a8a6c2a9 Mon Sep 17 00:00:00 2001
+From: Lee Chee Yang <[email protected]>
+Date: Wed, 2 Sep 2020 08:28:35 +0800
+Subject: [PATCH] Improve Reproducibility for src package
+
+Improve reproducibility for intel-graphics-compiler-src package.
+Needs to update the YOCTO_BUILD_PATH with variable ${B} before build.
+
+Upstream-Status: Inappropriate [applying -file-prefix-map in such way not work 
for upstream]
+Signed-off-by: Lee Chee Yang <[email protected]>
+---
+ visa/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt
+index 9c169592..ecea91db 100644
+--- a/visa/CMakeLists.txt
++++ b/visa/CMakeLists.txt
+@@ -105,8 +105,8 @@ endif()
+ # Set up the bison and flex targets. These commands will set up commands to 
generate the appropriate
+ # source files from the input grammars. It will also set up the dependencies 
correctly for any
+ # library or executable that uses the generated source
+-BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp 
COMPILE_FLAGS "-vt -p CISA")
+-FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp 
COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}")
++BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp 
COMPILE_FLAGS "-vt -p CISA --file-prefix-map=YOCTO_BUILD_PATH=/igc/")
++FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp 
COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ")
+ ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser)
+
+ add_custom_target(CISAScanner_target DEPENDS ${FLEX_CISAScanner_OUTPUTS} 
${BISON_CISAParser_OUTPUTS})
+--
+2.25.1
diff --git 
a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb
 
b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb
index 406f9f18..5d66f0ad 100644
--- 
a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb
+++ 
b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb
@@ -11,12 +11,19 @@ LIC_FILES_CHKSUM = 
"file://IGC/BiFModule/Implementation/ExternalLibraries/libclc
 SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \
            file://0001-skip-execution-of-ElfPackager.patch \
            file://link-to-LLVMGenXIntrinsics.patch \
+           file://improve_src_package_reproducibility.patch \
           "
 
 SRCREV = "3623209b10b357ddb3a3d6eac3551c53ebc897f7"
 
 S = "${WORKDIR}/git"
 
+# patch improve_src_package_reproducibility.patch added YOCTO_BUILD_PATH to 
CMakeLists.TXT.
+# YOCTO_BUILD_PATH need to replace with full path to build directory
+do_configure_prepend() {
+  sed -i -e 's|YOCTO_BUILD_PATH|'${B}'|g' ${S}/visa/CMakeLists.txt
+}
+
 inherit cmake
 
 COMPATIBLE_HOST = '(x86_64).*-linux'
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#6701): 
https://lists.yoctoproject.org/g/meta-intel/message/6701
Mute This Topic: https://lists.yoctoproject.org/mt/76728593/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to