Newsgroups: php.cvs,php.internals Path: news.php.net Xref: news.php.net php.cvs:112457 php.internals:111259 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16705 invoked from network); 30 Jul 2020 13:24:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Jul 2020 13:24:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AE4AD180509; Thu, 30 Jul 2020 05:20:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP; Thu, 30 Jul 2020 05:20:25 -0700 (PDT) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 1F02410C17C; Thu, 30 Jul 2020 13:20:24 +0100 (BST) Date: Thu, 30 Jul 2020 13:20:24 +0100 (BST) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Nikita Popov cc: PHP Developers Mailing List , php-cvs@lists.php.net In-Reply-To: Message-ID: References: User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-CVS] com php-src: Remove PHP_CHECK_GCC_ARG(): UPGRADING.INTERNALS build/php.m4 configure.ac From: derick@php.net (Derick Rethans) Hi Nikita, This is unfortunately a breaking change. In my config.m4 file for Xdebug I have: AC_MSG_CHECKING([Check for supported PHP versions]) PHP_XDEBUG_FOUND_VERSION=`${PHP_CONFIG} --version` PHP_XDEBUG_FOUND_VERNUM=`echo "${PHP_XDEBUG_FOUND_VERSION}" | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 100 + [$]2) * 100 + [$]3;}'` if test "$PHP_XDEBUG_FOUND_VERNUM" -lt "70100"; then AC_MSG_ERROR([not supported. Need a PHP version >= 7.1.0 and < 8.0.0 (found $PHP_XDEBUG_FOUND_VERSION)]) else if test "$PHP_XDEBUG_FOUND_VERNUM" -ge "80000"; then AC_MSG_ERROR([not supported. Need a PHP version >= 7.1.0 and < 8.0.0 (found $PHP_XDEBUG_FOUND_VERSION)]) else AC_MSG_RESULT([supported ($PHP_XDEBUG_FOUND_VERSION)]) fi fi That makes sure that Xdebug 2.9.x can't be compiled with PHP 8, but with a user friendly error. The change that you've made with this commit means that compiling this unsupported version with PHP 8 instead of a user friendly message, shows a hard to explain/google error upon phpize: checking whether to enable Xdebug developer build flags... no /tmp/pear/temp/xdebug/configure: line 4459: syntax error near unexpected token `-Wbool-conversion,' /tmp/pear/temp/xdebug/configure: line 4459: ` PHP_CHECK_GCC_ARG(-Wbool-conversion, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wbool-conversion")' ERROR: `/tmp/pear/temp/xdebug/configure --with-php-config=/usr/local/php/master/bin/php-config' failed Would it perhaps to be wise to leave this change until 8.1, and have it throw a deprecation warning in PHP 8.0.x instead? It's not like keeping this around for another year is going to hurt us much. cheers, Derick On Wed, 29 Jul 2020, Nikita Popov wrote: > Commit: e2f39f84e2366bb9aee16fe248aad893c0aa6380 > Author: Nikita Popov Wed, 29 Jul 2020 12:45:26 +0200 > Parents: 3a29da022b80c8468ea0f14402b23d716cb37775 > Branches: master > > Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e2f39f84e2366bb9aee16fe248aad893c0aa6380 > > Log: > Remove PHP_CHECK_GCC_ARG() > > In favor of AX_CHECK_COMPILE_FLAG(), which we bundle since at least > PHP 7. > > Closes GH-5904. > > Changed paths: > M UPGRADING.INTERNALS > M build/php.m4 > M configure.ac > > > Diff: > diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS > index bec30c8314..6985650801 100644 > --- a/UPGRADING.INTERNALS > +++ b/UPGRADING.INTERNALS > @@ -214,7 +214,11 @@ PHP 8.0 INTERNALS UPGRADE NOTES > b. Unix build system changes > > 1. --enable-maintainer-zts is renamed --enable-zts for parity with Windows > - and as recognition that ZTS is not a "maintainer" or experimental feature. > + and as recognition that ZTS is not a "maintainer" or experimental > + feature. > + > + 2. The PHP_CHECK_GCC_ARG() m4 macro has been removed in favor of > + AX_CHECK_COMPILE_FLAG(). > > c. Windows build system changes > > diff --git a/build/php.m4 b/build/php.m4 > index a5b18c15aa..bdc02573ac 100644 > --- a/build/php.m4 > +++ b/build/php.m4 > @@ -305,30 +305,6 @@ fi > ]) > > dnl > -dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found) > -dnl > -AC_DEFUN([PHP_CHECK_GCC_ARG],[ > - gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z=-,a-z__) > - AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z=-,a-z__), [ > - echo 'void somefunc() { };' > conftest.c > - cmd='$CC $1 -c conftest.c' > - if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then > - ac_result=no > - else > - ac_result=yes > - fi > - eval $gcc_arg_name=$ac_result > - rm -f conftest.* > - ]) > - if eval test "\$$gcc_arg_name" = "yes"; then > - $2 > - else > - : > - $3 > - fi > -]) > - > -dnl > dnl PHP_LIBGCC_LIBPATH(gcc) > dnl > dnl Stores the location of libgcc in libgcc_libpath. > diff --git a/configure.ac b/configure.ac > index 3e438c5fef..45614f8581 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -224,10 +224,8 @@ case $host_alias in > ;; > *darwin*) > if test -n "$GCC"; then > - PHP_CHECK_GCC_ARG(-no-cpp-precomp, gcc_no_cpp_precomp=yes) > - if test "$gcc_no_cpp_precomp" = "yes"; then > - CPPFLAGS="$CPPFLAGS -no-cpp-precomp" > - fi > + AX_CHECK_COMPILE_FLAG([-no-cpp-precomp], > + [CPPFLAGS="$CPPFLAGS -no-cpp-precomp"]) > fi > ;; > *mips*) > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP 7.4 Release Manager Host of PHP Internals News: https://phpinternals.news Like Xdebug? Consider supporting me: https://xdebug.org/support https://derickrethans.nl | https://xdebug.org | https://dram.io twitter: @derickr and @xdebug