php: fix C++ link issue
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 17 Nov 2012 12:24:06 +0000 (12:24 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 17 Nov 2012 22:49:16 +0000 (23:49 +0100)
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>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/php/php.mk

index 6ac9f2992e6478116ae8506a2ac15753d892f275..0dfb6db4bf0ef57c0a6ea55c5083858a42d24718 100644 (file)
@@ -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)