Browse Source

perl: Provide correct CFLAGS through perlmod.mk

In case threading is enabled, perl is compiled with -D_REENTRANT
and -D_GNU_SOURCE, which, apart from other things, enables usage
of off64_t. As we override module CFLAGS manually, we'll have to
pass that flags as well.

Signed-off-by: Marcel Denia <naoir@gmx.net>
Marcel Denia 10 years ago
parent
commit
7236fe401f
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      lang/perl/perlmod.mk

+ 6
- 1
lang/perl/perlmod.mk View File

@@ -9,6 +9,11 @@ ifneq ($(CONFIG_USE_EGLIBC),)
9 9
 endif
10 10
 PERL_CMD:=$(STAGING_DIR_HOST)/usr/bin/perl5.20.0
11 11
 
12
+MOD_CFLAGS_PERL:=$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
13
+ifdef CONFIG_PERL_THREADS
14
+	MOD_CFLAGS_PERL+= -D_REENTRANT -D_GNU_SOURCE
15
+endif
16
+
12 17
 # Module install prefix
13 18
 PERL_SITELIB:=/usr/lib/perl5/5.20
14 19
 PERL_TESTSDIR:=/usr/share/perl/perl-tests
@@ -54,7 +59,7 @@ define perlmod/Configure
54 59
 		$(1) \
55 60
 		AR=ar \
56 61
 		CC=$(GNU_TARGET_NAME)-gcc \
57
-		CCFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
62
+		CCFLAGS="$(MOD_CFLAGS_PERL)" \
58 63
 		CCCDLFLAGS=-fPIC \
59 64
 		CCDLFLAGS=-Wl,-E \
60 65
 		DLEXT=so \