1 From 7f2b8a1ab4fa1475eeeddfb84eb5b92594bfce43 Mon Sep 17 00:00:00 2001
2 From: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 Date: Tue, 20 Jul 2021 16:54:12 -0300
4 Subject: openwrt: strip unsave directories from relink command
6 strip unsave directories from relink command, nuke every -L that looks
9 This was originally commited to openwrt by Jo-Philipp Wich
13 Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
15 --- a/build-aux/ltmain.in
16 +++ b/build-aux/ltmain.in
17 @@ -2382,6 +2382,9 @@ func_mode_install ()
18 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
21 + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
22 + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
24 func_warning "relinking '$file'"
25 func_show_eval "$relink_command" \
26 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'