summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-03-09 12:57:37 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-11 06:56:01 +0000
commit720eb2cc8dcfbc6c0cf652051cfb3d0fef04b366 (patch)
treeae877e99cc88b1d3b1dad2dc4992113220ae4916 /meta/recipes-devtools/libtool
parent172b9aa6d2c893edef784c92388c39d3b1162767 (diff)
downloadpoky-720eb2cc8dcfbc6c0cf652051cfb3d0fef04b366.tar.gz
libtool: Recognise additional linker commandline options passed by clang
Like stdlib, these options are also used to select runtime libraries by clang driver (From OE-Core rev: 6d2035b9017552f050e53add0b3ef4090141fc5e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/libtool')
-rw-r--r--meta/recipes-devtools/libtool/libtool-2.4.6.inc1
-rw-r--r--meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch37
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libtool/libtool-2.4.6.inc b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
index 2b5fd8fd94..ad6f5e6b6e 100644
--- a/meta/recipes-devtools/libtool/libtool-2.4.6.inc
+++ b/meta/recipes-devtools/libtool/libtool-2.4.6.inc
@@ -26,6 +26,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
26 file://0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch \ 26 file://0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch \
27 file://libool.m4-add-ARFLAGS-variable.patch \ 27 file://libool.m4-add-ARFLAGS-variable.patch \
28 file://ARFLAGS-use-cr-instead-of-cru-by-default.patch \ 28 file://ARFLAGS-use-cr-instead-of-cru-by-default.patch \
29 file://0001-ltmain.in-Parse-additional-clang-options.patch \
29 " 30 "
30 31
31SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e" 32SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e"
diff --git a/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch
new file mode 100644
index 0000000000..d59b5a834e
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch
@@ -0,0 +1,37 @@
1From c3b90d6107a1b638477d5f4dcee48af289647af7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Mar 2022 12:52:51 -0800
4Subject: [PATCH] ltmain.in: Parse additional clang options
5
6clang uses -rtlib and --unwindlib to select proper compiler runtime in
7some cases. There fore pass these options to linker when found in
8ldflags
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 build-aux/ltmain.in | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
15
16diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
17index 6a7bb72..c355c0c 100644
18--- a/build-aux/ltmain.in
19+++ b/build-aux/ltmain.in
20@@ -5423,10 +5423,13 @@ func_mode_link ()
21 # --sysroot=* for sysroot support
22 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
23 # -stdlib=* select c++ std lib with clang
24+ # -rtlib=* select c runtime lib with clang
25+ # --unwindlib=* select unwinder library with clang
26 # -f*-prefix-map* needed for lto linking
27 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
28 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
29- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-f*-prefix-map*)
30+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
31+ -rtlib=*|--unwindlib=*|-f*-prefix-map*)
32 func_quote_for_eval "$arg"
33 arg=$func_quote_for_eval_result
34 func_append compile_command " $arg"
35--
362.35.1
37