[OpenWrt-Devel] [PATCH 3/6] tools: Fix unintended lib link in $(STAGING_DIR_HOST)/lib
Jeffery To
jeffery.to at gmail.com
Fri Jun 14 14:35:31 EDT 2019
Currently, if the $(STAGING_DIR_HOST)/lib64 link already exists, ln (in
tools/prepare) will interpret $(STAGING_DIR_HOST)/lib64 as a directory
rather than a link name.
The result is a symbolic link named "lib" inside
$(STAGING_DIR_HOST)/lib, pointing to itself.
This adds the -n option to ln so that $(STAGING_DIR_HOST)/lib64 is
treated as a link name.
Signed-off-by: Jeffery To <jeffery.to at gmail.com>
---
tools/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/Makefile b/tools/Makefile
index d7207ba89d..f3d8debe23 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -138,7 +138,7 @@ $(STAGING_DIR_HOST)/.prepared: $(TMP_DIR)/.build
mkdir -p $(BUILD_DIR_HOST)/stamp $(STAGING_DIR_HOST)/include/sys
$(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/
$(INSTALL_DATA) $(TOPDIR)/tools/include/sys/*.h $(STAGING_DIR_HOST)/include/sys/
- ln -sf lib $(STAGING_DIR_HOST)/lib64
+ ln -snf lib $(STAGING_DIR_HOST)/lib64
touch $@
endif
--
2.20.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list