Patchwork [08/10] php: fix C++ link issue

login
register
mail settings
Submitter Thomas Petazzoni
Date Nov. 17, 2012, 10:24 p.m.
Message ID <a16e175cd75cefb1127b0deff5ce25e9cf4bb044.1353191025.git.thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/199884/
State Accepted
Headers show

Comments

Thomas Petazzoni - Nov. 17, 2012, 10:24 p.m.
The intl module is implemented in C++, but PHP fails to use g++ as the
compiler for the final link. As a workaround, tell it to link
with libstdc++.

Fixes:

  http://autobuild.buildroot.org/results/13eefdf2121fa1aea7a844bbed8b6cbce3b45996/build-end.log

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/php/php.mk |    4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/package/php/php.mk b/package/php/php.mk
index 6ac9f29..0dfb6db 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -102,6 +102,10 @@  endif
 ifeq ($(BR2_PACKAGE_PHP_EXT_INTL),y)
 	PHP_CONF_OPT += --enable-intl --with-icu-dir=$(STAGING_DIR)/usr
 	PHP_DEPENDENCIES += icu
+	# The intl module is implemented in C++, but PHP fails to use
+	# g++ as the compiler for the final link. As a workaround,
+	# tell it to link libstdc++.
+	PHP_CONF_ENV += EXTRA_LIBS="-lstdc++"
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y)