summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-12 22:37:06 -0700
committerKhem Raj <raj.khem@gmail.com>2018-09-12 22:37:06 -0700
commit068c68eb54a576f45eb721964cb425ef1e034cca (patch)
tree66380d59b4cd5cb84e5fecb2ea92ba232209f71c
parent2ae520aa17fac154004aec15a14fb073cc0d57bd (diff)
downloadmeta-clang-068c68eb54a576f45eb721964cb425ef1e034cca.tar.gz
ruby,m4: Link with compiler-rt
Fixes issues like undefined reference to `__mulodi4' see https://bugs.llvm.org/show_bug.cgi?id=28629 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--conf/nonclangable.conf9
-rw-r--r--recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch19
-rw-r--r--recipes-devtools/m4/m4_%.bbappend3
3 files changed, 9 insertions, 22 deletions
diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf
index 6b600e5..bbeb595 100644
--- a/conf/nonclangable.conf
+++ b/conf/nonclangable.conf
@@ -191,3 +191,12 @@ CPPFLAGS_append_pn-memcached_toolchain-clang = " -Wno-error=embedded-directive"
191#| /tmp/mcp2515-578c41.s:1821: Error: r13 not allowed here -- `sub.w sp,r6,#8' 191#| /tmp/mcp2515-578c41.s:1821: Error: r13 not allowed here -- `sub.w sp,r6,#8'
192#| clang-7: error: assembler command failed with exit code 1 (use -v to see invocation) 192#| clang-7: error: assembler command failed with exit code 1 (use -v to see invocation)
193TUNE_CCARGS_remove_pn-upm_toolchain-clang = "-no-integrated-as" 193TUNE_CCARGS_remove_pn-upm_toolchain-clang = "-no-integrated-as"
194
195#| /usr/src/debug/ruby/2.5.1-r0/build/../ruby-2.5.1/process.c:7073: undefined reference to `__mulodi4'
196#| clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
197
198LDFLAGS_append_pn-ruby_toolchain-clang = " -rtlib=compiler-rt"
199LDFLAGS_append_pn-m4_toolchain-clang = " -rtlib=compiler-rt"
200
201
202
diff --git a/recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch b/recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch
deleted file mode 100644
index 1fe1beb..0000000
--- a/recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch
+++ /dev/null
@@ -1,19 +0,0 @@
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
deleted file mode 100644
index e00f7c4..0000000
--- a/recipes-devtools/m4/m4_%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "file://disable_builtin_mul_overflow.patch"