Commit 197aad73 authored by NIIBE Yutaka's avatar NIIBE Yutaka

New patch: debian/patches/41_link_libatomic.patch

parent 07d69621
Index: gauche/configure.ac
===================================================================
--- gauche.orig/configure.ac
+++ gauche/configure.ac
@@ -304,10 +304,12 @@ AS_IF([test x"$with_libatomic_ops" = xno
# even if we don't use libatomic_ops, since some of Gauche code still refers
# to AO_t etc.
need_atomic_ops_cflags=no
+need_libatomic_link=none
AC_MSG_CHECKING([which libatomic_ops to use])
AS_IF([test x"$with_libatomic_ops" != xno],
[ AS_IF([test x"$GAUCHE_THREAD_TYPE" != xnone],
- [ AC_MSG_RESULT([external]) ],
+ [ AC_MSG_RESULT([external])
+ need_libatomic_link=external ],
[ AC_MSG_RESULT([none]) ])
need_atomic_ops_cflags=yes ],
[ AC_MSG_RESULT([internal])
@@ -315,10 +317,25 @@ AS_IF([test x"$with_libatomic_ops" != xn
if test "$need_atomic_ops_cflags" = yes; then
ATOMIC_OPS_CFLAGS='-I$(top_builddir)/gc/libatomic_ops/src -I$(top_srcdir)/gc/libatomic_ops/src'
- ATOMIC_OPS_LIBS=""
AC_SUBST([ATOMIC_OPS_CFLAGS])
fi
+if test "$need_libatomic_link" = external; then
+ case $host in
+ armhf-*|hppa-*|sh4-*)
+ need_libatomic_link=yes
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+if test "$need_libatomic_link" = yes; then
+ ATOMIC_OPS_LIBS="-latomic"
+else
+ ATOMIC_OPS_LIBS=""
+fi
+
AM_CONDITIONAL([USE_INTERNAL_LIBATOMIC_OPS],
[test x$with_libatomic_ops = xno -a x"$GAUCHE_THREAD_TYPE" != xnone])
AM_CONDITIONAL([NEED_ATOMIC_OPS_ASM],
......@@ -17,3 +17,4 @@
39_net_test.patch
# 42_hppa_libatomic_ops.patch
40_tls_test_localhost.patch
41_link_libatomic.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment