From 94d75888c9f237dedb559a5e43c6fb4a2b9e137d Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 17 May 2017 14:58:02 -0700 Subject: [PATCH] PHP: fix pecl extension after cc files are added --- config.m4 | 9 +++++---- templates/config.m4.template | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/config.m4 b/config.m4 index cc050ed9b34..7b5cf952222 100644 --- a/config.m4 +++ b/config.m4 @@ -13,9 +13,11 @@ if test "$PHP_GRPC" != "no"; then LIBS="-lpthread $LIBS" + CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11" + CXXFLAGS="-std=c++11" GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" + PHP_REQUIRE_CXX() PHP_ADD_LIBRARY(pthread) - PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(dl) @@ -688,9 +690,8 @@ if test "$PHP_GRPC" != "no"; then third_party/cares/cares/inet_net_pton.c \ third_party/cares/cares/inet_ntop.c \ third_party/cares/cares/windows_port.c \ - , $ext_shared, , -Wall -Werror \ - -Wno-parentheses-equality -Wno-unused-value -std=c11 \ - -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \ + , $ext_shared, , -fvisibility=hidden \ + -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \ -D_HAS_EXCEPTIONS=0 -DNOMINMAX) PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc) diff --git a/templates/config.m4.template b/templates/config.m4.template index 13ff7389e68..8bcbb47319a 100644 --- a/templates/config.m4.template +++ b/templates/config.m4.template @@ -15,9 +15,11 @@ LIBS="-lpthread $LIBS" + CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11" + CXXFLAGS="-std=c++11" GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" + PHP_REQUIRE_CXX() PHP_ADD_LIBRARY(pthread) - PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(dl) @@ -43,9 +45,8 @@ % endfor % endif % endfor - , $ext_shared, , -Wall -Werror ${"\\"} - -Wno-parentheses-equality -Wno-unused-value -std=c11 ${"\\"} - -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN ${"\\"} + , $ext_shared, , -fvisibility=hidden ${"\\"} + -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN ${"\\"} -D_HAS_EXCEPTIONS=0 -DNOMINMAX) PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc)