* [Buildroot] [PATCH 1/1] perl: Add option to enable threads
@ 2020-01-21 14:09 Clayton Shotwell
2020-01-21 17:49 ` François Perrad
0 siblings, 1 reply; 3+ messages in thread
From: Clayton Shotwell @ 2020-01-21 14:09 UTC (permalink / raw)
To: buildroot
From: Hector Kesari <hector.kesari@rockwellcollins.com>
Add config option for PERL to enable threads usage.
Signed-off-by: Hector Kesari <hector.kesari@rockwellcollins.com>
Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
---
package/perl/Config.in | 9 +++++++++
package/perl/perl.mk | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/package/perl/Config.in b/package/perl/Config.in
index 32a3fd2ee9..7bd644a85d 100644
--- a/package/perl/Config.in
+++ b/package/perl/Config.in
@@ -24,4 +24,13 @@ 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
+
+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
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] perl: Add option to enable threads
2020-01-21 14:09 [Buildroot] [PATCH 1/1] perl: Add option to enable threads Clayton Shotwell
@ 2020-01-21 17:49 ` François Perrad
2020-01-21 19:20 ` Clayton Shotwell
0 siblings, 1 reply; 3+ messages in thread
From: François Perrad @ 2020-01-21 17:49 UTC (permalink / raw)
To: buildroot
Le mar. 21 janv. 2020 ? 15:31, Clayton Shotwell <
clayton.shotwell@rockwellcollins.com> a ?crit :
> From: Hector Kesari <hector.kesari@rockwellcollins.com>
>
> Add config option for PERL to enable threads usage.
>
> Signed-off-by: Hector Kesari <hector.kesari@rockwellcollins.com>
> Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
> ---
> package/perl/Config.in | 9 +++++++++
> package/perl/perl.mk | 4 ++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/package/perl/Config.in b/package/perl/Config.in
> index 32a3fd2ee9..7bd644a85d 100644
> --- a/package/perl/Config.in
> +++ b/package/perl/Config.in
> @@ -24,4 +24,13 @@ 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"
>
The correct spelling is "Perl", not "PERL".
> + depends on BR2_TOOLCHAIN_HAS_THREADS
> + help
> + Enable use of threads in PERL scripts
>
Same, the correct spelling is "Perl".
> +
> +comment "Perl threads need toolchain w/ threads"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS
> +
>
WARNING: The use of interpreter-based threads in perl is officially
discouraged <https://perldoc.perl.org/perlpolicy.html#discouraged>.
see https://perldoc.perl.org/threads.html#WARNING
So, I think that this warning must appear in the help of this new option.
Fran?ois
> 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
> --
> 2.23.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200121/4638b7c7/attachment.html>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] perl: Add option to enable threads
2020-01-21 17:49 ` François Perrad
@ 2020-01-21 19:20 ` Clayton Shotwell
0 siblings, 0 replies; 3+ messages in thread
From: Clayton Shotwell @ 2020-01-21 19:20 UTC (permalink / raw)
To: buildroot
Fran?ois,
On Tue, Jan 21, 2020 at 11:52 AM Fran?ois Perrad
<francois.perrad@gadz.org> wrote:
>
>
>
> Le mar. 21 janv. 2020 ? 15:31, Clayton Shotwell <clayton.shotwell@rockwellcollins.com> a ?crit :
>>
>> From: Hector Kesari <hector.kesari@rockwellcollins.com>
>>
>> Add config option for PERL to enable threads usage.
>>
>> Signed-off-by: Hector Kesari <hector.kesari@rockwellcollins.com>
>> Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
>> ---
>> package/perl/Config.in | 9 +++++++++
>> package/perl/perl.mk | 4 ++++
>> 2 files changed, 13 insertions(+)
>>
>> diff --git a/package/perl/Config.in b/package/perl/Config.in
>> index 32a3fd2ee9..7bd644a85d 100644
>> --- a/package/perl/Config.in
>> +++ b/package/perl/Config.in
>> @@ -24,4 +24,13 @@ 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"
>
>
> The correct spelling is "Perl", not "PERL".
Agreed. I will get that corrected in the next version.
>
>>
>> + depends on BR2_TOOLCHAIN_HAS_THREADS
>> + help
>> + Enable use of threads in PERL scripts
>
>
> Same, the correct spelling is "Perl".
Agreed. I will get that corrected in the next version.
>
>>
>> +
>> +comment "Perl threads need toolchain w/ threads"
>> + depends on !BR2_TOOLCHAIN_HAS_THREADS
>> +
>
>
> WARNING: The use of interpreter-based threads in perl is officially discouraged.
> see https://perldoc.perl.org/threads.html#WARNING
>
> So, I think that this warning must appear in the help of this new option.
Agreed. I can add that verbiage. We are porting some legacy code and
are attempting to not make any changes.
>
> Fran?ois
>
>>
>> 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
>> --
>> 2.23.0
>>
Thank you,
Clayton
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-21 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-21 14:09 [Buildroot] [PATCH 1/1] perl: Add option to enable threads Clayton Shotwell
2020-01-21 17:49 ` François Perrad
2020-01-21 19:20 ` Clayton Shotwell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.