summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-04-22 17:24:41 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-04-23 14:34:15 +0200
commit59e84e62ca4df6e6609ca02bfdc02a5c0ee7536b (patch)
tree223d258423f59489cd421920b2fc39887f78a696
parent2b55899ec78538c27004c8d0f0531f1ddeb1cfcb (diff)
downloadptxdist-59e84e62ca4df6e6609ca02bfdc02a5c0ee7536b.tar.gz
ptxdist-59e84e62ca4df6e6609ca02bfdc02a5c0ee7536b.tar.xz
perl: cleanup thread handling
* add a patch to fix linking correctly (already applied upstream) * add libc dependency Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch23
-rw-r--r--patches/perl-5.18.2/series4
-rw-r--r--rules/perl.in1
-rw-r--r--rules/perl.make3
4 files changed, 30 insertions, 1 deletions
diff --git a/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch b/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
new file mode 100644
index 000000000..319cefb2e
--- /dev/null
+++ b/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
@@ -0,0 +1,23 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Wed, 23 Apr 2014 09:02:25 +0200
+Subject: [PATCH] It's -lpthread not -lpthreads
+
+Otherwise linking fails with missing pthread symbols when building with
+with -Dusethreads
+---
+ cnf/configure_libs.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cnf/configure_libs.sh b/cnf/configure_libs.sh
+index f45d31c..cca73e5 100644
+--- a/cnf/configure_libs.sh
++++ b/cnf/configure_libs.sh
+@@ -53,7 +53,7 @@ if not hinted 'perllibs'; then
+ appendvar '_libs' "$i" ;;
+ -ldl)
+ test "$usedl" != 'undef' && appendvar '_libs' "$i" ;;
+- -lpthreads)
++ -lpthread)
+ test "$usethreads" != 'undef' && appendvar '_libs' "$i" ;;
+ # For a static build, -lgdbm and friends are assumed to be in ext.libs
+ esac
diff --git a/patches/perl-5.18.2/series b/patches/perl-5.18.2/series
new file mode 100644
index 000000000..dbf4b587d
--- /dev/null
+++ b/patches/perl-5.18.2/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-It-s-lpthread-not-lpthreads.patch
+# 82701174c686d625c466a538b4d64ece - git-ptx-patches magic
diff --git a/rules/perl.in b/rules/perl.in
index 6a226de58..3fec7e585 100644
--- a/rules/perl.in
+++ b/rules/perl.in
@@ -6,6 +6,7 @@ config PERL
select LIBC_DL
select LIBC_M
select LIBC_CRYPT
+ select LIBC_PTHREAD
select GCCLIBS_GCC_S
help
Larry Wall's Practical Extraction and Report Language
diff --git a/rules/perl.make b/rules/perl.make
index 6a6ecf247..bd5bf0dd9 100644
--- a/rules/perl.make
+++ b/rules/perl.make
@@ -50,6 +50,7 @@ $(STATEDIR)/perl.extract:
@$(call clean, $(PERL_DIR))
@$(call extract, PERL)
@$(call extract, PERLCROSS)
+ @$(call patchin, PERL)
@$(call touch)
# ----------------------------------------------------------------------------
@@ -66,7 +67,7 @@ PERL_CONF_OPT := \
--host=$(PTXCONF_GNU_TARGET) \
--target=$(PTXCONF_GNU_TARGET) \
-Dld=$(CROSS_CC) \
- -Dusethreads -A ldflags=-pthread
+ -Dusethreads
PERL_MAKE_PAR := NO