diff options
Diffstat (limited to 'Makeconfig')
-rw-r--r-- | Makeconfig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Makeconfig b/Makeconfig index 8eb15d0c64..2a76ca34d8 100644 --- a/Makeconfig +++ b/Makeconfig @@ -369,10 +369,12 @@ ifneq (yes,$(build-shared)) built-program-cmd = $(built-program-file) else comma = , +sysdep-library-path = \ +$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\ + $(filter -Wl$(comma)-rpath-link=%,\ + $(sysdep-LDFLAGS))))) define built-program-cmd -LD_LIBRARY_PATH=$(rpath-link)$(patsubst -Wl$(comma)-rpath-link=%,:%,\ - $(filter -Wl$(comma)-rpath-link=%,\ - $(sysdep-LDFLAGS))) \ +LD_LIBRARY_PATH=$(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \ $(elf-objpfx)$(rtld-installed-name) $(built-program-file) endef endif |