]> Savannah Git Hosting - gnulib.git/commitdiff
Fix build error when building a shared libunistring on Android.
authorBruno Haible <bruno@clisp.org>
Mon, 28 Jan 2019 20:14:08 +0000 (21:14 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 28 Jan 2019 20:15:11 +0000 (21:15 +0100)
* tests/uninorm/test-nfc.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfd.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfkc.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.
* tests/uninorm/test-nfkd.c (n): Don't define on Android.
(main): Add 'volatile', to defeat a GCC optimization that would
eliminate the reference.

ChangeLog
tests/uninorm/test-nfc.c
tests/uninorm/test-nfd.c
tests/uninorm/test-nfkc.c
tests/uninorm/test-nfkd.c

index a1c1ae90d2fe4448eb7fe0ffa4869d2dd29db62d..89904c0738494050ae4fd5a0ddfaefac6c9e3385 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2019-01-28  Bruno Haible  <bruno@clisp.org>
+
+       Fix build error when building a shared libunistring on Android.
+       * tests/uninorm/test-nfc.c (n): Don't define on Android.
+       (main): Add 'volatile', to defeat a GCC optimization that would
+       eliminate the reference.
+       * tests/uninorm/test-nfd.c (n): Don't define on Android.
+       (main): Add 'volatile', to defeat a GCC optimization that would
+       eliminate the reference.
+       * tests/uninorm/test-nfkc.c (n): Don't define on Android.
+       (main): Add 'volatile', to defeat a GCC optimization that would
+       eliminate the reference.
+       * tests/uninorm/test-nfkd.c (n): Don't define on Android.
+       (main): Add 'volatile', to defeat a GCC optimization that would
+       eliminate the reference.
+
 2019-01-27  Bruno Haible  <bruno@clisp.org>
 
        Avoid build errors due to wrong references between modules.
index b5c4a01a91cfd047d88bb210800b523e39f3d5ce..1bda462d35ed95a3aa45ccec424c8f8bf456e609 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "uninorm.h"
 
-#if !WOE32DLL
+#if !(WOE32DLL || defined __ANDROID__)
 /* Check that UNINORM_NFC is defined and links.  */
 uninorm_t n = UNINORM_NFC;
 #endif
@@ -33,7 +33,7 @@ int
 main ()
 {
   /* Check that UNINORM_NFC is defined and links.  */
-  uninorm_t nf = UNINORM_NFC;
+  volatile uninorm_t nf = UNINORM_NFC;
   (void) nf;
 
   test_u32_nfc ();
index bcb2d02fe1f4c812f90d4aa709df36455f60c565..e2e8b62c078fd8373abe1d912b48645aae707c94 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "uninorm.h"
 
-#if !WOE32DLL
+#if !(WOE32DLL || defined __ANDROID__)
 /* Check that UNINORM_NFD is defined and links.  */
 uninorm_t n = UNINORM_NFD;
 #endif
@@ -33,7 +33,7 @@ int
 main ()
 {
   /* Check that UNINORM_NFD is defined and links.  */
-  uninorm_t nf = UNINORM_NFD;
+  volatile uninorm_t nf = UNINORM_NFD;
   (void) nf;
 
   test_u32_nfd ();
index 6df038d8be0b60181e3c1ec2f346cbb27d78a8c5..7e76fbb95fa7f911c1bea2b50d773d7f0b130eb4 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "uninorm.h"
 
-#if !WOE32DLL
+#if !(WOE32DLL || defined __ANDROID__)
 /* Check that UNINORM_NFKC is defined and links.  */
 uninorm_t n = UNINORM_NFKC;
 #endif
@@ -33,7 +33,7 @@ int
 main ()
 {
   /* Check that UNINORM_NFKC is defined and links.  */
-  uninorm_t nf = UNINORM_NFKC;
+  volatile uninorm_t nf = UNINORM_NFKC;
   (void) nf;
 
   test_u32_nfkc ();
index ad89e2e34b298de74bf1afbfeba90dde44ec854d..501630c583ba96a59a6bccbd5f225631d55aebb9 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "uninorm.h"
 
-#if !WOE32DLL
+#if !(WOE32DLL || defined __ANDROID__)
 /* Check that UNINORM_NFKD is defined and links.  */
 uninorm_t n = UNINORM_NFKD;
 #endif
@@ -33,7 +33,7 @@ int
 main ()
 {
   /* Check that UNINORM_NFKD is defined and links.  */
-  uninorm_t nf = UNINORM_NFKD;
+  volatile uninorm_t nf = UNINORM_NFKD;
   (void) nf;
 
   test_u32_nfkd ();