diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-13 22:49:54 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2017-03-13 22:49:54 -0700 |
commit | 69e888a8338e9935cdb7959dffe08d540a42eece (patch) | |
tree | ee2dc71a22cc50b4153e3cc467cf29b25643420c | |
parent | 34fb9214e70e9c92050a62a3fc29dc9fc8512835 (diff) | |
download | meta-clang-69e888a8338e9935cdb7959dffe08d540a42eece.tar.gz |
m4: Fix build with clang especially on armv7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | conf/nonclangable.conf | 1 | ||||
-rw-r--r-- | recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch | 19 | ||||
-rw-r--r-- | recipes-devtools/m4/m4_%.bbappend | 3 |
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); |
42 | TOOLCHAIN_pn-mozjs = "gcc" | 42 | TOOLCHAIN_pn-mozjs = "gcc" |
43 | 43 | ||
44 | TOOLCHAIN_pn-m4 = "gcc" | ||
45 | TOOLCHAIN_pn-mtools = "gcc" | 44 | TOOLCHAIN_pn-mtools = "gcc" |
46 | TOOLCHAIN_pn-openssl = "gcc" | 45 | TOOLCHAIN_pn-openssl = "gcc" |
47 | TOOLCHAIN_pn-openjdk-8 = "gcc" | 46 | TOOLCHAIN_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 @@ | |||
1 | clang/arm has this issue where it generates call to __mulodi4 | ||
2 | which 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 | |||
7 | Index: 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 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI += "file://disable_builtin_mul_overflow.patch" | ||