m4: Fix building with clang
This commit is contained in:
parent
5bb99cd307
commit
899173e9d7
@ -3,5 +3,3 @@ TERMUX_PKG_DESCRIPTION="Traditional Unix macro processor"
|
||||
TERMUX_PKG_VERSION=1.4.18
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/m4/m4-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07
|
||||
# "undefined reference to `__muloti4":
|
||||
TERMUX_PKG_CLANG=no
|
||||
|
29
packages/m4/lib-xalloc-oversized.h.patch
Normal file
29
packages/m4/lib-xalloc-oversized.h.patch
Normal file
@ -0,0 +1,29 @@
|
||||
Fixed "undefined reference to __muloti4".
|
||||
|
||||
diff -u -r ../m4-1.4.18/lib/xalloc-oversized.h ./lib/xalloc-oversized.h
|
||||
--- ../m4-1.4.18/lib/xalloc-oversized.h 2016-12-31 13:54:42.000000000 +0000
|
||||
+++ ./lib/xalloc-oversized.h 2018-08-06 14:25:19.420628987 +0000
|
||||
@@ -46,23 +46,6 @@
|
||||
positive and N must be nonnegative. This is a macro, not a
|
||||
function, so that it works correctly even when SIZE_MAX < N. */
|
||||
|
||||
-#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)
|
||||
-# define xalloc_oversized(n, s) \
|
||||
- __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
|
||||
-#elif ((5 <= __GNUC__ \
|
||||
- || (__has_builtin (__builtin_mul_overflow) \
|
||||
- && __has_builtin (__builtin_constant_p))) \
|
||||
- && !__STRICT_ANSI__)
|
||||
-# define xalloc_oversized(n, s) \
|
||||
- (__builtin_constant_p (n) && __builtin_constant_p (s) \
|
||||
- ? __xalloc_oversized (n, s) \
|
||||
- : ({ __xalloc_count_type __xalloc_count; \
|
||||
- __builtin_mul_overflow (n, s, &__xalloc_count); }))
|
||||
-
|
||||
-/* Other compilers use integer division; this may be slower but is
|
||||
- more portable. */
|
||||
-#else
|
||||
# define xalloc_oversized(n, s) __xalloc_oversized (n, s)
|
||||
-#endif
|
||||
|
||||
#endif /* !XALLOC_OVERSIZED_H_ */
|
Loading…
Reference in New Issue
Block a user