Projects
Multimedia
linuxsampler
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
linuxsampler.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Mon Oct 20 02:16:49 UTC 2014 - avvissu@yandex.ru + +- Patch to fix build on ARM processors (add linuxsampler_arm.patch) + +------------------------------------------------------------------- Tue Aug 13 08:44:45 UTC 2013 - reddwarf@opensuse.org - Change lv2core-devel BuildRequire for pkgconfig(lv2core)
View file
linuxsampler.spec
Changed
@@ -28,6 +28,8 @@ Source0: linuxsampler-%{rev}.tar.bz2 Source1: linuxsampler.png Patch1: linuxsampler-fix_lv2_include_path.patch +#PATCH-FIX-UPSTREAM linuxsampler_arm.patch[sf#32878699] <benoit.guchet@gmail.com> -- Fix build on ARM processors +Patch2: linuxsampler_arm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: alsa-devel >= 1.0.9 BuildRequires: libtool autoconf automake >= 1.5 @@ -125,6 +127,7 @@ %prep %setup -q -n linuxsampler %patch1 +%patch2 -p1 %build [ -e ./configure ] || %__make -f Makefile.cvs configure
View file
linuxsampler_arm.patch
Added
@@ -0,0 +1,164 @@ +diff -U 3 -H -d -r -N -- linuxsampler.orig/src/common/RTMath.cpp linuxsampler/src/common/RTMath.cpp +--- linuxsampler.orig/src/common/RTMath.cpp 2012-04-16 15:49:24.000000000 +0300 ++++ linuxsampler/src/common/RTMath.cpp 2014-10-20 03:13:40.251436023 +0300 +@@ -22,6 +22,9 @@ + ***************************************************************************/ + + #include "RTMath.h" ++#if defined(__arm__) ++#include <time.h> ++#endif + + static float CentsToFreqTable[CONFIG_MAX_PITCH * 1200 * 2 + 1]; // +-1200 cents per octave + +@@ -71,6 +74,10 @@ + return t; + #elif defined(__APPLE__) + return GetMachTime(); ++ #elif defined(__arm__) ++ timespec tp; ++ clock_gettime(CLOCK_MONOTONIC, &tp); ++ return tp.tv_nsec; + #else // we don't want to use a slow generic solution + # error "Sorry, LinuxSampler lacks time stamp code for your system." + # error "Please report this error and the CPU you are using to the LinuxSampler developers mailing list!" +diff -U 3 -H -d -r -N -- linuxsampler.orig/src/common/atomic.h linuxsampler/src/common/atomic.h +--- linuxsampler.orig/src/common/atomic.h 2012-04-16 15:49:24.000000000 +0300 ++++ linuxsampler/src/common/atomic.h 2014-10-20 03:33:34.813359536 +0300 +@@ -1187,6 +1187,128 @@ + + #else + ++#ifdef __arm__ ++ ++/* ++ * That part of code for ARM11 was taken from ALSA's iatomic.h ++ */ ++ ++/* ++ * FIXME: bellow code is valid only for SA11xx ++ */ ++ ++/* ++ * Save the current interrupt enable state & disable IRQs ++ */ ++#define local_irq_save(x) \ ++ ({ \ ++ unsigned long temp; \ ++ __asm__ __volatile__( \ ++ "mrs %0, cpsr @ local_irq_save\n" \ ++ "orr %1, %0, #128\n" \ ++ "msr cpsr_c, %1" \ ++ : "=r" (x), "=r" (temp) \ ++ : \ ++ : "memory"); \ ++ }) ++ ++/* ++ * restore saved IRQ & FIQ state ++ */ ++#define local_irq_restore(x) \ ++ __asm__ __volatile__( \ ++ "msr cpsr_c, %0 @ local_irq_restore\n" \ ++ : \ ++ : "r" (x) \ ++ : "memory") ++ ++#define __save_flags_cli(x) local_irq_save(x) ++#define __restore_flags(x) local_irq_restore(x) ++ ++typedef struct { volatile int counter; } atomic_t; ++ ++#define ATOMIC_INIT(i) { (i) } ++ ++#define atomic_read(v) ((v)->counter) ++#define atomic_set(v,i) (((v)->counter) = (i)) ++ ++static __inline__ void atomic_add(int i, volatile atomic_t *v) ++{ ++ unsigned long flags; ++ ++ __save_flags_cli(flags); ++ v->counter += i; ++ __restore_flags(flags); ++} ++ ++static __inline__ void atomic_sub(int i, volatile atomic_t *v) ++{ ++ unsigned long flags; ++ ++ __save_flags_cli(flags); ++ v->counter -= i; ++ __restore_flags(flags); ++} ++ ++static __inline__ void atomic_inc(volatile atomic_t *v) ++{ ++ unsigned long flags; ++ ++ __save_flags_cli(flags); ++ v->counter += 1; ++ __restore_flags(flags); ++} ++ ++static __inline__ void atomic_dec(volatile atomic_t *v) ++{ ++ unsigned long flags; ++ ++ __save_flags_cli(flags); ++ v->counter -= 1; ++ __restore_flags(flags); ++} ++ ++static __inline__ int atomic_dec_and_test(volatile atomic_t *v) ++{ ++ unsigned long flags; ++ int result; ++ ++ __save_flags_cli(flags); ++ v->counter -= 1; ++ result = (v->counter == 0); ++ __restore_flags(flags); ++ ++ return result; ++} ++ ++static inline int atomic_add_negative(int i, volatile atomic_t *v) ++{ ++ unsigned long flags; ++ int result; ++ ++ __save_flags_cli(flags); ++ v->counter += i; ++ result = (v->counter < 0); ++ __restore_flags(flags); ++ ++ return result; ++} ++ ++static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *addr) ++{ ++ unsigned long flags; ++ ++ __save_flags_cli(flags); ++ *addr &= ~mask; ++ __restore_flags(flags); ++} ++ ++#define mb() __asm__ __volatile__ ("" : : : "memory") ++#define rmb() mb() ++#define wmb() mb() ++ ++#else ++ + #warning libs/pbd has no implementation of strictly atomic operations for your hardware. + + #define __NO_STRICT_ATOMIC +@@ -1231,6 +1353,7 @@ + } + + # endif /* __NO_STRICT_ATOMIC */ ++# endif /* arm */ + # endif /* m68k */ + # endif /* mips */ + # endif /* s390 */
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.