From patchwork Thu Apr 20 02:31:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 97697 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp591162qgf; Wed, 19 Apr 2017 19:32:10 -0700 (PDT) X-Received: by 10.84.194.195 with SMTP id h61mr7611664pld.182.1492655530738; Wed, 19 Apr 2017 19:32:10 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id l19si4771216pgk.332.2017.04.19.19.32.09; Wed, 19 Apr 2017 19:32:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 5593B71C7A; Thu, 20 Apr 2017 02:32:01 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-oi0-f65.google.com (mail-oi0-f65.google.com [209.85.218.65]) by mail.openembedded.org (Postfix) with ESMTP id 0987B719AF for ; Thu, 20 Apr 2017 02:31:58 +0000 (UTC) Received: by mail-oi0-f65.google.com with SMTP id g11so5125767oib.2 for ; Wed, 19 Apr 2017 19:32:00 -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; bh=2FEy/+SA/bvVfq2RZxFAcspzqU/39ZwwzSTQfShuAA4=; b=X1YX2jpmTtgGsGKfOWjjPi89AA67qWzXrua8rzfuOLTHGE7Fu8IycTNxfhNESxv6hf JbmiXvEeBJxqw1sa4oFmRBb5JzILio85hBbmEeMAdwgq+p/BP8ZN0eBwZHuB3U2lB+3h hpv7D6CRs5xPl5NOwKk1pqy3KtQiKJ5Sw7vvPa2HQDwJBKx+e4lTVn91f8Nrc6NLy2Ut 7kUSJFf00/qwwwMhWIwbHwEadjLSVJb4NKOj9a+QPkx5H3EEUtoDVtUaHt2bgoeRN74x wCKGU611+zaZDIbvRqWJh8poNv2py+MM69AYQOxpd25Ez4eAGo0CjafEwoFsff1sbz2I U/lQ== 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; bh=2FEy/+SA/bvVfq2RZxFAcspzqU/39ZwwzSTQfShuAA4=; b=PbNGCcRvbewuGkT8eeEJA1HZDa2GlaQntJ28Q/O64kLcdjT6juk5MV9ticY5G7ilbY ytDtTm+/daEMegnc+x/IYcvq3jQ1+Dm8Bmd/y26asuaDo0FTXAEC2jgDovFnsk7ZTcBq J2AmHzDrJ2Ld12bh67qOWDJla0B2jHCjY6hUV58Hq9s75Xjeaar2SQ+HhL+gUbC1ftLq xziZdRQttOqZtDuCQdFiBB75XUzCHuwSQ+ilxus9MpEupwEuqTSHmkqFllhJxXfeP/zk 1HyWKepq4W3ngXJHTee8cr70QS8T8baC60OxWiARavNGjH9/vUwfGqDgOQuGtmphdNFF monQ== X-Gm-Message-State: AN3rC/7pNZo2/JuPtpPMqXLfH30ceYOpIIr3es0Vktbmqd/qm8CxXZZr A58fNj/WHOJmrA== X-Received: by 10.84.217.202 with SMTP id d10mr7449663plj.135.1492655519767; Wed, 19 Apr 2017 19:31:59 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id r73sm6790312pfa.65.2017.04.19.19.31.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 19:31:58 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 19 Apr 2017 19:31:43 -0700 Message-Id: <20170420023147.1868-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.12.2 Subject: [OE-core] [PATCH 1/5] nss: Update to 3.29.1 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Also fix build with gcc7 along Signed-off-by: Khem Raj --- .../nss/0001-Fix-warnings-found-with-gcc7.patch | 41 ++++++++++++++++++++++ .../nss/{nss_3.28.1.bb => nss_3.29.1.bb} | 28 +++++++-------- 2 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 meta/recipes-support/nss/nss/0001-Fix-warnings-found-with-gcc7.patch rename meta/recipes-support/nss/{nss_3.28.1.bb => nss_3.29.1.bb} (90%) -- 2.12.2 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-support/nss/nss/0001-Fix-warnings-found-with-gcc7.patch b/meta/recipes-support/nss/nss/0001-Fix-warnings-found-with-gcc7.patch new file mode 100644 index 00000000000..b16fb020c1c --- /dev/null +++ b/meta/recipes-support/nss/nss/0001-Fix-warnings-found-with-gcc7.patch @@ -0,0 +1,41 @@ +From a1d2ef6a8e1bc721e44640bdb85747deaf8edcca Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 19 Apr 2017 10:50:37 -0700 +Subject: [PATCH] Fix warnings found with gcc7 + +GCC7 finds more type conversion issues + +| pkix_pl_ocsprequest.c: In function 'pkix_pl_OcspRequest_Hashcode': +| pkix_pl_ocsprequest.c:92:60: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] +| *pHashcode = (((((extensionHash << 8) || certHash) << 8) || +| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ +| pkix_pl_ocsprequest.c:93:27: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] +| *pHashcode = (((((extensionHash << 8) || certHash) << 8) || +| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +| dateHash) << 8) || signerHash; +| ~~~~~~~~~~^~~~~ +| cc1: all warnings being treated as errors + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c b/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c +index 171a3d2..d5eef88 100644 +--- a/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c ++++ b/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c +@@ -89,7 +89,7 @@ pkix_pl_OcspRequest_Hashcode( + PKIX_HASHCODE(ocspRq->signerCert, &signerHash, plContext, + PKIX_CERTHASHCODEFAILED); + +- *pHashcode = (((((extensionHash << 8) || certHash) << 8) || ++ *pHashcode = ((PKIX_UInt32)(((PKIX_UInt32)((extensionHash << 8) || certHash) << 8) || + dateHash) << 8) || signerHash; + + cleanup: +-- +2.12.2 + diff --git a/meta/recipes-support/nss/nss_3.28.1.bb b/meta/recipes-support/nss/nss_3.29.1.bb similarity index 90% rename from meta/recipes-support/nss/nss_3.28.1.bb rename to meta/recipes-support/nss/nss_3.29.1.bb index fed86fc8e92..48db0312b10 100644 --- a/meta/recipes-support/nss/nss_3.28.1.bb +++ b/meta/recipes-support/nss/nss_3.29.1.bb @@ -14,20 +14,20 @@ LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \ file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132" -SRC_URI = "\ - http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_28_1_RTM/src/${BP}.tar.gz \ - file://0001-nss-fix-support-cross-compiling.patch \ - file://nss-no-rpath-for-cross-compiling.patch \ - file://nss-fix-incorrect-shebang-of-perl.patch \ - file://nss-fix-nsinstall-build.patch \ - file://disable-Wvarargs-with-clang.patch \ - file://pqg.c-ULL_addend.patch \ - file://Fix-compilation-for-X32.patch \ - file://nss.pc.in \ - file://signlibs.sh \ -" -SRC_URI[md5sum] = "e98d48435cee5792f97ef7fc35a602c3" -SRC_URI[sha256sum] = "58cc0c05c0ed9523e6d820bea74f513538f48c87aac931876e3d3775de1a82ad" +SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_29_1_RTM/src/${BP}.tar.gz \ + file://nss.pc.in \ + file://signlibs.sh \ + file://0001-nss-fix-support-cross-compiling.patch \ + file://nss-no-rpath-for-cross-compiling.patch \ + file://nss-fix-incorrect-shebang-of-perl.patch \ + file://nss-fix-nsinstall-build.patch \ + file://disable-Wvarargs-with-clang.patch \ + file://pqg.c-ULL_addend.patch \ + file://Fix-compilation-for-X32.patch \ + file://0001-Fix-warnings-found-with-gcc7.patch \ + " +SRC_URI[md5sum] = "0525d1a45931892daa0f368d379d4aa4" +SRC_URI[sha256sum] = "47259bc5c4439d8228d7c577ea652ed140588f27eae8ebb39cc91057aea37366" UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases" UPSTREAM_CHECK_REGEX = "NSS_(?P.+)_release_notes" From patchwork Thu Apr 20 02:31:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 97698 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp591336qgf; Wed, 19 Apr 2017 19:32:51 -0700 (PDT) X-Received: by 10.84.176.100 with SMTP id u91mr7472648plb.39.1492655571292; Wed, 19 Apr 2017 19:32:51 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id e5si4784037plk.257.2017.04.19.19.32.51; Wed, 19 Apr 2017 19:32:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id E32CB71C7A; Thu, 20 Apr 2017 02:32:48 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) by mail.openembedded.org (Postfix) with ESMTP id 663A5719AF for ; Thu, 20 Apr 2017 02:32:00 +0000 (UTC) Received: by mail-io0-f196.google.com with SMTP id h41so10617475ioi.1 for ; Wed, 19 Apr 2017 19:32:01 -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:in-reply-to:references; bh=+i45IPL4qSfxsLgBSa1aM/STdZGOPU4zKk68SGDOZOw=; b=L11Z0z3AQV8cLD0LBHkxNDsYk8RnI1VgdWH61B1o3bFl2o7WT8wAo4ZvGxaUKQoP7P poN1d3UTbibH0T6QbvXzW9QYGe5jAk0Yq8VRzdxhhEEu4SDH67uALjTj7QCbKxD1nPVQ WQYrpDfpi2dY5a6S43UrDJyku7d4E/txnbfVNH7ww/v2cC2Fv4XKtRYFfeluUesaEy3l neyf/Q5E3y0ogWbWdXID6c6ZhKpvkbGXyxcYsZEZsTtREOsCStc1m2Z7Zr6jG4k07Rb+ ZnLFL1pCBVWhlU39nOHR6VW2IJsXgqZoEAfcZMROjgtcHfZsRBjbMxxE6KevWENjMfs+ wBkQ== 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:in-reply-to :references; bh=+i45IPL4qSfxsLgBSa1aM/STdZGOPU4zKk68SGDOZOw=; b=TN4IPxJOtUM/Ame2+0YseO5AIepbUVk4EFwnVQboyJk+doATWyArNQhdKaU+locd/g 1WvA23ThSwLrtNUXPbNCjbwtsj+Qc98x8auhRpW05dTKpn93x81rMJeohBf/l7T41/YK IfN17RVyL1qlMPDXRKCrxRdj60zAyc6shCXNDo6QV3eaSEP/rdiaz9pXs/lRTy1XNP8E RJsnYhhtectlqZNFL6ofeqcHUhP6NIbFU9FSK5oFKF9Ug4mJwpW8ktwOQfj7uD423zh6 3WA0LJszgDCYFr7bF6CDw++UxjEUsSxefJ2sHKMVJNlufeCr5grw9qM2DD4wzca1lCKX iToQ== X-Gm-Message-State: AN3rC/6W0Pupx/LEU/0tGW1hbujUjmnHg/fykmJxasmGl9y1fanthw4g fwSda8O/OO0JTg== X-Received: by 10.99.218.69 with SMTP id l5mr5842948pgj.219.1492655521246; Wed, 19 Apr 2017 19:32:01 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id r73sm6790312pfa.65.2017.04.19.19.31.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 19:32:00 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 19 Apr 2017 19:31:44 -0700 Message-Id: <20170420023147.1868-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170420023147.1868-1-raj.khem@gmail.com> References: <20170420023147.1868-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 2/5] json-c: Upgrade to 0.12.1 release X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Backport fix for gcc7 warning along the way Signed-off-by: Khem Raj --- ...-FALLTHRU-comment-to-handle-GCC7-warnings.patch | 74 ++++++++++++++++++++++ .../0001-Link-against-libm-when-needed.patch | 53 ---------------- .../0001-json_tokener-requires-INF-and-NAN.patch | 37 ----------- .../json-c/{json-c_0.12.bb => json-c_0.12.1.bb} | 18 +++--- 4 files changed, 83 insertions(+), 99 deletions(-) create mode 100644 meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch delete mode 100644 meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch delete mode 100644 meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch rename meta/recipes-devtools/json-c/{json-c_0.12.bb => json-c_0.12.1.bb} (70%) -- 2.12.2 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch b/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch new file mode 100644 index 00000000000..537be5e6d29 --- /dev/null +++ b/meta/recipes-devtools/json-c/json-c/0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch @@ -0,0 +1,74 @@ +From 7b24f8bd95ad4f7d00c93ca2ad998c14a0266dbe Mon Sep 17 00:00:00 2001 +From: marxin +Date: Tue, 21 Mar 2017 08:42:11 +0100 +Subject: [PATCH] Add FALLTHRU comment to handle GCC7 warnings. + +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj + + json_object.c | 1 + + json_tokener.c | 1 + + linkhash.c | 22 +++++++++++----------- + 3 files changed, 13 insertions(+), 11 deletions(-) + +diff --git a/json_object.c b/json_object.c +index 6cc73bc..77e8b21 100644 +--- a/json_object.c ++++ b/json_object.c +@@ -552,6 +552,7 @@ int64_t json_object_get_int64(struct json_object *jso) + return jso->o.c_boolean; + case json_type_string: + if (json_parse_int64(jso->o.c_string.str, &cint) == 0) return cint; ++ /* FALLTHRU */ + default: + return 0; + } +diff --git a/json_tokener.c b/json_tokener.c +index 9a76293..ae7b1ae 100644 +--- a/json_tokener.c ++++ b/json_tokener.c +@@ -305,6 +305,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, + tok->err = json_tokener_error_parse_unexpected; + goto out; + } ++ /* FALLTHRU */ + case '"': + state = json_tokener_state_string; + printbuf_reset(tok->pb); +diff --git a/linkhash.c b/linkhash.c +index 712c387..74e3b0f 100644 +--- a/linkhash.c ++++ b/linkhash.c +@@ -376,17 +376,17 @@ static uint32_t hashlittle( const void *key, size_t length, uint32_t initval) + /*-------------------------------- last block: affect all 32 bits of (c) */ + switch(length) /* all the case statements fall through */ + { +- case 12: c+=((uint32_t)k[11])<<24; +- case 11: c+=((uint32_t)k[10])<<16; +- case 10: c+=((uint32_t)k[9])<<8; +- case 9 : c+=k[8]; +- case 8 : b+=((uint32_t)k[7])<<24; +- case 7 : b+=((uint32_t)k[6])<<16; +- case 6 : b+=((uint32_t)k[5])<<8; +- case 5 : b+=k[4]; +- case 4 : a+=((uint32_t)k[3])<<24; +- case 3 : a+=((uint32_t)k[2])<<16; +- case 2 : a+=((uint32_t)k[1])<<8; ++ case 12: c+=((uint32_t)k[11])<<24; /* FALLTHRU */ ++ case 11: c+=((uint32_t)k[10])<<16; /* FALLTHRU */ ++ case 10: c+=((uint32_t)k[9])<<8; /* FALLTHRU */ ++ case 9 : c+=k[8]; /* FALLTHRU */ ++ case 8 : b+=((uint32_t)k[7])<<24; /* FALLTHRU */ ++ case 7 : b+=((uint32_t)k[6])<<16; /* FALLTHRU */ ++ case 6 : b+=((uint32_t)k[5])<<8; /* FALLTHRU */ ++ case 5 : b+=k[4]; /* FALLTHRU */ ++ case 4 : a+=((uint32_t)k[3])<<24; /* FALLTHRU */ ++ case 3 : a+=((uint32_t)k[2])<<16; /* FALLTHRU */ ++ case 2 : a+=((uint32_t)k[1])<<8; /* FALLTHRU */ + case 1 : a+=k[0]; + break; + case 0 : return c; +-- +2.12.2 + diff --git a/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch b/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch deleted file mode 100644 index bfe9d723135..00000000000 --- a/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 93582ad85ef48c18ac12f00a9a9e124989b1fcab Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Fri, 1 May 2015 12:52:18 +0200 -Subject: [PATCH] Link against libm when needed - -In certain C libraries (e.g uClibc), isnan() and related functions are -implemented in libm, so json-c needs to link against it. This commit -therefore adds an AC_TRY_LINK() test to check whether a program -calling isnan() can be properly linked with no special flags. If not, -we assume linking against libm is needed. - -The json-c.pc.in file is also adjusted so that in the case of static -linking against json-c, -lm is also used. - -Signed-off-by: Thomas Petazzoni ---- -Upstream-Status: Backport - - configure.ac | 4 ++++ - json-c.pc.in | 3 ++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index c50f81b..30e7174 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -50,6 +50,10 @@ AC_CHECK_DECLS([isinf], [], [], [[#include ]]) - AC_CHECK_DECLS([_isnan], [], [], [[#include ]]) - AC_CHECK_DECLS([_finite], [], [], [[#include ]]) - -+if test "$ac_cv_have_decl_isnan" = "yes" ; then -+ AC_TRY_LINK([#include ], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"]) -+fi -+ - #check if .section.gnu.warning accepts long strings (for __warn_references) - AC_LANG_PUSH([C]) - -diff --git a/json-c.pc.in b/json-c.pc.in -index 037739d..05bfbc8 100644 ---- a/json-c.pc.in -+++ b/json-c.pc.in -@@ -6,6 +6,7 @@ includedir=@includedir@ - Name: json-c - Description: JSON implementation in C - Version: @VERSION@ --Requires: -+Requires: -+Libs.private: @LIBS@ - Libs: -L${libdir} -ljson-c - Cflags: -I${includedir}/json-c --- -2.8.1 - diff --git a/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch b/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch deleted file mode 100644 index d29d9118dc4..00000000000 --- a/meta/recipes-devtools/json-c/json-c/0001-json_tokener-requires-INF-and-NAN.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 9be71700eb580c815688584a64621a38867c3fdd Mon Sep 17 00:00:00 2001 -From: James Myatt -Date: Thu, 5 Feb 2015 15:57:14 +0000 -Subject: [PATCH] json_tokener requires INF and NAN - ---- -Upstream-Status: Backport - - json_tokener.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: json-c-0.12/json_tokener.c -=================================================================== ---- json-c-0.12.orig/json_tokener.c -+++ json-c-0.12/json_tokener.c -@@ -16,6 +16,7 @@ - #include "config.h" - - #include -+#include "math_compat.h" - #include - #include - #include -@@ -352,12 +353,10 @@ struct json_object* json_tokener_parse_e - - case json_tokener_state_inf: /* aka starts with 'i' */ - { -- int size; -- int size_inf; -+ size_t size_inf; - int is_negative = 0; - - printbuf_memappend_fast(tok->pb, &c, 1); -- size = json_min(tok->st_pos+1, json_null_str_len); - size_inf = json_min(tok->st_pos+1, json_inf_str_len); - char *infbuf = tok->pb->buf; - if (*infbuf == '-') diff --git a/meta/recipes-devtools/json-c/json-c_0.12.bb b/meta/recipes-devtools/json-c/json-c_0.12.1.bb similarity index 70% rename from meta/recipes-devtools/json-c/json-c_0.12.bb rename to meta/recipes-devtools/json-c/json-c_0.12.1.bb index a15455c9bfb..5aa4164f2bb 100644 --- a/meta/recipes-devtools/json-c/json-c_0.12.bb +++ b/meta/recipes-devtools/json-c/json-c_0.12.1.bb @@ -5,25 +5,25 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \ - file://0001-json_tokener-requires-INF-and-NAN.patch \ - file://0001-Link-against-libm-when-needed.patch \ - " - -SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491" -SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f" + file://0001-Add-FALLTHRU-comment-to-handle-GCC7-warnings.patch \ + " +SRC_URI[md5sum] = "55f7853f7d8cf664554ce3fa71bf1c7d" +SRC_URI[sha256sum] = "2a136451a7932d80b7d197b10441e26e39428d67b1443ec43bbba824705e1123" UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+).tar" # json-c releases page is fetching the list of releases in some weird XML format # from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/ #UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html" -RECIPE_UPSTREAM_VERSION = "0.12" -RECIPE_UPSTREAM_DATE = "Apr 11, 2014" -CHECK_DATE = "Dec 04, 2015" +RECIPE_UPSTREAM_VERSION = "0.12.1" +RECIPE_UPSTREAM_DATE = "Jun 07, 2016" +CHECK_DATE = "Apr 19, 2017" RPROVIDES_${PN} = "libjson" inherit autotools +EXTRA_OECONF = "--disable-rpath --enable-rdrand" + do_configure_prepend() { # Clean up autoconf cruft that should not be in the tarball rm -f ${S}/config.status From patchwork Thu Apr 20 02:31:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 97699 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp591357qgf; Wed, 19 Apr 2017 19:32:55 -0700 (PDT) X-Received: by 10.99.149.16 with SMTP id p16mr5818836pgd.112.1492655575922; Wed, 19 Apr 2017 19:32:55 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id y71si1010726pgd.130.2017.04.19.19.32.55; Wed, 19 Apr 2017 19:32:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id F034571DDA; Thu, 20 Apr 2017 02:32:49 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mail.openembedded.org (Postfix) with ESMTP id 379FC71D82 for ; Thu, 20 Apr 2017 02:32:01 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id x184so31066585oia.1 for ; Wed, 19 Apr 2017 19:32:03 -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:in-reply-to:references; bh=Nv/8tMeWTHzeiPMLIU/KDuLrcdupwdtA9dEB80h3Ej4=; b=acS3nloAIw2s6AinHuMDgweyZnKClYy6O7R2iSkIgqiT16JTePWFfY60Ts70LnXq5R gDR4tqVzOhMDpSLiwaglqyWwndYMjg//yvw5QXPMsjMapnDIQlENvxQl88+uABnn7m9x hPeE5pwkAdlZI+LePCE7imuE4u6L3fH/nPGMLLLsgzb0wy0NbGOFoRO6z1IQVoH4jF4H xEmIMl07Xc2feVJz+gDNbWfvvYN4bFMPrsPn5V9i+7U0kBlLLlXoB1OVJWx6bxFVV+jY 5iM0iXChS0S6WmgUpZ6NGPAnDPz1BadId+sGRmPSzTTWepnjVdLScOSdBZmd53xMzNfD OcZw== 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:in-reply-to :references; bh=Nv/8tMeWTHzeiPMLIU/KDuLrcdupwdtA9dEB80h3Ej4=; b=c5acpsVdU9vZAH7T58KcKkc0GdAwwDcEeRxa0PSpuGTBYJgMGW1ugOg2yDLT6Cr8WZ 0y7Gjyyy+pwcAQnounyrvR9L9xPM59qnYv7motmL2Yqhg3gKwacNbuLbXuWnwn2TX8mS a7GSunHNKL6Eb/yY/ecnJTVfLnC3/x0zLbTZp9By3VhsuVSwwlKGrpR0jjFCySXck5T/ XUKfFm+SrR7wCIZ3UNovEC32TVKk4si+JZrPrE12FdmD5g9QtIXQSPvQ613O0gS0C1v3 pSXj7YQ4imgSayw7lutNewrRF35f67S9j9Wi1IjRGJ/P8DIdAXavnacTSIAol2VF/XlY HU7Q== X-Gm-Message-State: AN3rC/4LGhugC3ai5yTm5GTMZJd+K24HPjHCs6KkHbfzM+4vWG4adY1l cOf8SLjYqt+SD2Rr X-Received: by 10.84.254.4 with SMTP id b4mr5332957plm.64.1492655522919; Wed, 19 Apr 2017 19:32:02 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id r73sm6790312pfa.65.2017.04.19.19.32.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 19:32:01 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 19 Apr 2017 19:31:45 -0700 Message-Id: <20170420023147.1868-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170420023147.1868-1-raj.khem@gmail.com> References: <20170420023147.1868-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 3/5] pax: Fix build with gcc7 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../pax/0001-Add-a-comment-for-fallthrough.patch | 38 ++++++++++++++++++++++ meta/recipes-extended/pax/pax_3.4.bb | 9 ++--- 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch -- 2.12.2 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch b/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch new file mode 100644 index 00000000000..b76f85aa458 --- /dev/null +++ b/meta/recipes-extended/pax/pax/0001-Add-a-comment-for-fallthrough.patch @@ -0,0 +1,38 @@ +From e67bb3debe582f0e77770b714bd012bb1082fc41 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 19 Apr 2017 11:32:00 -0700 +Subject: [PATCH] Add a comment for fallthrough + +Fixes warnings with gcc7 e.g. + +../../../../../../../workspace/sources/pax/src/options.c: In function 'tar_options': +../../../../../../../workspace/sources/pax/src/options.c:725:7: error: this statement may fall through [-Werror=implicit-fallthrough=] + if (opt_add ("write_opt=nodir") < 0) + ^ +../../../../../../../workspace/sources/pax/src/options.c:730:2: note: here + case 'O': + ^~~~ +cc1: all warnings being treated as errors + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + src/options.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/options.c b/src/options.c +index c663b4e..b80819a 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -724,6 +724,7 @@ tar_options (int argc, char **argv) + case 'o': + if (opt_add ("write_opt=nodir") < 0) + tar_usage (); ++ /* fallthru */ + case 'O': + Oflag = 1; + break; +-- +2.12.2 + diff --git a/meta/recipes-extended/pax/pax_3.4.bb b/meta/recipes-extended/pax/pax_3.4.bb index 9b4e17b3df7..6df9a8186b6 100644 --- a/meta/recipes-extended/pax/pax_3.4.bb +++ b/meta/recipes-extended/pax/pax_3.4.bb @@ -15,10 +15,11 @@ PR = "r2" DEPENDS_append_libc-musl = " fts " SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \ - file://fix_for_compile_with_gcc-4.6.0.patch \ - file://pax-3.4_fix_for_x32.patch \ - file://0001-include-sys-sysmacros.h-for-major-minor-definitions.patch \ -" + file://fix_for_compile_with_gcc-4.6.0.patch \ + file://pax-3.4_fix_for_x32.patch \ + file://0001-include-sys-sysmacros.h-for-major-minor-definitions.patch \ + file://0001-Add-a-comment-for-fallthrough.patch \ + " SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \ file://0001-use-strtoll-instead-of-strtoq.patch \ From patchwork Thu Apr 20 02:31:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 97700 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp591375qgf; Wed, 19 Apr 2017 19:33:00 -0700 (PDT) X-Received: by 10.98.163.75 with SMTP id s72mr5912364pfe.227.1492655580806; Wed, 19 Apr 2017 19:33:00 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b83si4783313pfl.225.2017.04.19.19.33.00; Wed, 19 Apr 2017 19:33:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0AF4171DEE; Thu, 20 Apr 2017 02:32:51 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) by mail.openembedded.org (Postfix) with ESMTP id EC49D71DAB for ; Thu, 20 Apr 2017 02:32:02 +0000 (UTC) Received: by mail-io0-f196.google.com with SMTP id x86so10604802ioe.3 for ; Wed, 19 Apr 2017 19:32:04 -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:in-reply-to:references; bh=sJwTrxtkavMSlzTlQRdeDXrV8hl/+JGnEFJDBXx7neA=; b=tx/qDxzEjvFB0zLW+nG1mN303TCGABxOtdFktJHz1lkpFAv0d2xGqKCBAM1Xc9CbTN FU8paeH1O9lbg/U9OGw3DGcIaE4S9K8D9n3dHW0Pj+UDPdsfnKunGFMG3TbTuUmo75BJ dvAxwv9pg0HvSJOvRzh4V1wlJ+n/AZ7yYS7qEsDV4WofP3XgpdaI53CNc4O7fnNNImhz lsI9cobwEQsq4J2+uxUw9alzypSTUgle/9ikH30dcKufQFgrH4jAKe/vrwovfqulmDdG 9Yq0hxkKSEtlzY+2IoRUdtJH2v0/x+bEk2uYJNn5r3fLc+ILfxauqv/hPoY3MxsdBKXO DDbA== 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:in-reply-to :references; bh=sJwTrxtkavMSlzTlQRdeDXrV8hl/+JGnEFJDBXx7neA=; b=DSehCusYEhDK166EY3uT2oQ7P2cqlNU5Gh2m46TSJ9cJNxy15CDKPV8uwXicKLBr6Z Z8aNaxG5H72WV524sXCvqp7GdkPk0BtSvmNUxJ79UzY9pwuvA+dEnj6w9o57/a5QaGI4 yXf8Y5EeBC5cGaD+7tKNWnqiBVetwZ+sqWkVAas8pbYX3BgAqEjC8t8Yfw9WN0+Va56a x4duz6qrEdYJI8ORf45//9VnsKC5LYdYURkn+1U0ehihJkobxLtXg3m4GmOKE17od0tD qDntIO1SSWdN5rcGrTvGXxeWYqQXtgeCba2GLpSCDEnt0WGoNq79NzQQE9huItI70Vk5 oprQ== X-Gm-Message-State: AN3rC/5ussh9DwO6uCgU/RzYh1s1gx573QoWpfd4wiTowonn/K8wueTA Qnx6V5zCfJjQUg== X-Received: by 10.98.25.69 with SMTP id 66mr5961561pfz.84.1492655524444; Wed, 19 Apr 2017 19:32:04 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id r73sm6790312pfa.65.2017.04.19.19.32.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 19:32:03 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 19 Apr 2017 19:31:46 -0700 Message-Id: <20170420023147.1868-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170420023147.1868-1-raj.khem@gmail.com> References: <20170420023147.1868-1-raj.khem@gmail.com> Subject: [OE-core] [PATCH 4/5] aspell: Fix build with gcc7 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- meta/recipes-support/aspell/aspell/gcc7.patch | 40 ++++++++++++++++++++++++++ meta/recipes-support/aspell/aspell_0.60.6.1.bb | 4 ++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/aspell/aspell/gcc7.patch -- 2.12.2 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-support/aspell/aspell/gcc7.patch b/meta/recipes-support/aspell/aspell/gcc7.patch new file mode 100644 index 00000000000..6ffd0772fa1 --- /dev/null +++ b/meta/recipes-support/aspell/aspell/gcc7.patch @@ -0,0 +1,40 @@ +From 8089fa02122fed0a6394eba14bbedcb1d18e2384 Mon Sep 17 00:00:00 2001 +From: Kevin Atkinson +Date: Thu, 29 Dec 2016 00:50:31 -0500 +Subject: [PATCH] Compile Fixes for GCC 7. + +Closes #519. +--- +Signed-off-by: Khem Raj +Upstream-Status: Backport + + modules/filter/tex.cpp | 2 +- + prog/check_funs.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp +index a979539..19ab63c 100644 +--- a/modules/filter/tex.cpp ++++ b/modules/filter/tex.cpp +@@ -174,7 +174,7 @@ namespace { + + if (c == '{') { + +- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0') ++ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0') + push_command(Parm); + + top.in_what = Parm; +diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp +index db54f3d..89ee09d 100644 +--- a/prog/check_funs.cpp ++++ b/prog/check_funs.cpp +@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) { + } + } + if (i == width-1) { +- if (word == '\0') ++ if (*word == '\0') + put(out,' '); + else if (word[len] == '\0') + put(out, word, len); diff --git a/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/meta/recipes-support/aspell/aspell_0.60.6.1.bb index 5a23754b74b..19a7155d66a 100644 --- a/meta/recipes-support/aspell/aspell_0.60.6.1.bb +++ b/meta/recipes-support/aspell/aspell_0.60.6.1.bb @@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" PR = "r1" -SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" +SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz \ + file://gcc7.patch \ + " SRC_URI[md5sum] = "e66a9c9af6a60dc46134fdacf6ce97d7" SRC_URI[sha256sum] = "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1" From patchwork Thu Apr 20 02:31:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 97701 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp591398qgf; Wed, 19 Apr 2017 19:33:05 -0700 (PDT) X-Received: by 10.98.31.141 with SMTP id l13mr5914434pfj.259.1492655585683; Wed, 19 Apr 2017 19:33:05 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id n66si4795829pfb.186.2017.04.19.19.33.05; Wed, 19 Apr 2017 19:33:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0F02471E06; Thu, 20 Apr 2017 02:32:52 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by mail.openembedded.org (Postfix) with ESMTP id 20261719AF for ; Thu, 20 Apr 2017 02:32:04 +0000 (UTC) Received: by mail-io0-f173.google.com with SMTP id r16so47737883ioi.2 for ; Wed, 19 Apr 2017 19:32:06 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=EznMoNHX9dxhZaeR8Rk66mFAe+L7yt6vFcJFEpOxYO8=; b=gwkEU27mlkDis+eAVNjsLpq3ExRI3jYHgYIlosXpht8FV4JmAD4y5zwTT4oI5lsCpd FAf4Ait202AXqUvv+No+3oH4hmxQpQObQ6ZjCjzUJ7C5QU2AifLWP7lgvVjCiz7Hqmo6 9L73RxaZAkkEtUuymhKfIinWoY3huScO9gkZCnIAkzBwslJxDtDDf3bZG/KtkvG117/o tUt8uVSq4oppIWQY/EAnhGVEcF1KiSey4LqM+T68ZlbAOSfdD77/msAol+gVL32wvaiS y9WItH8yqDyCHHdcrljbDhxTyc/0Z/cosqeEJd2BhKZVv5XycbJl+gS3ySSBnScGbJeE Amhg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=EznMoNHX9dxhZaeR8Rk66mFAe+L7yt6vFcJFEpOxYO8=; b=L2dzDNHZsHg+cQlQSiIKHOKW9IWeZG9Xz0mDEZShJURpYjJD6LQj1yIWA07ltNYqJw G46SC1M34Cal/W9zBcoFDAo4l0DMGSCQU2QchS0fSYaSYjz8JiyXlygv5BbDGMqrwKMr CDOrUEpRCHRuZ1Uyd5RsiVtdBYIk5vhXg7BLIbcczPpM21eTvvMrdxLepSiMTx1j1KJ6 iEdfhnL3myQg80E4KOFPmKO/IVr42lh/37mDXKT7CRERtK036GOsTML1HagrLzGdoluk DVtkeaglCkR50sahthHy0mhlmy4yeeFYlkl7cxaAx2nwjmeteXaLOT5wJsOTlubgMkhh oxlw== X-Gm-Message-State: AN3rC/5YkQ/i4JzA1BZB5XaXayYalvPpeLd5PsQeGHz+JewBBZtYEYEY oquW54SDSvMmqg== X-Received: by 10.98.11.13 with SMTP id t13mr5925172pfi.104.1492655525808; Wed, 19 Apr 2017 19:32:05 -0700 (PDT) Received: from localhost.localdomain (c-76-102-32-192.hsd1.ca.comcast.net. [76.102.32.192]) by smtp.gmail.com with ESMTPSA id r73sm6790312pfa.65.2017.04.19.19.32.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 19:32:04 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 19 Apr 2017 19:31:47 -0700 Message-Id: <20170420023147.1868-5-raj.khem@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170420023147.1868-1-raj.khem@gmail.com> References: <20170420023147.1868-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 5/5] mdadm: Backport and make fixes for building with gcc7 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...m-Add-Wimplicit-fallthrough-0-in-Makefile.patch | 37 ++++++ ...pecify-enough-length-when-write-to-buffer.patch | 75 ++++++++++++ ...rintf-with-strncpy-at-some-places-to-avoi.patch | 59 ++++++++++ ...orced-type-conversion-to-avoid-truncation.patch | 33 ++++++ ...d-a-comment-to-indicate-valid-fallthrough.patch | 128 +++++++++++++++++++++ meta/recipes-extended/mdadm/mdadm_4.0.bb | 5 + 6 files changed, 337 insertions(+) create mode 100644 meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch create mode 100644 meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch create mode 100644 meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch create mode 100644 meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch create mode 100644 meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch b/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch new file mode 100644 index 00000000000..ce15170c758 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch @@ -0,0 +1,37 @@ +From aa09af0fe2ec0737fa04ffd00957532684e257b9 Mon Sep 17 00:00:00 2001 +From: Xiao Ni +Date: Fri, 17 Mar 2017 19:55:42 +0800 +Subject: [PATCH 1/5] mdadm: Add Wimplicit-fallthrough=0 in Makefile + +There are many errors like 'error: this statement may fall through'. +But the logic is right. So add the flag Wimplicit-fallthrough=0 +to disable the error messages. The method I use is from +https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +#index-Wimplicit-fallthrough-375 + +Signed-off-by: Xiao Ni +Signed-off-by: Jes Sorensen +--- +Upstream-Status: Backport + Makefile | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Makefile b/Makefile +index 0f307ec..e1a7058 100644 +--- a/Makefile ++++ b/Makefile +@@ -48,6 +48,11 @@ ifdef WARN_UNUSED + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 + endif + ++FALLTHROUGH := $(shell gcc -v --help 2>&1 | grep "implicit-fallthrough" | wc -l) ++ifneq "$(FALLTHROUGH)" "0" ++CWFLAGS += -Wimplicit-fallthrough=0 ++endif ++ + ifdef DEBIAN + CPPFLAGS += -DDEBIAN + endif +-- +2.12.2 + diff --git a/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch b/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch new file mode 100644 index 00000000000..cbce053a3ae --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch @@ -0,0 +1,75 @@ +From bb4df273041ba206008bdb0ada75ccd97c29f623 Mon Sep 17 00:00:00 2001 +From: Xiao Ni +Date: Fri, 17 Mar 2017 19:55:43 +0800 +Subject: [PATCH 2/5] mdadm: Specify enough length when write to buffer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In Detail.c the buffer path in function Detail is defined as path[200], +in fact the max lenth of content which needs to write to the buffer is +287. Because the length of dname of struct dirent is 255. +During building it reports error: +error: ā€˜%sā€™ directive writing up to 255 bytes into a region of size 189 +[-Werror=format-overflow=] + +In function examine_super0 there is a buffer nb with length 5. +But it need to show a int type argument. The lenght of max +number of int is 10. So the buffer length should be 11. + +In human_size function the length of buf is 30. During building +there is a error: +output between 20 and 47 bytes into a destination of size 30. +Change the length to 47. + +Signed-off-by: Xiao Ni +Signed-off-by: Jes Sorensen +--- +Upstream-Status: Backport + Detail.c | 2 +- + super0.c | 2 +- + util.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Detail.c b/Detail.c +index 509b0d4..cb33794 100644 +--- a/Detail.c ++++ b/Detail.c +@@ -575,7 +575,7 @@ This is pretty boring + printf(" Member Arrays :"); + + while (dir && (de = readdir(dir)) != NULL) { +- char path[200]; ++ char path[287]; + char vbuf[1024]; + int nlen = strlen(sra->sys_name); + dev_t devid; +diff --git a/super0.c b/super0.c +index 938cfd9..f5b4507 100644 +--- a/super0.c ++++ b/super0.c +@@ -231,7 +231,7 @@ static void examine_super0(struct supertype *st, char *homehost) + d++) { + mdp_disk_t *dp; + char *dv; +- char nb[5]; ++ char nb[11]; + int wonly, failfast; + if (d>=0) dp = &sb->disks[d]; + else dp = &sb->this_disk; +diff --git a/util.c b/util.c +index f100972..32bd909 100644 +--- a/util.c ++++ b/util.c +@@ -811,7 +811,7 @@ unsigned long calc_csum(void *super, int bytes) + #ifndef MDASSEMBLE + char *human_size(long long bytes) + { +- static char buf[30]; ++ static char buf[47]; + + /* We convert bytes to either centi-M{ega,ibi}bytes or + * centi-G{igi,ibi}bytes, with appropriate rounding, +-- +2.12.2 + diff --git a/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch b/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch new file mode 100644 index 00000000000..dcec84ffcd7 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch @@ -0,0 +1,59 @@ +From bc87af1314325b00c6ac002a60a2b0f0caa81e34 Mon Sep 17 00:00:00 2001 +From: Xiao Ni +Date: Sat, 18 Mar 2017 10:33:44 +0800 +Subject: [PATCH 3/5] Replace snprintf with strncpy at some places to avoid + truncation + +In gcc7 there are some building errors like: +directive output may be truncated writing up to 31 bytes into a region of size 24 +snprintf(str, MPB_SIG_LEN, %s, mpb->sig); + +It just need to copy one string to target. So use strncpy to replace it. + +For this line code: snprintf(str, MPB_SIG_LEN, %s, mpb->sig); +Because mpb->sig has the content of version after magic, so +it's better to use strncpy to replace snprintf too. + +Signed-off-by: Xiao Ni +Signed-off-by: Jes Sorensen +--- +Upstream-Status: Backport + super-intel.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/super-intel.c b/super-intel.c +index 57c7e75..5499098 100644 +--- a/super-intel.c ++++ b/super-intel.c +@@ -1811,7 +1811,8 @@ static void examine_super_imsm(struct supertype *st, char *homehost) + __u32 reserved = imsm_reserved_sectors(super, super->disks); + struct dl *dl; + +- snprintf(str, MPB_SIG_LEN, "%s", mpb->sig); ++ strncpy(str, (char *)mpb->sig, MPB_SIG_LEN); ++ str[MPB_SIG_LEN-1] = '\0'; + printf(" Magic : %s\n", str); + snprintf(str, strlen(MPB_VERSION_RAID0), "%s", get_imsm_version(mpb)); + printf(" Version : %s\n", get_imsm_version(mpb)); +@@ -7142,14 +7143,16 @@ static int update_subarray_imsm(struct supertype *st, char *subarray, + + u->type = update_rename_array; + u->dev_idx = vol; +- snprintf((char *) u->name, MAX_RAID_SERIAL_LEN, "%s", name); ++ strncpy((char *) u->name, name, MAX_RAID_SERIAL_LEN); ++ u->name[MAX_RAID_SERIAL_LEN-1] = '\0'; + append_metadata_update(st, u, sizeof(*u)); + } else { + struct imsm_dev *dev; + int i; + + dev = get_imsm_dev(super, vol); +- snprintf((char *) dev->volume, MAX_RAID_SERIAL_LEN, "%s", name); ++ strncpy((char *) dev->volume, name, MAX_RAID_SERIAL_LEN); ++ dev->volume[MAX_RAID_SERIAL_LEN-1] = '\0'; + for (i = 0; i < mpb->num_raid_devs; i++) { + dev = get_imsm_dev(super, i); + handle_missing(super, dev); +-- +2.12.2 + diff --git a/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch b/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch new file mode 100644 index 00000000000..94fde42e992 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch @@ -0,0 +1,33 @@ +From 5da889032e2d99751ed9fe60016146e9ae8114cd Mon Sep 17 00:00:00 2001 +From: Xiao Ni +Date: Sat, 18 Mar 2017 10:33:45 +0800 +Subject: [PATCH 4/5] mdadm: Forced type conversion to avoid truncation + +Gcc reports it needs 19 bytes to right to disk->serial. Because the +type of argument i is int. But the meaning of i is failed disk +number. So it doesn't need to use 19 bytes. Just add a type +conversion to avoid this building error + +Signed-off-by: Xiao Ni +Signed-off-by: Jes Sorensen +--- +Upstream-Status: Backport + super-intel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/super-intel.c b/super-intel.c +index 5499098..4e466ff 100644 +--- a/super-intel.c ++++ b/super-intel.c +@@ -5228,7 +5228,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info, + disk->status = CONFIGURED_DISK | FAILED_DISK; + disk->scsi_id = __cpu_to_le32(~(__u32)0); + snprintf((char *) disk->serial, MAX_RAID_SERIAL_LEN, +- "missing:%d", i); ++ "missing:%d", (__u8)i); + } + find_missing(super); + } else { +-- +2.12.2 + diff --git a/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch b/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch new file mode 100644 index 00000000000..3d9d3b90447 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch @@ -0,0 +1,128 @@ +From 09014233bf10900f7bd8390b3b64ff82bca45222 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 19 Apr 2017 12:04:15 -0700 +Subject: [PATCH 5/5] Add a comment to indicate valid fallthrough + +gcc7 warns about code with fallthroughs, this patch adds +the comment to indicate a valid fallthrough, helps gcc7 +compiler warnings + +This works in cross and native compilation case + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + Grow.c | 4 ++++ + bitmap.c | 8 ++++++++ + mdadm.c | 2 ++ + super-intel.c | 1 + + util.c | 1 + + 5 files changed, 16 insertions(+) + +diff --git a/Grow.c b/Grow.c +index 455c5f9..27c73b1 100755 +--- a/Grow.c ++++ b/Grow.c +@@ -1257,6 +1257,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) + switch (info->new_level) { + case 4: + delta_parity = 1; ++ /* fallthrough */ + case 0: + re->level = 4; + re->before.layout = 0; +@@ -1284,10 +1285,12 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) + + case 4: + info->array.layout = ALGORITHM_PARITY_N; ++ /* fallthrough */ + case 5: + switch (info->new_level) { + case 0: + delta_parity = -1; ++ /* fallthrough */ + case 4: + re->level = info->array.level; + re->before.data_disks = info->array.raid_disks - 1; +@@ -1343,6 +1346,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) + case 4: + case 5: + delta_parity = -1; ++ /* fallthrough */ + case 6: + re->level = 6; + re->before.data_disks = info->array.raid_disks - 2; +diff --git a/bitmap.c b/bitmap.c +index ccedfd3..a6ff091 100644 +--- a/bitmap.c ++++ b/bitmap.c +@@ -82,13 +82,21 @@ static inline int count_dirty_bits_byte(char byte, int num_bits) + + switch (num_bits) { /* fall through... */ + case 8: if (byte & 128) num++; ++ /* fallthrough */ + case 7: if (byte & 64) num++; ++ /* fallthrough */ + case 6: if (byte & 32) num++; ++ /* fallthrough */ + case 5: if (byte & 16) num++; ++ /* fallthrough */ + case 4: if (byte & 8) num++; ++ /* fallthrough */ + case 3: if (byte & 4) num++; ++ /* fallthrough */ + case 2: if (byte & 2) num++; ++ /* fallthrough */ + case 1: if (byte & 1) num++; ++ /* fallthrough */ + default: break; + } + +diff --git a/mdadm.c b/mdadm.c +index c3a265b..2d06d3b 100644 +--- a/mdadm.c ++++ b/mdadm.c +@@ -148,6 +148,7 @@ int main(int argc, char *argv[]) + mode == CREATE || mode == GROW || + mode == INCREMENTAL || mode == MANAGE) + break; /* b means bitmap */ ++ /* fallthrough */ + case Brief: + c.brief = 1; + continue; +@@ -828,6 +829,7 @@ int main(int argc, char *argv[]) + + case O(INCREMENTAL,NoDegraded): + pr_err("--no-degraded is deprecated in Incremental mode\n"); ++ /* fallthrough */ + case O(ASSEMBLE,NoDegraded): /* --no-degraded */ + c.runstop = -1; /* --stop isn't allowed for --assemble, + * so we overload slightly */ +diff --git a/super-intel.c b/super-intel.c +index 4e466ff..00a2925 100644 +--- a/super-intel.c ++++ b/super-intel.c +@@ -3271,6 +3271,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info, + << SECT_PER_MB_SHIFT; + } + } ++ /* fallthrough */ + case MIGR_VERIFY: + /* we could emulate the checkpointing of + * 'sync_action=check' migrations, but for now +diff --git a/util.c b/util.c +index 32bd909..f2a4d19 100644 +--- a/util.c ++++ b/util.c +@@ -335,6 +335,7 @@ unsigned long long parse_size(char *size) + switch (*c) { + case 'K': + c++; ++ /* fallthrough */ + default: + s *= 2; + break; +-- +2.12.2 + diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb b/meta/recipes-extended/mdadm/mdadm_4.0.bb index 62614f060f2..98a10a8b15d 100644 --- a/meta/recipes-extended/mdadm/mdadm_4.0.bb +++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb @@ -16,6 +16,11 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \ file://run-ptest \ file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \ file://0001-include-sys-sysmacros.h-for-major-minor-defintions.patch \ + file://0001-mdadm-Add-Wimplicit-fallthrough-0-in-Makefile.patch \ + file://0002-mdadm-Specify-enough-length-when-write-to-buffer.patch \ + file://0003-Replace-snprintf-with-strncpy-at-some-places-to-avoi.patch \ + file://0004-mdadm-Forced-type-conversion-to-avoid-truncation.patch \ + file://0005-Add-a-comment-to-indicate-valid-fallthrough.patch \ " SRC_URI[md5sum] = "2cb4feffea9167ba71b5f346a0c0a40d" SRC_URI[sha256sum] = "1d6ae7f24ced3a0fa7b5613b32f4a589bb4881e3946a5a2c3724056254ada3a9"