mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] perl: Make it possible to enable thread support
@ 2014-04-22 20:53 Bernhard Walle
  2014-04-23  7:04 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Walle @ 2014-04-22 20:53 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/perl.in   | 12 ++++++++++--
 rules/perl.make |  4 +++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/rules/perl.in b/rules/perl.in
index 6a226de..4823a3e 100644
--- a/rules/perl.in
+++ b/rules/perl.in
@@ -1,17 +1,25 @@
 ## SECTION=scripting_languages
 
-config PERL
+menuconfig PERL
 	tristate
-	prompt "perl"
+	prompt "perl                          "
 	select LIBC_DL
 	select LIBC_M
 	select LIBC_CRYPT
 	select GCCLIBS_GCC_S
+	select LIBC_PTHREAD	if PERL_THREADS
 	help
 	  Larry Wall's Practical Extraction and Report Language
 	  An interpreted scripting language, known among some as
 	  "Unix's Swiss Army Chainsaw".
 
+if PERL
+
+config PERL_THREADS
+	bool "Enable threads"
+
+endif
+
 menu "perl Extra Modules            "
 source "generated/perl.in"
 endmenu
diff --git a/rules/perl.make b/rules/perl.make
index 86a0ff7..fe09089 100644
--- a/rules/perl.make
+++ b/rules/perl.make
@@ -65,7 +65,9 @@ PERL_CONF_OPT	:= \
 	--prefix=/usr \
 	--host=$(PTXCONF_GNU_TARGET) \
 	--target=$(PTXCONF_GNU_TARGET) \
-	-Dld=$(CROSS_CC)
+	-Dld=$(CROSS_CC) \
+	$(call ptx/ifdef, PTXCONF_PERL_THREADS, -Dusethreads, ) \
+	$(call ptx/ifdef, PTXCONF_PERL_THREADS, -A ldflags=-pthread, )
 
 PERL_MAKE_PAR	:= NO
 
-- 
1.9.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] perl: Make it possible to enable thread support
  2014-04-22 20:53 [ptxdist] [PATCH] perl: Make it possible to enable thread support Bernhard Walle
@ 2014-04-23  7:04 ` Michael Olbrich
  2014-04-23  7:16   ` Bernhard Walle
  2014-04-23  7:16   ` [ptxdist] [PATCH] perl: Enable " Bernhard Walle
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Olbrich @ 2014-04-23  7:04 UTC (permalink / raw)
  To: ptxdist

On Tue, Apr 22, 2014 at 10:53:43PM +0200, Bernhard Walle wrote:
> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
>  rules/perl.in   | 12 ++++++++++--
>  rules/perl.make |  4 +++-
>  2 files changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/rules/perl.in b/rules/perl.in
> index 6a226de..4823a3e 100644
> --- a/rules/perl.in
> +++ b/rules/perl.in
> @@ -1,17 +1,25 @@
>  ## SECTION=scripting_languages
>  
> -config PERL
> +menuconfig PERL
>  	tristate
> -	prompt "perl"
> +	prompt "perl                          "
>  	select LIBC_DL
>  	select LIBC_M
>  	select LIBC_CRYPT
>  	select GCCLIBS_GCC_S
> +	select LIBC_PTHREAD	if PERL_THREADS
>  	help
>  	  Larry Wall's Practical Extraction and Report Language
>  	  An interpreted scripting language, known among some as
>  	  "Unix's Swiss Army Chainsaw".
>  
> +if PERL
> +
> +config PERL_THREADS
> +	bool "Enable threads"
> +
> +endif

As I said, I'm not sure if this should be optional.

> +
>  menu "perl Extra Modules            "
>  source "generated/perl.in"
>  endmenu
> diff --git a/rules/perl.make b/rules/perl.make
> index 86a0ff7..fe09089 100644
> --- a/rules/perl.make
> +++ b/rules/perl.make
> @@ -65,7 +65,9 @@ PERL_CONF_OPT	:= \
>  	--prefix=/usr \
>  	--host=$(PTXCONF_GNU_TARGET) \
>  	--target=$(PTXCONF_GNU_TARGET) \
> -	-Dld=$(CROSS_CC)
> +	-Dld=$(CROSS_CC) \
> +	$(call ptx/ifdef, PTXCONF_PERL_THREADS, -Dusethreads, ) \
> +	$(call ptx/ifdef, PTXCONF_PERL_THREADS, -A ldflags=-pthread, )

You got a link error here because -lpthread is missing, right?

Michael

>  
>  PERL_MAKE_PAR	:= NO
>  
> -- 
> 1.9.1
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] perl: Make it possible to enable thread support
  2014-04-23  7:04 ` Michael Olbrich
@ 2014-04-23  7:16   ` Bernhard Walle
  2014-04-23  7:16   ` [ptxdist] [PATCH] perl: Enable " Bernhard Walle
  1 sibling, 0 replies; 5+ messages in thread
From: Bernhard Walle @ 2014-04-23  7:16 UTC (permalink / raw)
  To: ptxdist

Am 23.04.14 09:04, schrieb Michael Olbrich:
>> --- a/rules/perl.make
>> > +++ b/rules/perl.make
>> > @@ -65,7 +65,9 @@ PERL_CONF_OPT	:= \
>> >  	--prefix=/usr \
>> >  	--host=$(PTXCONF_GNU_TARGET) \
>> >  	--target=$(PTXCONF_GNU_TARGET) \
>> > -	-Dld=$(CROSS_CC)
>> > +	-Dld=$(CROSS_CC) \
>> > +	$(call ptx/ifdef, PTXCONF_PERL_THREADS, -Dusethreads, ) \
>> > +	$(call ptx/ifdef, PTXCONF_PERL_THREADS, -A ldflags=-pthread, )
> You got a link error here because -lpthread is missing, right?

Correct.

Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH] perl: Enable thread support
  2014-04-23  7:04 ` Michael Olbrich
  2014-04-23  7:16   ` Bernhard Walle
@ 2014-04-23  7:16   ` Bernhard Walle
  2014-04-23 12:45     ` Michael Olbrich
  1 sibling, 1 reply; 5+ messages in thread
From: Bernhard Walle @ 2014-04-23  7:16 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/perl.make | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rules/perl.make b/rules/perl.make
index 86a0ff7..6a6ecf2 100644
--- a/rules/perl.make
+++ b/rules/perl.make
@@ -65,7 +65,8 @@ PERL_CONF_OPT	:= \
 	--prefix=/usr \
 	--host=$(PTXCONF_GNU_TARGET) \
 	--target=$(PTXCONF_GNU_TARGET) \
-	-Dld=$(CROSS_CC)
+	-Dld=$(CROSS_CC) \
+	-Dusethreads -A ldflags=-pthread
 
 PERL_MAKE_PAR	:= NO
 
-- 
1.9.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] perl: Enable thread support
  2014-04-23  7:16   ` [ptxdist] [PATCH] perl: Enable " Bernhard Walle
@ 2014-04-23 12:45     ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2014-04-23 12:45 UTC (permalink / raw)
  To: ptxdist

On Wed, Apr 23, 2014 at 09:16:19AM +0200, Bernhard Walle wrote:
> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>

Applied with a followup patch. I found the real issue, that caused the link
errors. I've added a patch instead (it already applied upstream :-)).

Thanks,
Michael

> ---
>  rules/perl.make | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/rules/perl.make b/rules/perl.make
> index 86a0ff7..6a6ecf2 100644
> --- a/rules/perl.make
> +++ b/rules/perl.make
> @@ -65,7 +65,8 @@ PERL_CONF_OPT	:= \
>  	--prefix=/usr \
>  	--host=$(PTXCONF_GNU_TARGET) \
>  	--target=$(PTXCONF_GNU_TARGET) \
> -	-Dld=$(CROSS_CC)
> +	-Dld=$(CROSS_CC) \
> +	-Dusethreads -A ldflags=-pthread
>  
>  PERL_MAKE_PAR	:= NO
>  
> -- 
> 1.9.1
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-23 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 20:53 [ptxdist] [PATCH] perl: Make it possible to enable thread support Bernhard Walle
2014-04-23  7:04 ` Michael Olbrich
2014-04-23  7:16   ` Bernhard Walle
2014-04-23  7:16   ` [ptxdist] [PATCH] perl: Enable " Bernhard Walle
2014-04-23 12:45     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox