gettext fails to build on hppa with an undefined reference to
`__sync_val_compare_and_swap_4'. The following allows it to build
but it uses the fallback code that is not threadsafe. okay?
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/gettext/Makefile,v
retrieving revision 1.97
diff -u -p -u -r1.97 Makefile
--- Makefile 7 Oct 2020 21:14:35 -0000 1.97
+++ Makefile 3 Feb 2021 13:21:07 -0000
@@ -5,7 +5,7 @@ COMMENT-textstyle= text styling library
COMMENT-tools= GNU gettext development and translation tools
VERSION= 0.21
-REVISION= 0
+REVISION= 1
DISTNAME= gettext-${VERSION}
PKGNAME-runtime= gettext-runtime-${VERSION}
PKGNAME-textstyle= libtextstyle-${VERSION}
Index: patches/patch-gettext-tools_gnulib-lib_asyncsafe-spin_c
===================================================================
RCS file: patches/patch-gettext-tools_gnulib-lib_asyncsafe-spin_c
diff -N patches/patch-gettext-tools_gnulib-lib_asyncsafe-spin_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-gettext-tools_gnulib-lib_asyncsafe-spin_c 3 Feb 2021
13:21:07 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+- fix undefined reference to `__sync_val_compare_and_swap_4' on hppa
+
+Index: gettext-tools/gnulib-lib/asyncsafe-spin.c
+--- gettext-tools/gnulib-lib/asyncsafe-spin.c.orig
++++ gettext-tools/gnulib-lib/asyncsafe-spin.c
+@@ -129,7 +129,7 @@ do_unlock (asyncsafe_spinlock_t *lock)
+
+ # endif
+
+-# elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && !defined
__ibmxl__
++# elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && !defined
__ibmxl__ && !defined(__hppa__)
+ /* Use GCC built-ins (available in GCC >= 4.1).
+ Documentation:
+ <https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html> */