From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 79A72E009B8; Sat, 6 Oct 2018 18:24:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [209.85.215.196 listed in list.dnswl.org] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (raj.khem[at]gmail.com) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 4B47CE008D0 for ; Sat, 6 Oct 2018 18:23:58 -0700 (PDT) Received: by mail-pg1-f196.google.com with SMTP id g2-v6so6290375pgu.11 for ; Sat, 06 Oct 2018 18:23:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GpM0q4S/IgnysZbXA6E0+rHI8OkSX8dSSsF6mcUpwww=; b=FnTYSdDjRiVf3+wOwcZNL0HT3zqPnVOufHtKsQNM7OpJmAgx1Pr60g/6kjbbr6LWlv Z2zagwR8LrXnXWx7F9f3rxiUDUEfaF/QVl2b/qcrTkWpklAeKdYBZb/Sdstyexx+gxxs emT4uP5GICaxg++Rg92BdFpHTSIbjwzTsrOrA5UZLN5srWoB91qHqHdb4NVbzCO7/0fW 0UMJUnfbhtBH5YwGLC50LBgphJrdpi8RF/NRUmbmwoGlH+PpNRqAwXUKxUsp9fqgAWH9 nx6iU42G80jWtsoFQU7XeV8nLbzL0/LZjsEVZiBcrMbHPrdh4C9ypaZwcDGbUTeuJEoT urYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GpM0q4S/IgnysZbXA6E0+rHI8OkSX8dSSsF6mcUpwww=; b=kXcBXUZlQANwyvNfLGTAyRgkIlxIjnr8ynTRD7lICMISU2KZ5EJXofqoETZBwUkbzM 6wh2MjXFiRfawaboZnNvI7ZXvSy0qz2kPrliMiavgBtG8ToHjLV5dTxwHdzWRTjF/xjs sYLhh4yZUHbJI8A3stg2uhJ4UL1MsYJ2HkMYS1nYNGHlNuE+WlJBTHJ/dl9Auu5sHrLM F56ogvLDD//ezAkNLLqj5QKw5LMf7tFk6nJYis8rpsWHOBFpMt+cICLLt0l3fnh4APZ6 zchgHJLQhtcKeEpb1i2b2kjva9ChdRDkingftqaeQVyb+vssHQ9oAgH4hkDc+gyU/zOB 09iQ== X-Gm-Message-State: ABuFfoiq58OAPmFXYa1KUrhOlvcjEpR1zhbCUXte0cmcYKnzHc1N3S1V Qnp7MN+TNs7P/JzBJv1qE26odAFv X-Google-Smtp-Source: ACcGV629WQGfU/SZOOJKhKo2ETSIKNJj4F8tpDrl23wJFYKkBgK/JaQiAC3A7GM/Flqpu80Se4FxUQ== X-Received: by 2002:a65:43cd:: with SMTP id n13-v6mr15771478pgp.185.1538875437231; Sat, 06 Oct 2018 18:23:57 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::fd07]) by smtp.gmail.com with ESMTPSA id h5-v6sm16394017pfo.135.2018.10.06.18.23.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Oct 2018 18:23:56 -0700 (PDT) From: Khem Raj To: meta-freescale@yoctoproject.org Date: Sat, 6 Oct 2018 18:23:46 -0700 Message-Id: <20181007012346.27360-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Cc: Khem Raj Subject: [PATCH] dtc-145: Fix compile failure with latest master on musl X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2018 01:24:00 -0000 Content-Transfer-Encoding: 8bit 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 --- recipes-kernel/dtc/dtc-145_git.bb | 6 +- ...Fix-compiler-warnings-seen-with-musl.patch | 55 +++++++++++++++++++ 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 recipes-kernel/dtc/files/0001-Fix-compiler-warnings-seen-with-musl.patch 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 = " \ SRCREV = "22a65c5331c22979d416738eb756b9541672e00d" +SRC_URI += "file://0001-Fix-compiler-warnings-seen-with-musl.patch \ + " S = "${WORKDIR}/git" -BBCLASSEXTEND = "native nativesdk" - # only install the dtc binary renamed to dtc-145 do_install () { install -d ${D}/${bindir} install -m 755 dtc ${D}/${bindir}/dtc-145 } + +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 @@ +From 50034ca2600ae07203f397af6d78e2e9ff16bc02 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 6 Oct 2018 18:12:23 -0700 +Subject: [PATCH] Fix compiler warnings seen with musl + +Fixes + +checks.c:975:16: error: format '%ld' expects argument of type 'long +int', but argument 6 has type 'unsigned int' [-Werror=format=] + FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple +of %ld in node %s", + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + prop->name, prop->val.len, sizeof(cell_t), node->fullpath); + ~~~~~~~~~~~~~~ +checks.c:96:23: note: in definition of macro 'FAIL' + check_msg((c), dti, __VA_ARGS__); \ + ^~~~~~~~~~~ +checks.c: In function 'check_interrupts_property': +checks.c:1166:16: error: format '%ld' expects argument of type 'long +int', but argument 6 has type 'unsigned int' [-Werror=format=] + FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple +of %ld in node %s", + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + irq_prop->name, irq_prop->val.len, sizeof(cell_t), + ~~~~~~~~~~~~~~ + +Upstream-Status: Backport [adapted from an upstream fix] + +Signed-off-by: Khem Raj +--- + checks.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/checks.c b/checks.c +index 902f2e3..08a3a29 100644 +--- a/checks.c ++++ b/checks.c +@@ -972,7 +972,7 @@ static void check_property_phandle_args(struct check *c, + int cell, cellsize = 0; + + if (prop->val.len % sizeof(cell_t)) { +- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", ++ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", + prop->name, prop->val.len, sizeof(cell_t), node->fullpath); + return; + } +@@ -1163,7 +1163,7 @@ static void check_interrupts_property(struct check *c, + return; + + if (irq_prop->val.len % sizeof(cell_t)) +- FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %ld in node %s", ++ FAIL(c, dti, "property '%s' size (%d) is invalid, expected multiple of %zu in node %s", + irq_prop->name, irq_prop->val.len, sizeof(cell_t), + node->fullpath); + -- 2.19.0