]> Savannah Git Hosting - gnulib.git/commitdiff
Fix link errors on Android 4.3.
authorBruno Haible <bruno@clisp.org>
Wed, 11 Jan 2023 09:50:41 +0000 (10:50 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 14 Jan 2023 20:28:15 +0000 (21:28 +0100)
* 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.

ChangeLog
lib/asyncsafe-spin.c
lib/pthread-spin.c
lib/simple-atomic.c

index 88ae4120ee008e5787b9c3220d3baee447cb56aa..f6df46ab862150e35f663a0c6042bdac3a66f02c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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,
+       when building with GCC.
+       * lib/pthread-spin.c: Likewise.
+       * lib/simple-atomic.c: Likewise.
+
 2023-01-10  Bruno Haible  <bruno@clisp.org>
 
        memset_explicit tests: Fix signature check.
index 7a74c32077071177b54109ebf521189a10755c29..9964473828862720c3f97ee9c452a13a26cb582e 100644 (file)
@@ -134,7 +134,7 @@ 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__
 /* Use GCC built-ins (available in GCC >= 4.1, except on SPARC, and
index ca3e88755a6070137d7eb3decd9aa6501600d5c2..4031975f0beb6091921dfe39d06ac113e76fa915 100644 (file)
@@ -162,7 +162,8 @@ 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__
 /* Use GCC built-ins (available in GCC >= 4.1 and clang >= 3.0).
index 4e52447ed6697964f803b0c43b97fef80629bf8b..eab87a3ec2fe8bac1e1a4dc98db593ab93bc8010 100644 (file)
@@ -67,7 +67,7 @@ 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__
 /* Use GCC built-ins (available in GCC >= 4.1, except on SPARC, and