1 From ths@networkno.de Thu Oct 27 15:44:14 2005
2 Received: (at submit) by bugs.debian.org; 27 Oct 2005 22:44:14 +0000
3 Return-path: <ths@networkno.de>
4 Received: from mx02.qsc.de [213.148.130.14]
5 by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
6 id 1EVGTm-0002nQ-00; Thu, 27 Oct 2005 15:44:14 -0700
7 Received: from port-195-158-169-21.dynamic.qsc.de ([195.158.169.21] helo=hattusa.textio)
8 by mx02.qsc.de with esmtp (Exim 3.35 #1)
10 for submit@bugs.debian.org; Fri, 28 Oct 2005 00:43:43 +0200
11 Received: from ths by hattusa.textio with local (Exim 4.54)
13 for submit@bugs.debian.org; Fri, 28 Oct 2005 00:43:42 +0200
14 Date: Fri, 28 Oct 2005 00:43:42 +0200
15 To: submit@bugs.debian.org
16 Subject: [mips/mipsel] FTBFS due to missing arch-specific implementation
17 Message-ID: <20051027224341.GX5721@hattusa.textio>
19 Content-Type: text/plain; charset=us-ascii
20 Content-Disposition: inline
21 User-Agent: Mutt/1.5.11
22 From: Thiemo Seufer <ths@networkno.de>
23 Delivered-To: submit@bugs.debian.org
24 X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
25 (1.212-2003-09-23-exp) on spohr.debian.org
27 X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
28 autolearn=no version=2.60-bugs.debian.org_2005_01_02
30 Package: libatomic-ops
34 Libatomic-ops currently FTBFS on mips/mipsel because there is no
35 arch-specific implementation, and the generic pthread isn't configured.
37 The appended patch adds a basic implementation for linux.
43 --- libatomic-ops-1.0.away/src/atomic_ops/sysdeps/Makefile.am 2005-08-03 02:05:18.000000000 +0200
44 +++ libatomic-ops-1.0/src/atomic_ops/sysdeps/Makefile.am 2005-10-27 20:59:59.000000000 +0200
45 @@ -26,7 +26,7 @@ nobase_sysdep_HEADERS= generic_pthread.h
46 gcc/alpha.h gcc/arm.h gcc/x86.h \
47 gcc/hppa.h gcc/ia64.h \
48 gcc/powerpc.h gcc/sparc.h \
49 - gcc/hppa.h gcc/m68k.h gcc/s390.h \
50 + gcc/hppa.h gcc/m68k.h gcc/mips.h gcc/s390.h \
51 gcc/ia64.h gcc/x86_64.h gcc/cris.h \
54 --- libatomic-ops-1.0.away/src/atomic_ops/sysdeps/gcc/mips.h 1970-01-01 01:00:00.000000000 +0100
55 +++ libatomic-ops-1.0/src/atomic_ops/sysdeps/gcc/mips.h 2005-10-28 00:11:19.000000000 +0200
58 + * Copyright (c) 2005 Thiemo Seufer <ths@networkno.de>
60 + * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
61 + * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
63 + * Permission is hereby granted to use or copy this program
64 + * for any purpose, provided the above notices are retained on all copies.
65 + * Permission to modify the code and to distribute modified code is granted,
66 + * provided the above notices are retained, and a notice that the code was
67 + * modified is included with the above copyright notice.
70 +#include "../all_aligned_atomic_load_store.h"
71 +#include "../test_and_set_t_is_ao_t.h"
73 +/* Data dependence does not imply read ordering. */
74 +#define AO_NO_DD_ORDERING
79 + __asm__ __volatile__(
82 + " .set noreorder \n"
89 +#define AO_HAVE_nop_full
92 +AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
94 + register int was_equal = 0;
97 + __asm__ __volatile__(
100 + " .set noreorder \n"
103 + " bne %0, %4, 2f \n"
110 + : "=&r" (temp), "+R" (*addr), "+r" (was_equal)
111 + : "r" (new_val), "r" (old)
116 +#define AO_HAVE_compare_and_swap
119 + * FIXME: We should also implement fetch_and_add and or primitives
122 --- libatomic-ops-1.0.away/src/atomic_ops.h 2005-08-03 02:05:18.000000000 +0200
123 +++ libatomic-ops-1.0/src/atomic_ops.h 2005-10-27 21:01:29.000000000 +0200
125 # if defined(__cris__) || defined(CRIS)
126 # include "atomic_ops/sysdeps/gcc/cris.h"
128 +# if defined(__mips__)
129 +# include "atomic_ops/sysdeps/gcc/mips.h"
130 +# endif /* __mips__ */
131 #endif /* __GNUC__ && !AO_USE_PTHREAD_DEFS */
133 #if defined(__INTEL_COMPILER) && !defined(AO_USE_PTHREAD_DEFS)