Empty path denoted by leading or trailing colons also specify current
directory when searching for libraries, which should be avoided.
Otherwise "make install_runtime" for uClibc cannot work right.

Cases that pathes may contain space or colon characters are handled by
this patch.

Signed-off-by: Yousong Zhou <yszhou4t...@gmail.com>
---
 include/toplevel.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/toplevel.mk b/include/toplevel.mk
index b8608ee..70a0634 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -24,8 +24,8 @@ OPENWRTVERSION:=$(RELEASE)$(if $(REVISION), ($(REVISION)))
 export RELEASE
 export REVISION
 export OPENWRTVERSION
-export LD_LIBRARY_PATH:=$(subst ::,:,$(if 
$(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)
-export DYLD_LIBRARY_PATH:=$(subst ::,:,$(if 
$(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)
+export LD_LIBRARY_PATH:=$(subst $(space),:,$(strip $(subst :,$(space),$(if 
$(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)))
+export DYLD_LIBRARY_PATH:=$(subst $(space),:,$(strip $(subst :,$(space),$(if 
$(DYLD_LIBRARY_PATH),$(DYLD_LIBRARY_PATH):)$(STAGING_DIR_HOST)/lib)))
 export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
 export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
 
-- 
1.7.2.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to