From c6ca760d24dc016434e79a6aceeb608fba890a3c Mon Sep 17 00:00:00 2001 From: Lee Chee Yang Date: Thu, 10 Sep 2020 15:09:16 +0800 Subject: intel-graphics-compiler: improve src package reproducibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve the reproducibility of intel-graphics-compiler-src by replacing the absolute build path with relative one in bison compiled files. │ │ │ -#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 Signed-off-by: Anuj Mittal --- .../improve_src_package_reproducibility.patch | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 dynamic-layers/clang-layer/recipes-opencl/igc/files/improve_src_package_reproducibility.patch (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc/files') 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..e9e9b439 --- /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 +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 pass build path as environment variable to the build. + +Upstream-Status: Inappropriate [applying --file-prefix-map in such way does not work for upstream] +Signed-off-by: Lee Chee Yang +--- + 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=$ENV{B}=/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 -- cgit v1.2.3-54-g00ecf