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 /recipes-devtools/m4 | |
| 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>
Diffstat (limited to 'recipes-devtools/m4')
| -rw-r--r-- | recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch | 19 | ||||
| -rw-r--r-- | recipes-devtools/m4/m4_%.bbappend | 3 |
2 files changed, 22 insertions, 0 deletions
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" | ||
