From 8f8698ad20e3d305509b8b5510786a6e20d86f32 Mon Sep 17 00:00:00 2001 From: Marcel Denia Date: Mon, 21 Jul 2014 03:16:27 +0200 Subject: [PATCH] lang/perl: Filter -g3 in TARGET_CFLAGS -g3 will make the build fail in Compress-Raw-Zlib with ld: final link failed: Memory exhausted This bug is actually documented[1] and fixed by filtering that flag. Since we're passing CFLAGS manually, we need to do the same to make things work. I suspect that this is actually a linker or library bug, but for now let's just replicate the official fix. [1] https://rt.cpan.org/Public/Bug/Display.html?id=88936 Signed-off-by: Marcel Denia --- lang/perl/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 4fdc6628be..4b07cc947b 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -39,6 +39,9 @@ ifneq ($(CONFIG_USE_EGLIBC),) EXTRA_LIBS:=bsd EXTRA_LIBDIRS:=$(STAGING_DIR)/lib endif +# Filter -g3, it will break Compress-Raw-Zlib +TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS)) +TARGET_CPPFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CPPFLAGS)) include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -72,7 +75,7 @@ endef define Build/Configure sed \ -e 's!%%CC%%!$(TARGET_CC)!g' \ - -e 's!%%CFLAGS%%!$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)!g' \ + -e 's!%%CFLAGS%%!$(TARGET_CFLAGS_PERL) $(TARGET_CPPFLAGS_PERL)!g' \ -e 's!%%CPP%%!$(TARGET_CROSS)gcc -E!g' \ -e 's!%%AR%%!$(TARGET_CROSS)ar!g' \ -e 's!%%LD%%!$(TARGET_CROSS)gcc!g' \