]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
9203302182dc153673ba1a475bee22153b59d1ea
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From: Richard Purdie <richard.purdie@linuxfoundation.org>
2 Subject: [PATCH 04/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs
3
4 There is a bug where RPATHs could end up containing sysroot values when
5 cross compiling which is obviously incorrect. Strip out sysroot components
6 from libdir when building RPATH values to avoid this.
7
8 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9
10 Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00009.html]
11
12 diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
13 index 25a91de..40cb94a 100644
14 --- a/build-aux/ltmain.in
15 +++ b/build-aux/ltmain.in
16 @@ -7682,9 +7682,11 @@ EOF
17 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
18 for libdir in $rpath; do
19 if test -n "$hardcode_libdir_flag_spec"; then
20 + func_replace_sysroot "$libdir"
21 + libdir=$func_replace_sysroot_result
22 + func_stripname '=' '' "$libdir"
23 + libdir=$func_stripname_result
24 if test -n "$hardcode_libdir_separator"; then
25 - func_replace_sysroot "$libdir"
26 - libdir=$func_replace_sysroot_result
27 if test -z "$hardcode_libdirs"; then
28 hardcode_libdirs=$libdir
29 else
30 @@ -8414,6 +8416,10 @@ EOF
31 hardcode_libdirs=
32 for libdir in $compile_rpath $finalize_rpath; do
33 if test -n "$hardcode_libdir_flag_spec"; then
34 + func_replace_sysroot "$libdir"
35 + libdir=$func_replace_sysroot_result
36 + func_stripname '=' '' "$libdir"
37 + libdir=$func_stripname_result
38 if test -n "$hardcode_libdir_separator"; then
39 if test -z "$hardcode_libdirs"; then
40 hardcode_libdirs=$libdir
41 @@ -8465,6 +8471,10 @@ EOF
42 hardcode_libdirs=
43 for libdir in $finalize_rpath; do
44 if test -n "$hardcode_libdir_flag_spec"; then
45 + func_replace_sysroot "$libdir"
46 + libdir=$func_replace_sysroot_result
47 + func_stripname '=' '' "$libdir"
48 + libdir=$func_stripname_result
49 if test -n "$hardcode_libdir_separator"; then
50 if test -z "$hardcode_libdirs"; then
51 hardcode_libdirs=$libdir
52 --
53 2.25.1
54