diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-10-06 18:23:46 -0700 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-10-07 11:09:29 -0300 |
commit | 3a889ee86db203eedea1c3ae3ad40d512327d637 (patch) | |
tree | 8159211964a009af54693ace6dce86fdae9740b6 /recipes-kernel | |
parent | bbfa4f51b4ee48e377bbf3e6313b6d23e7aecc2f (diff) | |
download | meta-freescale-3a889ee86db203eedea1c3ae3ad40d512327d637.tar.gz |
dtc-145: Fix compile failure with latest master on musl
This issue is primarily seen when building the target recipe on musl the
fix is a partial backport from upstream to get over the hump
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-kernel')
-rw-r--r-- | recipes-kernel/dtc/dtc-145_git.bb | 6 | ||||
-rw-r--r-- | recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch | 55 |
2 files changed, 59 insertions, 2 deletions
diff --git a/recipes-kernel/dtc/dtc-145_git.bb b/recipes-kernel/dtc/dtc-145_git.bb index 2776cc5e..2d4097bb 100644 --- a/recipes-kernel/dtc/dtc-145_git.bb +++ b/recipes-kernel/dtc/dtc-145_git.bb | |||
@@ -7,12 +7,14 @@ LIC_FILES_CHKSUM = " \ | |||
7 | 7 | ||
8 | SRCREV = "22a65c5331c22979d416738eb756b9541672e00d" | 8 | SRCREV = "22a65c5331c22979d416738eb756b9541672e00d" |
9 | 9 | ||
10 | SRC_URI += "file://0001-Fix-compiler-warnings-seen-with-musl.patch \ | ||
11 | " | ||
10 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
11 | 13 | ||
12 | BBCLASSEXTEND = "native nativesdk" | ||
13 | |||
14 | # only install the dtc binary renamed to dtc-145 | 14 | # only install the dtc binary renamed to dtc-145 |
15 | do_install () { | 15 | do_install () { |
16 | install -d ${D}/${bindir} | 16 | install -d ${D}/${bindir} |
17 | install -m 755 dtc ${D}/${bindir}/dtc-145 | 17 | install -m 755 dtc ${D}/${bindir}/dtc-145 |
18 | } | 18 | } |
19 | |||
20 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch b/recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch new file mode 100644 index 00000000..418a6498 --- /dev/null +++ b/recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 50034ca2600ae07203f397af6d78e2e9ff16bc02 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 6 Oct 2018 18:12:23 -0700 | ||
4 | Subject: [PATCH] Fix compiler warnings seen with musl | ||
5 | |||
6 | Fixes | ||
7 | |||
8 | checks.c:975:16: error: format '%ld' expects argument of type 'long | ||
9 | int', but argument 6 has type 'unsigned int' [-Werror=format=] | ||
10 | FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple | ||
11 | of %ld in node %s", | ||
12 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
13 | prop->name, prop->val.len, sizeof(cell_t), node->fullpath); | ||
14 | ~~~~~~~~~~~~~~ | ||
15 | checks.c:96:23: note: in definition of macro 'FAIL' | ||
16 | check_msg((c), dti, __VA_ARGS__); \ | ||
17 | ^~~~~~~~~~~ | ||
18 | checks.c: In function 'check_interrupts_property': | ||
19 | checks.c:1166:16: error: format '%ld' expects argument of type 'long | ||
20 | int', but argument 6 has type 'unsigned int' [-Werror=format=] | ||
21 | FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple | ||
22 | of %ld in node %s", | ||
23 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
24 | irq_prop->name, irq_prop->val.len, sizeof(cell_t), | ||
25 | ~~~~~~~~~~~~~~ | ||
26 | |||
27 | Upstream-Status: Backport [adapted from an upstream fix] | ||
28 | |||
29 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
30 | --- | ||
31 | checks.c | 4 ++-- | ||
32 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
33 | |||
34 | diff --git a/checks.c b/checks.c | ||
35 | index 902f2e3..08a3a29 100644 | ||
36 | --- a/checks.c | ||
37 | +++ b/checks.c | ||
38 | @@ -972,7 +972,7 @@ static void check_property_phandle_args(struct check *c, | ||
39 | int cell, cellsize = 0; | ||
40 | |||
41 | if (prop->val.len % sizeof(cell_t)) { | ||
42 | - FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", | ||
43 | + FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", | ||
44 | prop->name, prop->val.len, sizeof(cell_t), node->fullpath); | ||
45 | return; | ||
46 | } | ||
47 | @@ -1163,7 +1163,7 @@ static void check_interrupts_property(struct check *c, | ||
48 | return; | ||
49 | |||
50 | if (irq_prop->val.len % sizeof(cell_t)) | ||
51 | - FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", | ||
52 | + FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", | ||
53 | irq_prop->name, irq_prop->val.len, sizeof(cell_t), | ||
54 | node->fullpath); | ||
55 | |||