Skip to contentSkip to conversation

package/celt051: Add patch to fix musl build

PATCH New Jörg Krause 2 participants 2 messages Apr 30, 2015 – May 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/celt051: Add patch to fix musl build

musl does not define __GNUC_PREREQ. Use patch from Alpine Linux
(http://git.alpinelinux.org/cgit/aports/plain/main/celt051/fix-gnuc-prereq.patch).

Fixes http://autobuild.buildroot.net/results/223/223ba6003bdd7e0c896455c21fa8fee943b4e716/

---
 package/celt051/0001-fix-gnuc-prereq.patch | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/celt051/0001-fix-gnuc-prereq.patch
package/celt051/0001-fix-gnuc-prereq.patch new file +29 -0
new file mode 100644
index 0000000..a775a32
@@ -0,0 +1,29 @@
+Fix musl build
+
+musl does not define __GNUC_PREREQ. Use patch from Alpine Linux
+(http://git.alpinelinux.org/cgit/aports/plain/main/celt051/fix-gnuc-prereq.patch).
+
+Fixes http://autobuild.buildroot.net/results/223/223ba6003bdd7e0c896455c21fa8fee943b4e716/
+
+Signed-off-by: J?rg Krause <[email protected]>
+
+--- celt-0.5.1.3.orig/libcelt/ecintrin.h
++++ celt-0.5.1.3/libcelt/ecintrin.h
+@@ -52,8 +52,7 @@
+ /*Count leading zeros.
+   This macro should only be used for implementing ec_ilog(), if it is defined.
+   All other code should use EC_ILOG() instead.*/
+-#ifdef __GNUC_PREREQ
+-#if __GNUC_PREREQ(3,4)
++#if defined(__GNUC__) && ((__GNUC__<<16)+__GNUC_MINOR__) >= 0x304
+ # if INT_MAX>=2147483647
+ #  define EC_CLZ0 sizeof(unsigned)*CHAR_BIT
+ #  define EC_CLZ(_x) (__builtin_clz(_x))
+@@ -61,7 +60,6 @@
+ #  define EC_CLZ0 sizeof(unsigned long)*CHAR_BIT
+ #  define EC_CLZ(_x) (__builtin_clzl(_x))
+ # endif
+-#endif
+ #endif
+
+ #if defined(EC_CLZ)
Signature · 1 line
2.3.7
#1 lore raw

PATCH 1/1 package/celt051: Add patch to fix musl build

Dear J?rg Krause,

Quoted 10 lines · J?rg Krause

musl does not define __GNUC_PREREQ. Use patch from Alpine Linux
(http://git.alpinelinux.org/cgit/aports/plain/main/celt051/fix-gnuc-prereq.patch).

Fixes http://autobuild.buildroot.net/results/223/223ba6003bdd7e0c896455c21fa8fee943b4e716/

---
 package/celt051/0001-fix-gnuc-prereq.patch | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/celt051/0001-fix-gnuc-prereq.patch

Applied, thanks. Please try to submit the patch upstream if possible.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com