From 068c68eb54a576f45eb721964cb425ef1e034cca Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 12 Sep 2018 22:37:06 -0700 Subject: 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 --- conf/nonclangable.conf | 9 +++++++++ .../m4/m4/disable_builtin_mul_overflow.patch | 19 ------------------- recipes-devtools/m4/m4_%.bbappend | 3 --- 3 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 recipes-devtools/m4/m4/disable_builtin_mul_overflow.patch delete mode 100644 recipes-devtools/m4/m4_%.bbappend 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" #| /tmp/mcp2515-578c41.s:1821: Error: r13 not allowed here -- `sub.w sp,r6,#8' #| clang-7: error: assembler command failed with exit code 1 (use -v to see invocation) TUNE_CCARGS_remove_pn-upm_toolchain-clang = "-no-integrated-as" + +#| /usr/src/debug/ruby/2.5.1-r0/build/../ruby-2.5.1/process.c:7073: undefined reference to `__mulodi4' +#| clang-7: error: linker command failed with exit code 1 (use -v to see invocation) + +LDFLAGS_append_pn-ruby_toolchain-clang = " -rtlib=compiler-rt" +LDFLAGS_append_pn-m4_toolchain-clang = " -rtlib=compiler-rt" + + + 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 @@ -clang/arm has this issue where it generates call to __mulodi4 -which is only in compiler-rt and we end with errors - -/usr/src/debug/m4/1.4.18-r0/build/src/../../m4-1.4.18/lib/xalloc.h:107: undefined reference to `__mulodi4' - - -Index: m4-1.4.18/lib/xalloc-oversized.h -=================================================================== ---- m4-1.4.18.orig/lib/xalloc-oversized.h -+++ m4-1.4.18/lib/xalloc-oversized.h -@@ -52,7 +52,7 @@ typedef size_t __xalloc_count_type; - #elif ((5 <= __GNUC__ \ - || (__has_builtin (__builtin_mul_overflow) \ - && __has_builtin (__builtin_constant_p))) \ -- && !__STRICT_ANSI__) -+ && !__STRICT_ANSI__ && !__clang__) - # define xalloc_oversized(n, s) \ - (__builtin_constant_p (n) && __builtin_constant_p (s) \ - ? __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 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://disable_builtin_mul_overflow.patch" -- cgit v1.2.3-54-g00ecf