From patchwork Wed Jan 22 16:44:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Preston X-Patchwork-Id: 1227353 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 482rqR2r58z9sRG for ; Thu, 23 Jan 2020 03:45:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E96EB87E37; Wed, 22 Jan 2020 16:45:04 +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 CFHZzQHV0nWV; Wed, 22 Jan 2020 16:45:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id EA91A87E40; Wed, 22 Jan 2020 16:45:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 269441BF2F3 for ; Wed, 22 Jan 2020 16:45:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 21C6F86BE1 for ; Wed, 22 Jan 2020 16:45:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4kUSU0YYrgg9 for ; Wed, 22 Jan 2020 16:44:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from imap2.colo.codethink.co.uk (imap2.colo.codethink.co.uk [78.40.148.184]) by whitealder.osuosl.org (Postfix) with ESMTPS id C0FAD86D91 for ; Wed, 22 Jan 2020 16:44:58 +0000 (UTC) Received: from [167.98.27.226] (helo=ts007-build.ts007.codethink.co.uk) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1iuJ7e-0002VP-6Z; Wed, 22 Jan 2020 16:44:54 +0000 From: Thomas Preston To: buildroot@buildroot.org Date: Wed, 22 Jan 2020 16:44:50 +0000 Message-Id: <20200122164450.17963-1-thomas.preston@codethink.co.uk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] libnss: Re-add ZLIB_INCLUDE_DIR varible 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: giulio.benetti@benettiengineering.com, michael.drake@codethink.co.uk, peter@korsgaard.com, Thomas Preston Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The libnss patch adding ZLIB_INCLUDE_DIR is added to upstream on 2020-01-07 but the 3.49.1 release on 2020-01-13 does not contain this patch, so we have actually prematurely removed it from Buildroot. This only affects host-libnss when libzlib is not installed in the host system. When building for the target, the toolchain-wrapper already looks in the target sysroot default include path - where zlib.h is installed. Re-add this patch, so that we can build host-libnss 3.49.1. Signed-off-by: Thomas Preston Reviewed-by: Giulio Benetti --- .../0001-add-zlib-include-dir-variable.patch | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 package/libnss/0001-add-zlib-include-dir-variable.patch diff --git a/package/libnss/0001-add-zlib-include-dir-variable.patch b/package/libnss/0001-add-zlib-include-dir-variable.patch new file mode 100644 index 0000000000..cd0bdeec31 --- /dev/null +++ b/package/libnss/0001-add-zlib-include-dir-variable.patch @@ -0,0 +1,49 @@ +Add ZLIB_INCLUDE_DIR variable + +On Linux platform[1], the build system forces to use zlib from the +system instead of compiling the one located intree. + +The following error is raised when the zlib header is installed +somewhere else than in the default system include path: + + ssl3con.c:39:18: fatal error: zlib.h: No such file or directory + #include "zlib.h" + +The same trick setup for sqlite include directory is reproduced for +zlib. The build system disallows in any manner to give arguments to the +compiler explicity. + +The variable ZLIB_INCLUDE_DIR point to the directory where the zlib +header is located. + +[1]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/coreconf/Linux.mk#l180 +[2]: https://hg.mozilla.org/projects/nss/file/NSS_3_33_BRANCH/lib/softoken/manifest.mn#l17 + +Signed-off-by: Gaƫl PORTAY + +--- libnss-3.33.orig/nss/lib/ssl/manifest.mn 2017-09-20 02:47:27.000000000 -0400 ++++ libnss-3.33/nss/lib/ssl/manifest.mn 2018-02-16 16:45:41.512709898 -0500 +@@ -6,6 +6,10 @@ + + # DEFINES = -DTRACE + ++ifdef ZLIB_INCLUDE_DIR ++INCLUDES += -I$(ZLIB_INCLUDE_DIR) ++endif ++ + EXPORTS = \ + ssl.h \ + sslt.h \ +--- host-libnss-3.33.orig/nss/cmd/signtool/manifest.mn.orig 2018-02-16 17:08:58.474777871 -0500 ++++ host-libnss-3.33/nss/cmd/signtool/manifest.mn 2018-02-16 17:09:22.603710963 -0500 +@@ -6,6 +6,10 @@ + + MODULE = nss + ++ifdef ZLIB_INCLUDE_DIR ++INCLUDES += -I$(ZLIB_INCLUDE_DIR) ++endif ++ + EXPORTS = + + CSRCS = signtool.c \