blob: 7d960340d004e33c656e46cb114f3b4ff058cf22 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
From 3aa30817116c0d231e44b3fc8fa5e67bfb62dca8 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org.ua>
Date: Mon, 9 Dec 2019 14:22:35 +0200
Subject: [PATCH 1/2] ltmain.in: append -rpath option arguments to
finalize_rpath
This makes sure the right library is used during tests even if
-Wl,-rpath options appear in _LDADD or _LDFLAGS option.
---
build-aux/ltmain.in | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 96b37003..c27abd1f 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -4664,6 +4664,7 @@ func_mode_link ()
vinfo=
vinfo_number=no
weak_libs=
+ rpath_arg=
single_module=$wl-single_module
func_infer_tag $base_compile
@@ -5541,8 +5542,20 @@ func_mode_link ()
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
+ if test -n "$rpath_arg"; then
+ func_append finalize_rpath " ${arg##*,}"
+ unset rpath_arg
+ else
+ case $arg in
+ -Wl,-rpath,*)
+ func_append finalize_rpath " ${arg##*,}";;
+ -Wl,-rpath)
+ rpath_arg=1;;
+ *)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ esac
+ fi
fi
done # argument parsing loop
--
2.14.5
|