diff options
author | Lee Chee Yang <chee.yang.lee@intel.com> | 2020-09-22 10:33:59 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2020-09-24 08:50:39 +0800 |
commit | a01cbe26e343f2c5cd42e134b05d3e99c73ad9e6 (patch) | |
tree | 3e491eb107510305cc9a55183f39d5ab7c8e48e3 /dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch | |
parent | 254e3a79b3a37045f829848e0a5e04801bec1439 (diff) | |
download | meta-intel-a01cbe26e343f2c5cd42e134b05d3e99c73ad9e6.tar.gz |
intel-graphics-compiler: improve src package reproducibility
Improve the reproducibility of intel-graphics-compiler-src by replacing
the absolute build path with relative one in bison compiled files.
The --file-prefix-map could only work on bison 3.7 onward so add it only
when bison is newer than 3.7.
│ │ │ -#ifndef
YY_CISA_YOCTO_POKY_MASTER_BUILD_TMP_WORK_SKYLAKE_64_POKY_LINUX_INTEL_GRAPHICS_COMPILER_1_0_4241_R0_BUILD_IGC_VISA_CISA_TAB_HPP_INCLUDED
│ │ │ -# define
YY_CISA_YOCTO_POKY_MASTER_BUILD_TMP_WORK_SKYLAKE_64_POKY_LINUX_INTEL_GRAPHICS_COMPILER_1_0_4241_R0_BUILD_IGC_VISA_CISA_TAB_HPP_INCLUDED
│ │ │ +#ifndef
YY_CISA_YOCTO_POKY_MASTER_BUILD_2_TMP_WORK_SKYLAKE_64_POKY_LINUX_INTEL_GRAPHICS_COMPILER_1_0_4241_R0_BUILD_IGC_VISA_CISA_TAB_HPP_INCLUDED
│ │ │ +# define
YY_CISA_YOCTO_POKY_MASTER_BUILD_2_TMP_WORK_SKYLAKE_64_POKY_LINUX_INTEL_GRAPHICS_COMPILER_1_0_4241_R0_BUILD_IGC_VISA_CISA_TAB_HPP_INCLUDED
Also suppress #line directives in scanner that have the build path:
│ │ │ -#line 2593
"/yocto/poky-master/build/tmp/work/skylake-64-poky-linux/intel-graphics-compiler/1.0.4241-r0/build/IGC/visa/lex.CISA.cpp"
│ │ │ +#line 2593
"/yocto/poky-master/build-2/tmp/work/skylake-64-poky-linux/intel-graphics-compiler/1.0.4241-r0/build/IGC/visa/lex.CISA.cpp"
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch')
-rw-r--r-- | dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch | 35 |
1 files changed, 35 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 00000000..7612b181 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 88b961ce4e2c9744631c51d13fa638e8a8a6c2a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lee Chee Yang <chee.yang.lee@intel.com> | ||
3 | Date: Wed, 2 Sep 2020 08:28:35 +0800 | ||
4 | Subject: [PATCH] Improve Reproducibility for src package | ||
5 | |||
6 | Improve reproducibility for intel-graphics-compiler-src package. | ||
7 | needs to pass build path as environment variable to the build. | ||
8 | this only works on bison 3.7 onward, hence check for bison version | ||
9 | before adding the flags. | ||
10 | Upstream-Status: Inappropriate [applying --file-prefix-map in such way does not work for upstream] | ||
11 | Signed-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 | |||
16 | diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt | ||
17 | index 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 | -- | ||
35 | 2.25.1 | ||