Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] libtool: Fix ignoring compiler-rt libs
@ 2019-01-26 21:41 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2019-01-26 21:41 UTC (permalink / raw)
  To: openembedded-core

This is a limitation of libtool where it is not aware of compiler-rt
being a compiler internal library, this patch fixes it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../libtool/libtool-2.4.6.inc                 |  1 +
 ...r-static-libs-for-internal-compiler-.patch | 37 +++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch

diff --git a/meta/recipes-devtools/libtool/libtool-2.4.6.inc b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
index f307a10751..8e17b56d46 100644
--- a/meta/recipes-devtools/libtool/libtool-2.4.6.inc
+++ b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
@@ -20,6 +20,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
            file://nohardcodepaths.patch \
            file://unwind-opt-parsing.patch \
            file://0001-libtool-Fix-support-for-NIOS2-processor.patch \
+           file://0001-libtool-Check-for-static-libs-for-internal-compiler-.patch \
           "
 
 SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e"
diff --git a/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch b/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch
new file mode 100644
index 0000000000..8c7c39feb6
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch
@@ -0,0 +1,37 @@
+From 40a2da75e6d95cc7c498ebda95ab19ae0db2ebfb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 26 Jan 2019 12:54:26 -0800
+Subject: [PATCH] libtool: Check for static libs for internal compiler
+ libraries
+
+Libtool checks only for libraries linked as -l* when trying to
+find internal compiler libraries. Clang, however uses the absolute
+path to link its internal libraries e.g. compiler_rt. This patch
+handles clang's statically linked libraries when finding internal
+compiler libraries.
+
+https://crbug.com/749263
+
+Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ m4/libtool.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index d0389a0..9619c57 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -7536,7 +7536,7 @@ if AC_TRY_EVAL(ac_compile); then
+   for p in `eval "$output_verbose_link_cmd"`; do
+     case $prev$p in
+ 
+-    -L* | -R* | -l*)
++    -L* | -R* | -l* | */libclang_rt.*.a)
+        # Some compilers place space between "-{L,R}" and the path.
+        # Remove the space.
+        if test x-L = "$p" ||
+-- 
+2.20.1
+
-- 
2.20.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-26 21:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-26 21:41 [PATCH] libtool: Fix ignoring compiler-rt libs Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox