Re: coming PHP 5.3 and gcc 4 visibility patch

From: Date: Sun, 24 Feb 2008 23:20:01 +0000
Subject: Re: coming PHP 5.3 and gcc 4 visibility patch
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5131@lists.php.net to get a copy of this message
Nuno Lopes wrote: > As some of you may know, PHP 5.3 now supports GCC 4 -fvisibility switch > (http://news.php.net/php.cvs/48158). This feature allows better code > generation (especially when using -fPIC) and smaller binary sizes. > As a con, some extensions (those which export some sort of API) need some > updating, as only core extensions were updated so far. So if your extension > exports some function (usually by defining a EXTNAMEAPI macro in the > php_extname.h file), you may want to update the macro definition to detect > GCC 4. > > e.g.: > #if windows > ... > #elif defined(__GNUC__) && __GNUC__ >= 4 > # define EXTNAMEAPI __attribute__ ((visibility("default"))) > #else > # define EXTNAMEAPI > #endif > > > If you have any question, please ask me. But we are explicitly compiling non-pic wherever we can, so is this really going to give us much? -Rasmus

« previous php.pecl.dev (#5131) next »