From patchwork Tue Jan 21 19:29:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clayton Shotwell X-Patchwork-Id: 1226719 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rockwellcollins.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 482Jgn4xqZz9sRW for ; Wed, 22 Jan 2020 06:36:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C0574848AB; Tue, 21 Jan 2020 19:36:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9P37oahjxEJF; Tue, 21 Jan 2020 19:36:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id BF7EF85D37; Tue, 21 Jan 2020 19:36:31 +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 DC3E91BF575 for ; Tue, 21 Jan 2020 19:36:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D869985B1C for ; Tue, 21 Jan 2020 19:36:30 +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 Og1gdC54GeV4 for ; Tue, 21 Jan 2020 19:36:26 +0000 (UTC) X-Greylist: delayed 00:07:07 by SQLgrey-1.7.6 Received: from ch3vs05.rockwellcollins.com (unknown [205.175.226.130]) by hemlock.osuosl.org (Postfix) with ESMTPS id 761A185656 for ; Tue, 21 Jan 2020 19:36:26 +0000 (UTC) IronPort-SDR: czQeorPgivL2zw1R1OYvw1zNHSaWkC+2AN/y1Glk7kUGqOkg23irtLR+liNbwWsX4V1shuwYi/ m8XAVGk3nUd0Yz8TJweYf3evkQfaB75lchW2qrSFjfjcsg7d3ZU6nBnw9Y7yiuHt8OfdhygmpU 9JZ3MPgpmcDUXRxr3wQW5qoUWrIP2K/LM7hiz7ONKvEUYJwrqCqq0hdg/QB7+yOKNkboM0zHRc y3VJdD57dRWB/hgKr+HQ1Q+CJXvLDjb3+ib3UuGLxCJvkZaBm1VyNBc0+rbvcrvg0eOsRJfKW8 sMo= Received: from ofwch3n02.rockwellcollins.com (HELO crulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs05.rockwellcollins.com with ESMTP; 21 Jan 2020 13:29:18 -0600 X-Received: from righttwix.rockwellcollins.com (righttwix.rockwellcollins.com [192.168.141.218]) by crulimr02.rockwellcollins.com (Postfix) with ESMTP id 49E7D6029B; Tue, 21 Jan 2020 13:29:18 -0600 (CST) From: Clayton Shotwell To: buildroot@buildroot.org Date: Tue, 21 Jan 2020 13:29:16 -0600 Message-Id: <20200121192916.63356-1-clayton.shotwell@rockwellcollins.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/1] perl: Add option to enable threads 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: Hector Kesari , Brandon Maier , Clayton Shotwell Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Hector Kesari Add config option for Perl to enable threads usage. Signed-off-by: Hector Kesari Signed-off-by: Clayton Shotwell --- Changes v1 -> v2: - Changed references of PERL to Perl - Added a warning about using Perl threads --- package/perl/Config.in | 13 +++++++++++++ package/perl/perl.mk | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/package/perl/Config.in b/package/perl/Config.in index 32a3fd2ee9..34b87ee575 100644 --- a/package/perl/Config.in +++ b/package/perl/Config.in @@ -24,4 +24,17 @@ config BR2_PACKAGE_PERL_MODULES Leave empty for all modules (as far as the external libraries are available). +config BR2_PACKAGE_PERL_ENABLE_THREADS + bool "Support for Threads in Perl" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Enable use of threads in Perl scripts + + WARNING: The use of interpreter-based threads in Perl + is officially discouraged. + See https://perldoc.perl.org/threads.html#WARNING + +comment "Perl threads need toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + endif diff --git a/package/perl/perl.mk b/package/perl/perl.mk index 0ab81ddb34..e0bbf9cfd4 100644 --- a/package/perl/perl.mk +++ b/package/perl/perl.mk @@ -62,6 +62,10 @@ ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1) PERL_CONF_OPTS += -Dusedevel endif +ifeq ($(BR2_PACKAGE_PERL_ENABLE_THREADS),y) +PERL_CONF_OPTS += -Dusethreads +endif + ifeq ($(BR2_STATIC_LIBS),y) PERL_CONF_OPTS += --all-static --no-dynaloader endif