summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2017-12-04 15:17:59 -0500
committerJoe George <joe@zeroc.com>2017-12-04 15:57:17 -0500
commitd82df170335b313a7b47d63840d20db062497861 (patch)
treef27d77f948058b2115c02e8a4fdfa9f5c359e5b0
parentMissing semicolom (diff)
downloadice-d82df170335b313a7b47d63840d20db062497861.tar.bz2
ice-d82df170335b313a7b47d63840d20db062497861.tar.xz
ice-d82df170335b313a7b47d63840d20db062497861.zip
Fix ICE-8579 - PHP 5.3 build failure with GCC 6
-rw-r--r--php/config/Make.rules6
1 files changed, 6 insertions, 0 deletions
diff --git a/php/config/Make.rules b/php/config/Make.rules
index 531bb70c54b..283be97355d 100644
--- a/php/config/Make.rules
+++ b/php/config/Make.rules
@@ -31,6 +31,12 @@ else
php_cppflags := $(php_cppflags) -DICEPHP_USE_NAMESPACES
endif
+# PHP 5.3 does not compile with C++11 due to an issue with
+# user defined literals. PHP 5.4 and up do not have this issue.
+ifeq ($(shell [ $$($(PHP_CONFIG) --vernum) -lt 50400 ] && echo 0),0)
+ php_cppflags := -std=c++98 $(php_cppflags)
+endif
+
ifeq ($(os),Darwin)
php_ldflags := ${wl}-flat_namespace ${wl}-undefined ${wl}suppress
endif