summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-27 14:51:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-28 22:31:55 +0100
commitd5d99f85949dea03e06800db6304c619cfd7e6a3 (patch)
tree845a80831041a7f772e517bfacfb39e809f2d97b /meta
parent33747b73cc2d0cc4cad4071d7037ebc645d1635c (diff)
downloadpoky-d5d99f85949dea03e06800db6304c619cfd7e6a3.tar.gz
igt-gpu-tools: Fix reproducibility issue
Add a configuration option to pass in srcdir, removing hard coded build paths from the binaries. (From OE-Core rev: 6e45dd0c65099f0d5f9df0ee052ba3c9ed67f727) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d7e92e3a22f0c87aff4f452b51f50ec417d2949b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/reproducibility.patch38
-rw-r--r--meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb5
2 files changed, 41 insertions, 2 deletions
diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/reproducibility.patch b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/reproducibility.patch
new file mode 100644
index 0000000000..39e36d8737
--- /dev/null
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/reproducibility.patch
@@ -0,0 +1,38 @@
1meson: Allow source location to be configurable
2
3Hardcoding a build source path into a binary when cross compiling isn't
4appropriate and breaks build reproducibility. Allow the srcdir to be
5specified by an optional configuration option to meson.
6
7Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
8Upstream-Status: Submitted [https://lists.freedesktop.org/archives/igt-dev/2021-February/029443.html]
9
10Index: git/lib/meson.build
11===================================================================
12--- git.orig/lib/meson.build
13+++ git/lib/meson.build
14@@ -122,7 +122,11 @@ if chamelium.found()
15 lib_sources += 'igt_chamelium_stream.c'
16 endif
17
18-srcdir = join_paths(meson.source_root(), 'tests')
19+if get_option('srcdir') != ''
20+ srcdir = join_paths(get_option('srcdir'), 'tests')
21+else
22+ srcdir = join_paths(meson.source_root(), 'tests')
23+endif
24
25 lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
26 fallback : 'NO-GIT',
27Index: git/meson_options.txt
28===================================================================
29--- git.orig/meson_options.txt
30+++ git/meson_options.txt
31@@ -50,3 +50,7 @@ option('use_rpath',
32 type : 'boolean',
33 value : false,
34 description : 'Set runpath on installed executables for libigt.so')
35+
36+option('srcdir',
37+ type : 'string',
38+ description : 'Path to source code to be compiled into binaries (optional)')
diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb
index 89480d79d2..f25cbc0603 100644
--- a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_git.bb
@@ -10,7 +10,8 @@ inherit meson
10SRCREV = "d16ad07e7f2a028e14d61f570931c87fa5ce404c" 10SRCREV = "d16ad07e7f2a028e14d61f570931c87fa5ce404c"
11PV = "1.25+git${SRCPV}" 11PV = "1.25+git${SRCPV}"
12 12
13SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https" 13SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https \
14 file://reproducibility.patch"
14 15
15S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
16 17
@@ -22,7 +23,7 @@ PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests"
22 23
23PACKAGECONFIG[chamelium] = "-Dchamelium=enabled,-Dchamelium=disabled,gsl xmlrpc-c" 24PACKAGECONFIG[chamelium] = "-Dchamelium=enabled,-Dchamelium=disabled,gsl xmlrpc-c"
24 25
25EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled" 26EXTRA_OEMESON = "-Ddocs=disabled -Drunner=enabled -Dsrcdir=/usr/src/debug/${PN}/${PV}-${PR}/git/"
26COMPATIBLE_HOST = "(x86_64.*|i.86.*|arm.*|aarch64).*-linux" 27COMPATIBLE_HOST = "(x86_64.*|i.86.*|arm.*|aarch64).*-linux"
27COMPATIBLE_HOST_libc-musl_class-target = "null" 28COMPATIBLE_HOST_libc-musl_class-target = "null"
28SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}" 29SECURITY_LDFLAGS = "${SECURITY_X_LDFLAGS}"