On Tue, 2009-11-10 at 14:07 +0100, Adrian Knoth wrote: > On Tue, Nov 10, 2009 at 10:09:27AM +0100, Bastian Blank wrote: > > > > environs...............: s390-ibm-linux-gnu gcc > > > > audio.c:7056:2: error: #error "Seems like an unsupported hardware > > > for jack. Please contact k.s.matheus...@notam02.no" > > Oh no, they use inline-asm for atomic ops. With the current source, the > package can only be built on x86, amd64 and powerpc(64). > > You'd end up with FTBFS on sparc, mipsel and all other CPUs. > > We had the same problem with FFADO, see e.g. > > http://subversion.ffado.org/ticket/197 > > > The generic solution is the use gcc builtins. This requires gcc-4.1 or > newer and at least some kind of underlying hardware atomic ops: > > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html > > > So you could replace (patch) the code in audio.c:7056 with > > static inline void __attribute__ ((__unused__)) atomic_add(volatile > int* __mem, int __val) > { > __sync_add_and_fetch (__mem, __val); > }
Note that this isn't reliable in all arches. Csound failed to build in SPARC because __sync_add_and_fetch existed (so we used it), but there was some other __sync_* functions that were not referenced in csound causing problems (gcc complained because they were undefined). -- Saludos, Felipe Sateler
signature.asc
Description: This is a digitally signed message part