Hi,

I had tested these changes.

+# elif defined(__ATOMIC_SEQ_CST) /* GCC atomic builtins */
+#  define GRN_ATOMIC_ADD_EX(p,i,r) \
+  (r = __atomic_fetch_add(p, i, __ATOMIC_SEQ_CST))

It solves issue:
> ../../lib/.libs/libgroonga.so: undefined reference to `GRN_ATOMIC_ADD_EX'



Functions  __atomic_load_8 and __atomic_store_8 are implemented in
library libatomic, and GCC added support for libatomic starting from version 
4.8.
To get rid error:
> ../../lib/.libs/libgroonga.so: undefined reference to `__atomic_store_8'

it is needed to use -latomic  during linking.


The patch is attached.

With both stated changes
I was able to build groonga for mips and mipsel.



Regards,
Dejan.
diff -uNr groonga-4.0.6.1.orig/debian/rules groonga-4.0.6.1/debian/rules
--- groonga-4.0.6.1.orig/debian/rules	2014-10-15 13:23:57.000000000 +0000
+++ groonga-4.0.6.1/debian/rules	2015-02-27 16:29:57.000000000 +0000
@@ -15,7 +15,7 @@
 	dh $@
 
 override_dh_auto_configure:
-	dh_auto_configure -- --with-munin-plugins
+	dh_auto_configure -- --with-munin-plugins LIBS="-latomic"
 
 # disable 'make check'.
 override_dh_auto_test:

Reply via email to