From patchwork Thu Feb 27 11:02:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1245727 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=benettiengineering.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=Ax9K7LrZ; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48SqX21vtRz9sPK for ; Thu, 27 Feb 2020 22:02:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 90D9322CCE; Thu, 27 Feb 2020 11:02:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O8YpjRHYDlVU; Thu, 27 Feb 2020 11:02:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A999A20428; Thu, 27 Feb 2020 11:02:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 8C8A91BF869 for ; Thu, 27 Feb 2020 11:02:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8915687D33 for ; Thu, 27 Feb 2020 11:02:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9+2Y22d59pBB for ; Thu, 27 Feb 2020 11:02:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtpcmd02101.aruba.it (smtpcmd02101.aruba.it [62.149.158.101]) by hemlock.osuosl.org (Postfix) with ESMTP id 716F787C9F for ; Thu, 27 Feb 2020 11:02:45 +0000 (UTC) Received: from ubuntu.localdomain ([146.241.70.103]) by smtpcmd02.ad.aruba.it with bizsmtp id 7n2h2200y2DhmGq01n2in1; Thu, 27 Feb 2020 12:02:43 +0100 From: Giulio Benetti To: buildroot@buildroot.org Date: Thu, 27 Feb 2020 12:02:40 +0100 Message-Id: <20200227110240.14937-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aruba.it; s=a1; t=1582801363; bh=q+6F8RmgiDM+gzaxIEcixrGWe4vK9jvOOb8gJUxhEw0=; h=From:To:Subject:Date:MIME-Version; b=Ax9K7LrZQ40TG/x9hdk699RIvcvR9wUuAqu1MYOqKT/wkEr3PJTkrScu1qF6BU7C2 KLWvVS+x4fkspQJdCfjH8Do2HHMD51uCjzxYgpcF26pUB8nrPG6X5nfkBkJGh3lBZ4 jWsU07Wm1vC2GrLtIeyUFtvUN5N1MgbYSiGUGV1MA//Yabk0BylhcIlu6uxGVwFXgD dNYC7GZGnzk+8DaWi7cse5EZFh9YyB1TxfEHDsEd1ORaY8WIaTWPIHgcaJCiq6ZrQH 4bEOurhJ5MdraRs/gOog+E7C7MWM2MeozpYCSjqOQ1hzybEFpoPOoeVQoX3jqxezK5 uO0YzepM+baOA== Subject: [Buildroot] [PATCH v2] package/libnss: fix PowerPc build failure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joseph Kogut , Giulio Benetti Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" NSS assumes is always present but that's not true, so add a patch to check if it exists or not. Signed-off-by: Giulio Benetti --- V1->V2: * improve patch according to upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1614183 --- ...heck-if-PPC-__has_include-sys-auxv.h.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/libnss/0001-Bug-1614183-Check-if-PPC-__has_include-sys-auxv.h.patch diff --git a/package/libnss/0001-Bug-1614183-Check-if-PPC-__has_include-sys-auxv.h.patch b/package/libnss/0001-Bug-1614183-Check-if-PPC-__has_include-sys-auxv.h.patch new file mode 100644 index 0000000000..1325387760 --- /dev/null +++ b/package/libnss/0001-Bug-1614183-Check-if-PPC-__has_include-sys-auxv.h.patch @@ -0,0 +1,51 @@ +From d9c7cbb3660d8a2da9ce42e4d1b58642a256a91a Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Sun, 9 Feb 2020 10:15:16 +0100 +Subject: [PATCH] Bug 1614183 - Check if PPC __has_include() + +Some build environment doesn't provide and this causes +build failure, so let's check if that header exists by using +__has_include() helper. + +Signed-off-by: Giulio Benetti +--- + nss/lib/freebl/blinit.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/nss/lib/freebl/blinit.c b/nss/lib/freebl/blinit.c +index 7e8adfc64..d4921aaee 100644 +--- a/nss/lib/freebl/blinit.c ++++ b/nss/lib/freebl/blinit.c +@@ -431,8 +431,14 @@ ppc_crypto_support() + + #if defined(__powerpc__) + ++#ifndef __has_include ++#define __has_include(x) 0 ++#endif ++ + #if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD__ >= 12) ++#if __has_include() + #include ++#endif + #elif (defined(__FreeBSD__) && __FreeBSD__ < 12) + #include + #endif +@@ -449,10 +455,14 @@ CheckPPCSupport() + + unsigned long hwcaps = 0; + #if defined(__linux__) ++#if __has_include() + hwcaps = getauxval(AT_HWCAP2); ++#endif + #elif defined(__FreeBSD__) + #if __FreeBSD__ >= 12 ++#if __has_include() + elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps)); ++#endif + #else + size_t len = sizeof(hwcaps); + sysctlbyname("hw.cpu_features2", &hwcaps, &len, NULL, 0); +-- +2.20.1 +