]> git.pld-linux.org Git - packages/SDL2_sound.git/commitdiff
- added use-builtin-clz patch (rely on gcc to choose proper instruction for target... auto/th/SDL2_sound-2.0.1-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 24 Sep 2022 19:03:34 +0000 (21:03 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 24 Sep 2022 19:03:34 +0000 (21:03 +0200)
SDL2_sound.spec
SDL_sound-use-builtin-clz.patch [new file with mode: 0644]

index 3243290b720cfde6229f608acddd3834afd35dac..d5f71b8f19a30f23f91eae9e2f4ebad8337669af 100644 (file)
@@ -9,6 +9,7 @@ Group:          Libraries
 #Source0Download: https://github.com/icculus/SDL_sound/releases
 Source0:       https://github.com/icculus/SDL_sound/archive/v%{version}/SDL_sound-%{version}.tar.gz
 # Source0-md5: 4917a87b45f7b940a68cd1b60881cabb
+Patch0:                SDL_sound-use-builtin-clz.patch
 URL:           http://www.icculus.org/SDL_sound/
 BuildRequires: SDL2-devel >= 2.0
 BuildRequires: cmake >= 2.8.12
@@ -82,6 +83,7 @@ Statyczne biblioteki SDL_sound.
 
 %prep
 %setup -q -n SDL_sound-%{version}
+%patch0 -p1
 
 %build
 install -d build 
diff --git a/SDL_sound-use-builtin-clz.patch b/SDL_sound-use-builtin-clz.patch
new file mode 100644 (file)
index 0000000..27ce659
--- /dev/null
@@ -0,0 +1,29 @@
+--- SDL_sound-2.0.1/src/dr_flac.h.orig 2022-03-25 21:17:50.000000000 +0100
++++ SDL_sound-2.0.1/src/dr_flac.h      2022-09-24 20:46:30.681153334 +0200
+@@ -2768,25 +2768,7 @@ static DRFLAC_INLINE drflac_uint32 drfla
+     #endif
+ #else
+     #if defined(__GNUC__) || defined(__clang__)
+-        #if defined(DRFLAC_X64)
+-            {
+-                drflac_uint64 r;
+-                __asm__ __volatile__ (
+-                    "lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"
+-                );
+-
+-                return (drflac_uint32)r;
+-            }
+-        #elif defined(DRFLAC_X86)
+-            {
+-                drflac_uint32 r;
+-                __asm__ __volatile__ (
+-                    "lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"
+-                );
+-
+-                return r;
+-            }
+-        #elif defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(DRFLAC_64BIT)   /* <-- I haven't tested 64-bit inline assembly, so only enabling this for the 32-bit build for now. */
++        #if defined(DRFLAC_ARM) && (defined(__ARM_ARCH) && __ARM_ARCH >= 5) && !defined(DRFLAC_64BIT)   /* <-- I haven't tested 64-bit inline assembly, so only enabling this for the 32-bit build for now. */
+             {
+                 unsigned int r;
+                 __asm__ __volatile__ (
This page took 0.104326 seconds and 4 git commands to generate.