Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/acinclude.m4 trunk/acinclude.m4

2011-12-27 Thread Nuno Lopes
Uhm, I don't think this change makes much sense (nor does the previous 
behaviour on Mac)..
Extensions that use C++ should pull in the required libraries themselves. We 
shouldn't be linking PHP everytime with libstdc++ if that is not needed.


Nuno


- Original Message -

bjoriTue, 27 Dec 2011 13:53:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=321435

Log:
Looks like we need to explicity add libstdc++ on recent linux' too, like 
fedora 14 and ubuntu 11

This fixes build failures for ext/intl and several pecl exts

Changed paths:
   U   php/php-src/branches/PHP_5_4/NEWS
   U   php/php-src/branches/PHP_5_4/acinclude.m4
   U   php/php-src/trunk/acinclude.m4

Modified: php/php-src/branches/PHP_5_4/NEWS
===
--- php/php-src/branches/PHP_5_4/NEWS 2011-12-27 11:05:58 UTC (rev 321434)
+++ php/php-src/branches/PHP_5_4/NEWS 2011-12-27 13:53:11 UTC (rev 321435)
@@ -7,6 +7,10 @@
- CLI SAPI:
  . Fixed bug #60591 (Memory leak when access a non-exists file). 
(Laruence)


+- Intl:
+  . Fixed build on Fedora 15 / Ubuntu 11. (Hannes)
+
+
22 Dec 2011, PHP 5.4.0 RC4
- Core:
  . Added max_input_vars directive to prevent attacks based on hash 
collisions


Modified: php/php-src/branches/PHP_5_4/acinclude.m4
===
--- php/php-src/branches/PHP_5_4/acinclude.m4 2011-12-27 11:05:58 UTC (rev 
321434)
+++ php/php-src/branches/PHP_5_4/acinclude.m4 2011-12-27 13:53:11 UTC (rev 
321435)

@@ -762,11 +762,7 @@
  if test -z $php_cxx_done; then
AC_PROG_CXX
AC_PROG_CXXCPP
-case $host_alias in
-  *darwin*)
-PHP_ADD_LIBRARY(stdc++)
-  ;;
-esac
+PHP_ADD_LIBRARY(stdc++)
php_cxx_done=yes
  fi
])

Modified: php/php-src/trunk/acinclude.m4
===
--- php/php-src/trunk/acinclude.m4 2011-12-27 11:05:58 UTC (rev 321434)
+++ php/php-src/trunk/acinclude.m4 2011-12-27 13:53:11 UTC (rev 321435)
@@ -762,11 +762,7 @@
  if test -z $php_cxx_done; then
AC_PROG_CXX
AC_PROG_CXXCPP
-case $host_alias in
-  *darwin*)
-PHP_ADD_LIBRARY(stdc++)
-  ;;
-esac
+PHP_ADD_LIBRARY(stdc++)
php_cxx_done=yes
  fi
])



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/acinclude.m4 trunk/acinclude.m4

2011-12-27 Thread Hannes Magnusson
On Tue, Dec 27, 2011 at 18:02, Nuno Lopes nlop...@php.net wrote:
 Uhm, I don't think this change makes much sense (nor does the previous
 behaviour on Mac)..
 Extensions that use C++ should pull in the required libraries themselves. We
 shouldn't be linking PHP everytime with libstdc++ if that is not needed.

Then what is the idea behind PHP_REQUIRE_CXX?
As I see it, it should pull in everything needed for the extension to use c++.

-Hannes

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/acinclude.m4 trunk/acinclude.m4

2011-12-27 Thread Nuno Lopes

On Tue, Dec 27, 2011 at 18:02, Nuno Lopes nlop...@php.net wrote:

Uhm, I don't think this change makes much sense (nor does the previous
behaviour on Mac)..
Extensions that use C++ should pull in the required libraries themselves. 
We

shouldn't be linking PHP everytime with libstdc++ if that is not needed.


Then what is the idea behind PHP_REQUIRE_CXX?
As I see it, it should pull in everything needed for the extension to use 
c++.


Ah, sorry, I was fooled by your commit message.. I didn't noticed your 
change was in PHP_REQUIRE_CXX.
Anyway, pulling libstdc++ is a bit too gcc centric. If I use, say, clang, 
then I may want to use libc++ instead. The right fix, I believe, is to 
change the link command to use $CXX instead of $CC, since the c++ compiler 
knows which libraries it needs. For example, it seems that PHP_SHARED_MODULE 
is doing the right thing.


Nuno 



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php