From patchwork Sun Mar 8 03:21:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1250972 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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=AEI+R3wC; dkim-atps=neutral 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 48ZmqB66zvz9sSH for ; Sun, 8 Mar 2020 14:21:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4ACE188281; Sun, 8 Mar 2020 03:21:40 +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 dWCpbSF4Uo5R; Sun, 8 Mar 2020 03:21:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4D77D88262; Sun, 8 Mar 2020 03:21:39 +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 7DEF91BF37C for ; Sun, 8 Mar 2020 03:21:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C0E4681F33 for ; Sun, 8 Mar 2020 03:21:37 +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 7RTSkjLgNzSE for ; Sun, 8 Mar 2020 03:21:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by hemlock.osuosl.org (Postfix) with ESMTPS id AE27288613 for ; Sun, 8 Mar 2020 03:21:34 +0000 (UTC) Received: by mail-qk1-f177.google.com with SMTP id f3so6215504qkh.1 for ; Sat, 07 Mar 2020 19:21:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=F/yyVZtxAydcGQjpFN6idTrO/JX4ptD9J/YiJOQKYso=; b=AEI+R3wCY/E5YHDUPjgvrRNXUrBML8PnojG0N7ZZdDYVqCLNLZ6UswHu8M+iR7mTF9 zyILGn4KOf0Ex9SSJV5AUHybl6MIbqPZBjGLwwx33OS5hW5H+bXHg2p0o5SeoAZkeO5i /84djoFgd8kWUs86OHxiVz2jS+uQ6QC1Sj8R1uIzNGsGlo//ea2qE6Brd6IR3oZ2kFvA 0iWwqOR/D5HUK6A9z/X2/VV77OMMud0KWOU1FbUMvv0kBN0RPayiC0whxbMJm1Vp0DHf 1kZ5SHrSMsTRF1pTCucIq8imyk3+aS+0Zz78XiV5XOHnlaTy+Fw3v9V2VUauO4Z17Fh7 ReMQ== 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=F/yyVZtxAydcGQjpFN6idTrO/JX4ptD9J/YiJOQKYso=; b=Z+25NpJq9q7aqcL9MXtijd9S05UaB18ts2+FfYvay85IXUeu17uhYteglIH/Tf/WF3 bHF4XRVyKTC8/fwwuBV8uq8zpKmgyyZjXm+NLGioj1J3dHAh451UZ69v3q+RE7Rlw7lQ 7NMol1rHRp+PgsTJmRKh2yh7G6vReS3Eh1CbnaReOVAWlR/mhnLxUmnOwgUnntiKqixB z/cKcGTeYhSJfvPYC9wa9dSJ/468Jx/WruW8QxUpHFOcc8bung9I1K+ZP9MwFXA4o6ht MOnt3ONOuCF5HpIh4kDY9WYi3eX47tD73lbREvI4ijqcB3imwtWqNeBLncKjrrkriRMs yXpg== X-Gm-Message-State: ANhLgQ3grZFmMIAvsz7y97RVrOLKOg1Q4uuVbU5nhEl7XAGn2nw5bdZH QRX52Ce7XJ/cknWwXWfcldgq0Ija X-Google-Smtp-Source: ADFU+vuUz8u+zD2pI4pHMNgArDvtL3xjYBqhUfqI1TwGt/g0vnMHpQZYIEHlXcWb8NXAzASv5XuA7Q== X-Received: by 2002:a37:ac03:: with SMTP id e3mr9750258qkm.173.1583637693271; Sat, 07 Mar 2020 19:21:33 -0800 (PST) Received: from casantos.remote.csb ([187.113.201.123]) by smtp.gmail.com with ESMTPSA id r15sm2303597qtr.40.2020.03.07.19.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Mar 2020 19:21:32 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Sun, 8 Mar 2020 00:21:28 -0300 Message-Id: <20200308032128.306-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.2 Subject: [Buildroot] [PATCH] package/spidermonkey: do not build the JavaScript shell, by default 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: Carlos Santos , Adam Duskett MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Add a configuration to enable the JavaScript shell (default off). So far only libmozjs is required (by polkit) and the shell takes around 24MiB. Signed-off-by: Carlos Santos --- ....in-install-shell-only-if-it-s-built.patch | 28 +++++++++++++++++++ package/spidermonkey/Config.in | 11 ++++++++ package/spidermonkey/spidermonkey.mk | 1 + 3 files changed, 40 insertions(+) create mode 100644 package/spidermonkey/0001-js-src-Makefile.in-install-shell-only-if-it-s-built.patch diff --git a/package/spidermonkey/0001-js-src-Makefile.in-install-shell-only-if-it-s-built.patch b/package/spidermonkey/0001-js-src-Makefile.in-install-shell-only-if-it-s-built.patch new file mode 100644 index 0000000000..f6092af7ef --- /dev/null +++ b/package/spidermonkey/0001-js-src-Makefile.in-install-shell-only-if-it-s-built.patch @@ -0,0 +1,28 @@ +From b5e4a9926cf50d12e9c5c05c6d1b161e5b662d62 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Sat, 7 Mar 2020 23:42:02 -0300 +Subject: [PATCH] js/src/Makefile.in: install shell only if it's built + +Prevents an installation error if we configure with --disable-js-shell. + +Signed-off-by: Carlos Santos +--- + js/src/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/js/src/Makefile.in b/js/src/Makefile.in +index 4ac9f48..9c8fb64 100644 +--- a/js/src/Makefile.in ++++ b/js/src/Makefile.in +@@ -136,7 +136,7 @@ endif + + install:: + $(MAKE) -C build install +- $(MAKE) -C shell install ++ if [ -d shell ]; then $(MAKE) -C shell install; fi + + ifdef HAVE_DTRACE + javascript-trace.h: $(srcdir)/devtools/javascript-trace.d +-- +2.18.2 + diff --git a/package/spidermonkey/Config.in b/package/spidermonkey/Config.in index 5f12110626..e015e84ad2 100644 --- a/package/spidermonkey/Config.in +++ b/package/spidermonkey/Config.in @@ -37,6 +37,17 @@ config BR2_PACKAGE_SPIDERMONKEY https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey +if BR2_PACKAGE_SPIDERMONKEY + +config BR2_PACKAGE_SPIDERMONKEY_JS_SHELL + bool "JS shell" + help + Build the JavaScript shell. + + WARNING: increases target image size by around 24 MiB. + +endif + comment "spidermonkey needs a glibc or musl toolchain with C++, wchar, dynamic library, NPTL, gcc >= 4.9" depends on BR2_USE_MMU depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS diff --git a/package/spidermonkey/spidermonkey.mk b/package/spidermonkey/spidermonkey.mk index 579dc7b864..9bd19b01d1 100644 --- a/package/spidermonkey/spidermonkey.mk +++ b/package/spidermonkey/spidermonkey.mk @@ -30,6 +30,7 @@ SPIDERMONKEY_CONF_OPTS = \ --host=$(GNU_HOST_NAME) \ --target=$(GNU_TARGET_NAME) \ --disable-jemalloc \ + --$(if $(BR2_PACKAGE_SPIDERMONKEY_JS_SHELL),en,dis)able-js-shell \ --enable-shared-js \ --with-system-zlib \ --with-system-nspr \