|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesprevent_membar_producer_gcc.4.1.2.patch (last revision 2011-05-20 19:47 UTC by mhei at heimpold dot de)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-05-20 21:48 UTC] mhei at heimpold dot de
[2011-05-20 23:24 UTC] felipe@php.net
[2011-05-20 23:25 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
[2011-05-20 23:25 UTC] felipe@php.net
[2012-04-18 09:50 UTC] laruence@php.net
[2012-07-24 23:41 UTC] rasmus@php.net
[2013-11-17 09:38 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
Description: ------------ When compiling the latest php version 5.3.6 with OpenWRT backfire branch, the build fails: -snip- ext/standard/php_crypt_r.o: In function `_crypt_extended_init_r': php_crypt_r.c:(.text+0x4c1): undefined reference to `membar_producer' php_crypt_r.c:(.text+0x4cf): undefined reference to `atomic_add_int' collect2: ld returned 1 exit status make[3]: *** [sapi/cli/php] Error 1 -snap- When looking into the source file I'm wondering whether the second code path with __sync_fetch_and_add could not be used. -snip- #ifdef PHP_WIN32 InterlockedIncrement(&initialized); #elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)) __sync_fetch_and_add(&initialized, 1); #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ membar_producer(); atomic_add_int(&initialized, 1); #endif -snap- As gcc compiler version 4.1.2 has support for this function (see http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html) I suggest the attached patch to lower the GNUC_MINOR test. Expected result: ---------------- The build completes as the gcc provided function is used.