Skip to content
Snippets Groups Projects
Commit 46ceea27 authored by Edric Milaret's avatar Edric Milaret
Browse files

ios: disable assembler for ios simulator in libsamplerate

This does not compile for simulator target

Change-Id: Iba55808af8a0a5b48afa5a0239288f6d8d1ecc00
Tuleap: #313
parent ba088bf2
Branches
Tags
No related merge requests found
--- a/src/float_cast.h 2011-01-19 05:39:36.000000000 -0500
+++ b/src/float_cast.h 2016-05-30 17:09:20.000000000 -0400
@@ -230,38 +230,12 @@
#undef lrint
#undef lrintf
- #define lrint double2int
- #define lrintf float2int
+ #warning "Don't have the functions lrint() and lrintf()."
+ #warning "Replacing these functions with a standard C cast."
- inline static long
- float2int (register float in)
- { int res [2] ;
-
- __asm__ __volatile__
- ( "fctiw %1, %1\n\t"
- "stfd %1, %0"
- : "=m" (res) /* Output */
- : "f" (in) /* Input */
- : "memory"
- ) ;
-
- return res [1] ;
- } /* lrintf */
-
- inline static long
- double2int (register double in)
- { int res [2] ;
-
- __asm__ __volatile__
- ( "fctiw %1, %1\n\t"
- "stfd %1, %0"
- : "=m" (res) /* Output */
- : "f" (in) /* Input */
- : "memory"
- ) ;
+ #define lrint(dbl) ((long) (dbl))
+ #define lrintf(flt) ((long) (flt))
- return res [1] ;
- } /* lrint */
#else
#ifndef __sgi
@@ -278,4 +252,3 @@
#endif /* FLOAT_CAST_HEADER */
-
......@@ -16,6 +16,12 @@ samplerate: libsamplerate-$(SAMPLERATE_VERSION).tar.gz .sum-samplerate
$(UNPACK)
$(APPLY) $(SRC)/samplerate/soundcard.patch
$(APPLY) $(SRC)/samplerate/carbon.patch
ifdef HAVE_IOS
ifeq ($(IOS_TARGET_PLATFORM),iPhoneSimulator)
#warning assembler double / int conversion disabled
$(APPLY) $(SRC)/samplerate/disable_assembler.patch
endif
endif
$(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub Cfg
$(MOVE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment