]> Savannah Git Hosting - gnulib.git/commitdiff
Fix link errors on Android 4.3: Limit last change to builds with GCC.
authorBruno Haible <bruno@clisp.org>
Wed, 11 Jan 2023 17:06:09 +0000 (18:06 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 11 Jan 2023 17:10:49 +0000 (18:10 +0100)
ChangeLog
lib/asyncsafe-spin.c
lib/pthread-spin.c
lib/simple-atomic.c

index 4d632915b7f9f9393cc5e8891b74a2da4560c168..9045623e992be8a9aefbe34117531ef8805ffc76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 2023-01-11  Bruno Haible  <bruno@clisp.org>
 
        Fix link errors on Android 4.3.
-       * lib/asyncsafe-spin.c: Don't use the GCC >= 4.1 builtins on Android.
+       * lib/asyncsafe-spin.c: Don't use the GCC >= 4.1 builtins on Android,
+       when building with GCC.
        * lib/pthread-spin.c: Likewise.
        * lib/simple-atomic.c: Likewise.
 
index 66e1669924d5657856fbe733daf70b64dc234cda..9964473828862720c3f97ee9c452a13a26cb582e 100644 (file)
@@ -134,9 +134,9 @@ do_unlock (asyncsafe_spinlock_t *lock)
 #   endif
 
 #  elif (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) \
-          && !defined __sparc__) \
+          && !defined __sparc__ && !defined __ANDROID__) \
          || __clang_major__ >= 3) \
-        && !defined __ibmxl__ && !defined __ANDROID__
+        && !defined __ibmxl__
 /* Use GCC built-ins (available in GCC >= 4.1, except on SPARC, and
    clang >= 3.0).
    Documentation:
index e551f733cfb98addb20cb4cc2189be75b3fe816d..4031975f0beb6091921dfe39d06ac113e76fa915 100644 (file)
@@ -162,9 +162,10 @@ pthread_spin_destroy (pthread_spinlock_t *lock)
   return 0;
 }
 
-# elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) \
+# elif (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) \
+         && !defined __ANDROID__) \
         || __clang_major__ >= 3) \
-       && !defined __ibmxl__ && !defined __ANDROID__
+       && !defined __ibmxl__
 /* Use GCC built-ins (available in GCC >= 4.1 and clang >= 3.0).
    Documentation:
    <https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html>  */
index ffa126613c154dc8a7d46b33cfb2698701bab1ba..eab87a3ec2fe8bac1e1a4dc98db593ab93bc8010 100644 (file)
@@ -67,9 +67,9 @@ atomic_compare_and_swap_ptr (uintptr_t volatile *vp,
    require to link with -latomic.  */
 
 # if (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) \
-       && !defined __sparc__) \
+       && !defined __sparc__ && !defined __ANDROID__) \
       || __clang_major__ >= 3) \
-     && !defined __ibmxl__ && !defined __ANDROID__
+     && !defined __ibmxl__
 /* Use GCC built-ins (available in GCC >= 4.1, except on SPARC, and
    clang >= 3.0).
    Documentation: