php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52407
Patch fpm-gcc-atomics.patch revision 2010-07-28 21:31 UTC by geissert@php.net
Patch fpm_atomic_h_fix.patch revision 2010-07-24 12:36 UTC by fat@php.net
revision 2010-07-22 15:20 UTC by eugenesan at gmail dot com

Patch fpm_atomic_h_fix.patch for Compile Failure Bug #52407

Patch version 2010-07-24 12:36 UTC

Return to Bug #52407 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2010-07-24 12:36 UTC | 2010-07-22 15:20 UTC

Developer: fat@php.net


 --- php.orig/sapi/fpm/fpm/fpm_atomic.h	2010-07-13 09:02:20.000000000 +0300
 +++ php/fpm/fpm/fpm_atomic.h	2010-07-13 16:27:37.143621901 +0300
 @@ -65,9 +65,7 @@
 Index: sapi/fpm/fpm/fpm_atomic.h
 ===================================================================
 
 +++ sapi/fpm/fpm/fpm_atomic.h	(copie de travail)
 @@ -65,10 +65,9 @@
   }
   /* }}} */
   
  -#if (__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
 -
 +#elif ( __arm__ || __arm )/* W-Mark Kubacki */
 +#if ( (__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ > 2) )/* W-Mark Kubacki */
  
  -#elif ( __arm__ || __arm ) /* W-Mark Kubacki */
 +#elif ( (__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ > 2) && ( __arm__ || __arm ) )/* W-Mark Kubacki */
  
  #if (__arch64__ || __arch64)
 -
  #if (__arch64__ || __arch64)
   typedef int64_t                     atomic_int_t;
 @@ -77,9 +75,9 @@
  typedef uint64_t                    atomic_uint_t;
 @@ -77,10 +76,16 @@
   typedef uint32_t                    atomic_uint_t;
   #endif
   
 -#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
  +typedef volatile atomic_uint_t      atomic_t;
 +
  #define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
   
 -#endif /* defined (__GNUC__) &&... */
 +#define atomic_cmp_set(a,b,c) __sync_bool_compare_and_swap(a,b,c)
  
 -#endif /* defined (__GNUC__) &&... */
 +#else /* if ( (__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ > 2) ) */
  
 +#error FPM on ARM arch only support GNU GCC > 4.2. please write a patch and send it to me
 +
 +#endif
 +
   #elif ( __sparc__ || __sparc ) /* Marcin Ochab */
  
  #if (__arch64__ || __arch64)
 @@ -100,7 +105,7 @@
  	return (atomic_cas_64(lock, old, set)==old);
  }
  /* }}} */
 -#else
 +#else /* if (__arch64__ || __arch64) */
  typedef uint32_t                    atomic_uint_t;
  typedef volatile atomic_uint_t      atomic_t;
  
 @@ -117,7 +122,7 @@
  	return (atomic_cas_32(lock, old, set)==old);
  }
  /* }}} */
 -#endif
 +#endif /* if (__arch64__ || __arch64) */
  
  #else
   
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 28 16:01:26 2020 UTC