Source: libatomic-ops
Version: 7.4.2-3
Severity: wishlist
Tags: patch fixed-upstream
User: [email protected]
Usertags: rebootstrap
Forwarded:
https://github.com/ivmai/libatomic_ops/commit/04a286421802a503b58d804d0d673dd5a28c9e9b
While bootstrapping the tilegx architecture for Debian, I noticed that
libatomic-ops lacks support for tilegx. Gladly, gcc-6 provides working
atomics, so the implementation on behalf of libatomic-ops is simple.
The issue is fixed properly in upstream git, see forwarded address
above. Updating to libatomic-ops 7.4.4 is insufficient. No released
version seems to ship the commit yet.
It can either be fixed by updating the package to git or by temporarily
applying the attached simplified patch. In the latter case, #821068 also
needs to be fixed, because the patch touches Makefile.am.
Helmut
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -82,6 +82,7 @@
atomic_ops/sysdeps/gcc/s390.h \
atomic_ops/sysdeps/gcc/sh.h \
atomic_ops/sysdeps/gcc/sparc.h \
+ atomic_ops/sysdeps/gcc/tilegx.h \
atomic_ops/sysdeps/gcc/x86.h \
\
atomic_ops/sysdeps/hpc/hppa.h \
--- a/src/atomic_ops.h
+++ b/src/atomic_ops.h
@@ -291,6 +291,9 @@
# if defined(__hexagon__)
# include "atomic_ops/sysdeps/gcc/hexagon.h"
# endif
+# if defined(__tilegx__)
+# include "atomic_ops/sysdeps/gcc/tilegx.h"
+# endif /* __tilegx__ */
#endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
#if (defined(__IBMC__) || defined(__IBMCPP__)) && !defined(__GNUC__) \
--- /dev/null
+++ b/src/atomic_ops/sysdeps/gcc/tilegx.h
@@ -0,0 +1,3 @@
+#include "../test_and_set_t_is_ao_t.h"
+#include "generic.h"
+#define AO_T_IS_INT