summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch
new file mode 100644
index 00000000..7dd36aec
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch
@@ -0,0 +1,36 @@
1From c2b7f30dd56568482b1b7c2f22bafdf68736fc88 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 3/5] 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 65dbb4934..8cd607a69 100644
18--- a/visa/CMakeLists.txt
19+++ b/visa/CMakeLists.txt
20@@ -123,8 +123,11 @@ endif()
21 set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp)
22 set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp)
23
24-BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-vt -p CISA")
25-FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} 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 ${bison_output_file} COMPILE_FLAGS "-l -vt -p CISA ${BISON_EXTRA_FLAGS} ")
30+FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ")
31 ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser)
32 set(CISAScanner_dependencies)
33
34--
352.20.1
36