1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

vulkan-samples: Fix reproducibility issue

There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths
used for logging with LOGE() in the code. We need to make this match the value we use
in the debug source remapping from CFLAGS. If we don't, the code is firstly removing
the incorrect prefix and possibly moving outside the string, secondly, it causes a
reproducibility issue depending on the length of path the build happens in.

Add a small patch and configuration to avoid the issue.

(From OE-Core rev: 410dbfd1f82b4862ced6fca88789edf0fd9d65df)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2021-01-13 23:07:16 +00:00
parent 09c7fc6e53
commit 49c12484eb
2 changed files with 39 additions and 0 deletions
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git \
file://0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch \
file://0001-support-link-against-libatomic-if-no-built-in-atomic.patch \
file://debugfix.patch \
"
UPSTREAM_CHECK_COMMITS = "1"
@@ -19,3 +20,10 @@ REQUIRED_DISTRO_FEATURES = 'vulkan'
inherit cmake features_check
FILES_${PN} += "${datadir}"
#
# There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths
# used for logging with LOGE in the code. We need to make this match the value we use
# in the debug source remapping from CFLAGS
#
EXTRA_OECMAKE = "-DCMAKE_DEBUG_SRCDIR=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/"