perl: handle BR2_PREFER_STATIC_LIB
authorFrancois Perrad <fperrad@gmail.com>
Sun, 27 Jul 2014 16:34:37 +0000 (18:34 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 28 Jul 2014 20:29:09 +0000 (22:29 +0200)
[Thomas: fix commit title, use one line for both CONF_OPT options.]

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
package/perl/perl.mk

index d4ef081f52f6eebabaca3f5e94ade5709d6ff04c..258495c76a613d6b9d445c8ae74333e93d87bf5a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -579,6 +579,7 @@ endif
        rm -rf $(TARGET_DIR)/usr/lib/luarocks
        rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
        rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE
+       find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f
        find $(TARGET_DIR)/usr/lib/perl5/ -name '*.bs' -print0 | xargs -0 rm -f
        find $(TARGET_DIR)/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f
        $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true
index 8321570fad3cc801f38128d5ff5bf69fb227a6b3..e4aad7f6c5c874bc926698fe6362841fb7357c03 100644 (file)
@@ -69,6 +69,10 @@ ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
     PERL_CONF_OPT += -Dusedevel
 endif
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+    PERL_CONF_OPT += --all-static --no-dynaloader
+endif
+
 ifneq ($(BR2_LARGEFILE),y)
     PERL_CONF_OPT += -Uuselargefiles
 endif