From:
Operating system: Linux (Debian for Sparc)
PHP version: 5.3.3
Package: FPM related
Bug Type: Feature/Change Request
Bug description:fpm_atomic.h uses SPARC v9 only code, doesn't work on v8
Description:
------------
Compiling with PHP-FPM enabled on an older SPARC system will result in
/tmp/cc6w5Fh0.s: Assembler messages:
/tmp/cc6w5Fh0.s:39: Error: Architecture mismatch on "cas".
/tmp/cc6w5Fh0.s:39: (Requires v9|v9a|v9b; requested architecture is
sparclite.)
Unfortunately my knowledge of SPARC assembly language isn't nearly good
enough to fix that. I know that the v9 "cas" opcode does an atomic "compare
and swap" operation but I wouldn't know how to translate that into v8 code.
Test script:
---------------
Copy /sapi/fpm/fpm/fpm_atomic.h to fpm_atomic.c and add bogus main()
function:
int main () {
int result;
atomic_t mylock;
result = fpm_spinlock(&mylock, 1);
}
Compile using "gcc -mcpu=v8 fpm_atomic.c" will result in error message
given.
Expected result:
----------------
Should compile without error.
Actual result:
--------------
sparky:~# gcc -mcpu=v8 fpm_atomic.c
/tmp/cciAbMrC.s: Assembler messages:
/tmp/cciAbMrC.s:121: Error: Architecture mismatch on "cas".
/tmp/cciAbMrC.s:121: (Requires v9|v9a|v9b; requested architecture is
sparclite.)
sparky:~#
--
Edit bug report at http://bugs.php.net/bug.php?id=53310&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53310&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53310&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=53310&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53310&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=53310&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53310&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=53310&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=53310&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=53310&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=53310&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=53310&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=53310&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=53310&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53310&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53310&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53310&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=53310&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=53310&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=53310&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=53310&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=53310&r=mysqlcfg