Skip to content

Commit

Permalink
Merge pull request grpc#11194 from stanley-cheung/php-fix-ext-cc-comp…
Browse files Browse the repository at this point in the history
…ile-error

PHP: fix pecl extension after cc files are added
  • Loading branch information
stanley-cheung authored May 18, 2017
2 parents eb9b82b + 94d7588 commit de9a107
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions templates/config.m4.template
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit de9a107

Please sign in to comment.