summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch
blob: 0285c143d289358d70fd4bb690827de0a5e3f5b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] ltmain.in: Parse additional clang options

clang uses -rtlib and --unwindlib to select proper compiler runtime in
some cases. There fore pass these options to linker when found in
ldflags

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

Index: libtool-2.4.7/build-aux/ltmain.in
===================================================================
--- libtool-2.4.7.orig/build-aux/ltmain.in
+++ libtool-2.4.7/build-aux/ltmain.in
@@ -5420,10 +5420,12 @@ func_mode_link ()
       # -fsanitize=*         Clang/GCC memory and address sanitizer
       # -fuse-ld=*           Linker select flags for GCC
       # -f*-prefix-map*      needed for lto linking
+      # -rtlib=*             select c runtime lib with clang
+      # --unwindlib=*        select unwinder library with clang
       # -Wa,*                Pass flags directly to the assembler
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-rtlib=*|--unwindlib=*| \
       -specs=*|-fsanitize=*|-fuse-ld=*|-f*-prefix-map*|-Wa,*)
         func_quote_arg pretty "$arg"
 	arg=$func_quote_arg_result