summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/dtc/dtc/0002-meson-allow-building-from-shallow-clones.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/dtc/dtc/0002-meson-allow-building-from-shallow-clones.patch')
-rw-r--r--meta/recipes-kernel/dtc/dtc/0002-meson-allow-building-from-shallow-clones.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-kernel/dtc/dtc/0002-meson-allow-building-from-shallow-clones.patch b/meta/recipes-kernel/dtc/dtc/0002-meson-allow-building-from-shallow-clones.patch
new file mode 100644
index 0000000000..0284905913
--- /dev/null
+++ b/meta/recipes-kernel/dtc/dtc/0002-meson-allow-building-from-shallow-clones.patch
@@ -0,0 +1,38 @@
1From 4415b0baece3c4351a6d3637c2754abbefd4795d Mon Sep 17 00:00:00 2001
2From: Peter Marko <peter.marko@siemens.com>
3Date: Sat, 16 Dec 2023 18:58:31 +0100
4Subject: [PATCH 2/2] meson: allow building from shallow clones
5
6When building from shallow clone, tag is not available
7and version defaults to git hash.
8Problem is that some builds check DTC version and fail the comparison.
9Example is https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
10Which fails to build with following error:
11dtc version too old (039a994), you need at least version 1.4.4
12
13Drop --always from git describe command, see
14https://github.com/mesonbuild/meson/blob/1.3.0/mesonbuild/utils/universal.py#L773
15This will make it more closer to build via Makefile.
16
17Upstream-Status: Submitted [https://github.com/dgibson/dtc/pull/122]
18
19Signed-off-by: Peter Marko <peter.marko@siemens.com>
20---
21 meson.build | 1 +
22 1 file changed, 1 insertion(+)
23
24diff --git a/meson.build b/meson.build
25index 78251eb..fc0c92a 100644
26--- a/meson.build
27+++ b/meson.build
28@@ -56,6 +56,7 @@ py = py.find_installation(required: get_option('python'))
29 swig = find_program('swig', required: get_option('python'))
30
31 version_gen_h = vcs_tag(
32+ command: ['git', 'describe', '--dirty=+'],
33 input: 'version_gen.h.in',
34 output: 'version_gen.h',
35 )
36--
372.30.2
38