diff options
Diffstat (limited to 'meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch')
| -rw-r--r-- | meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch b/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch new file mode 100644 index 0000000000..d723fcc19a --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/debugfix.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths | ||
| 2 | used for logging with LOGE() in the code. We need to make this match the value we use | ||
| 3 | in the debug source remapping from CFLAGS | ||
| 4 | |||
| 5 | We export the right path to use in the recipe with: | ||
| 6 | |||
| 7 | EXTRA_OECMAKE = "-DCMAKE_DEBUG_SRCDIR=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/" | ||
| 8 | |||
| 9 | and we then patch this into the code instead of the broken use | ||
| 10 | of CMAKE_SOURCE_DIR since __FILENAME__ will match our path prefix | ||
| 11 | changes. | ||
| 12 | |||
| 13 | This also breaks reproducibility since the path length of the build directory | ||
| 14 | will currently change the output! | ||
| 15 | |||
| 16 | Upstream-Status: Pending [needs to be discussed upstream] | ||
| 17 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 18 | |||
| 19 | Index: git/bldsys/cmake/global_options.cmake | ||
| 20 | =================================================================== | ||
| 21 | --- git.orig/bldsys/cmake/global_options.cmake | ||
| 22 | +++ git/bldsys/cmake/global_options.cmake | ||
| 23 | @@ -47,7 +47,7 @@ set(CMAKE_CXX_STANDARD 14) | ||
| 24 | set(CMAKE_DISABLE_SOURCE_CHANGES ON) | ||
| 25 | set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) | ||
| 26 | |||
| 27 | -string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE) | ||
| 28 | +string(LENGTH "${CMAKE_DEBUG_SRCDIR}/" ROOT_PATH_SIZE) | ||
| 29 | add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE}) | ||
| 30 | |||
| 31 | set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}") | ||
