summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch35
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.4756.bb4
2 files changed, 39 insertions, 0 deletions
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 0000000..7612b18
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch
@@ -0,0 +1,35 @@
1From 88b961ce4e2c9744631c51d13fa638e8a8a6c2a9 Mon Sep 17 00:00:00 2001
2From: Lee Chee Yang <chee.yang.lee@intel.com>
3Date: Wed, 2 Sep 2020 08:28:35 +0800
4Subject: [PATCH] Improve Reproducibility for src package
5
6Improve reproducibility for intel-graphics-compiler-src package.
7needs to pass build path as environment variable to the build.
8this only works on bison 3.7 onward, hence check for bison version
9before adding the flags.
10Upstream-Status: Inappropriate [applying --file-prefix-map in such way does not work for upstream]
11Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
12---
13 visa/CMakeLists.txt | 7 +++--
14 1 file changed, 5 insertions(+), 2 deletions(-)
15
16diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt
17index 9c169592..ecea91db 100644
18--- a/visa/CMakeLists.txt
19+++ b/visa/CMakeLists.txt
20@@ -105,8 +108,11 @@ endif()
21 # Set up the bison and flex targets. These commands will set up commands to generate the appropriate
22 # source files from the input grammars. It will also set up the dependencies correctly for any
23 # library or executable that uses the generated source
24-BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp COMPILE_FLAGS "-vt -p CISA")
25-FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}")
26+if(BISON_VERSION VERSION_GREATER_EQUAL "3.7.0")
27+ set(BISON_EXTRA_FLAGS " --file-prefix-map=$ENV{B}=/igc/ ")
28+endif()
29+BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp COMPILE_FLAGS "-l -vt -p CISA ${BISON_EXTRA_FLAGS} ")
30+FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ")
31 ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser)
32
33 add_custom_target(CISAScanner_target DEPENDS ${FLEX_CISAScanner_OUTPUTS} ${BISON_CISAParser_OUTPUTS})
34--
352.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 406f9f1..e13f34b 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,10 +11,14 @@ LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc
11SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \ 11SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \
12 file://0001-skip-execution-of-ElfPackager.patch \ 12 file://0001-skip-execution-of-ElfPackager.patch \
13 file://link-to-LLVMGenXIntrinsics.patch \ 13 file://link-to-LLVMGenXIntrinsics.patch \
14 file://improve_src_package_reproducibility.patch \
14 " 15 "
15 16
16SRCREV = "3623209b10b357ddb3a3d6eac3551c53ebc897f7" 17SRCREV = "3623209b10b357ddb3a3d6eac3551c53ebc897f7"
17 18
19# Used to replace with relative path in reproducibility patch
20export B
21
18S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
19 23
20inherit cmake 24inherit cmake