summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/nonclangable.conf1
-rw-r--r--recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch19
-rw-r--r--recipes-devtools/m4/m4_%.bbappend3
3 files changed, 22 insertions, 1 deletions
diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf
index d09b212..b4f8ca8 100644
--- a/conf/nonclangable.conf
+++ b/conf/nonclangable.conf
@@ -41,7 +41,6 @@ TOOLCHAIN_pn-libvorbis = "gcc"
41# DO_NEXT_OP(len); 41# DO_NEXT_OP(len);
42TOOLCHAIN_pn-mozjs = "gcc" 42TOOLCHAIN_pn-mozjs = "gcc"
43 43
44TOOLCHAIN_pn-m4 = "gcc"
45TOOLCHAIN_pn-mtools = "gcc" 44TOOLCHAIN_pn-mtools = "gcc"
46TOOLCHAIN_pn-openssl = "gcc" 45TOOLCHAIN_pn-openssl = "gcc"
47TOOLCHAIN_pn-openjdk-8 = "gcc" 46TOOLCHAIN_pn-openjdk-8 = "gcc"
diff --git a/recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch b/recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch
new file mode 100644
index 0000000..1fe1beb
--- /dev/null
+++ b/recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch
@@ -0,0 +1,19 @@
1clang/arm has this issue where it generates call to __mulodi4
2which is only in compiler-rt and we end with errors
3
4/usr/src/debug/m4/1.4.18-r0/build/src/../../m4-1.4.18/lib/xalloc.h:107: undefined reference to `__mulodi4'
5
6
7Index: m4-1.4.18/lib/xalloc-oversized.h
8===================================================================
9--- m4-1.4.18.orig/lib/xalloc-oversized.h
10+++ m4-1.4.18/lib/xalloc-oversized.h
11@@ -52,7 +52,7 @@ typedef size_t __xalloc_count_type;
12 #elif ((5 <= __GNUC__ \
13 || (__has_builtin (__builtin_mul_overflow) \
14 && __has_builtin (__builtin_constant_p))) \
15- && !__STRICT_ANSI__)
16+ && !__STRICT_ANSI__ && !__clang__)
17 # define xalloc_oversized(n, s) \
18 (__builtin_constant_p (n) && __builtin_constant_p (s) \
19 ? __xalloc_oversized (n, s) \
diff --git a/recipes-devtools/m4/m4_%.bbappend b/recipes-devtools/m4/m4_%.bbappend
new file mode 100644
index 0000000..e00f7c4
--- /dev/null
+++ b/recipes-devtools/m4/m4_%.bbappend
@@ -0,0 +1,3 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "file://disable_builtin_mul_overflow.patch"