|
@@ -44,6 +44,20 @@ endif
|
44
|
44
|
TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS))
|
45
|
45
|
TARGET_CPPFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CPPFLAGS))
|
46
|
46
|
|
|
47
|
+# Handle threading
|
|
48
|
+ifdef CONFIG_PERL_THREADS
|
|
49
|
+ PERL_CONFIG_SUFFIX:=-mt
|
|
50
|
+
|
|
51
|
+ # uclibc doesn't provide crypt_r(). Enable crypt() usage for glibc builds only
|
|
52
|
+ ifdef CONFIG_USE_EGLIBC
|
|
53
|
+ CRYPT_R_PROTO:=REENTRANT_PROTO_B_CCS
|
|
54
|
+ CRYPT:=define
|
|
55
|
+ else
|
|
56
|
+ CRYPT_R_PROTO:=0
|
|
57
|
+ CRYPT:=undef
|
|
58
|
+ endif
|
|
59
|
+endif
|
|
60
|
+
|
47
|
61
|
# A list of disabled testss
|
48
|
62
|
# ExtUtils tests are disabled for now as we don't support building
|
49
|
63
|
# native extensions on the target machine at the moment
|
|
@@ -64,7 +78,7 @@ define Package/perl
|
64
|
78
|
CATEGORY:=Languages
|
65
|
79
|
TITLE:=The Perl intepreter
|
66
|
80
|
URL:=http://www.perl.com/
|
67
|
|
- DEPENDS:=+USE_EGLIBC:libbsd
|
|
81
|
+ DEPENDS:=+USE_EGLIBC:libbsd +PERL_THREADS:libpthread
|
68
|
82
|
endef
|
69
|
83
|
|
70
|
84
|
define Package/perl/description
|
|
@@ -108,8 +122,10 @@ define Build/Configure
|
108
|
122
|
-e 's!%%EXTRA_PERLLIBDIRS%%!$(EXTRA_LIBDIRS:%=-L%)!g' \
|
109
|
123
|
-e 's!%%IPV6%%!$(if $($(CONFIG_IPV6)),define,undef)!g' \
|
110
|
124
|
-e 's!%%HOSTMINIPERL%%!$(HOST_PERL_PREFIX)/bin/perl!g' \
|
|
125
|
+ -e 's!%%CRYPT_R_PROTO%%!$(CRYPT_R_PROTO)!g' \
|
|
126
|
+ -e 's!%%CRYPT%%!$(CRYPT)!g' \
|
111
|
127
|
-e 's!%%HOSTGENERATE%%!$(HOST_PERL_PREFIX)/bin/generate_uudmap!g' \
|
112
|
|
- files/config.sh-$(patsubst i386,i486,$(ARCH)).in \
|
|
128
|
+ files/config.sh-$(patsubst i386,i486,$(ARCH))$(PERL_CONFIG_SUFFIX).in \
|
113
|
129
|
> $(PKG_BUILD_DIR)/config.sh
|
114
|
130
|
(cd $(PKG_BUILD_DIR) && ./Configure -S)
|
115
|
131
|
install -m 0644 $(PKG_BUILD_DIR)/config.h $(PKG_BUILD_DIR)/xconfig.h
|