!511 make编译时不要覆盖out下已有的lib库

Merge pull request !511 from Caoruihong/preserve_libs
This commit is contained in:
openharmony_ci 2021-08-10 07:57:59 +00:00 committed by Gitee
commit cdf96fef0c
2 changed files with 8 additions and 8 deletions

View File

@ -180,12 +180,12 @@ $(APPS): $(LITEOS_TARGET) sysroot
prepare:
$(HIDE)mkdir -p $(OUT)/musl
ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y)
$(HIDE)cp -f $$($(CC) --target=$(LLVM_TARGET) --sysroot=$(SYSROOT_PATH) $(LITEOS_CFLAGS) -print-file-name=libc.so) $(OUT)/musl
$(HIDE)cp -f $$($(GPP) --target=$(LLVM_TARGET) --sysroot=$(SYSROOT_PATH) $(LITEOS_CXXFLAGS) -print-file-name=libc++.so) $(OUT)/musl
$(HIDE)cp -fp $$($(CC) --target=$(LLVM_TARGET) --sysroot=$(SYSROOT_PATH) $(LITEOS_CFLAGS) -print-file-name=libc.so) $(OUT)/musl
$(HIDE)cp -fp $$($(GPP) --target=$(LLVM_TARGET) --sysroot=$(SYSROOT_PATH) $(LITEOS_CXXFLAGS) -print-file-name=libc++.so) $(OUT)/musl
else
$(HIDE)cp -f $(LITEOS_COMPILER_PATH)/target/usr/lib/libc.so $(OUT)/musl
$(HIDE)cp -f $(LITEOS_COMPILER_PATH)/arm-linux-musleabi/lib/libstdc++.so.6 $(OUT)/musl
$(HIDE)cp -f $(LITEOS_COMPILER_PATH)/arm-linux-musleabi/lib/libgcc_s.so.1 $(OUT)/musl
$(HIDE)cp -fp $(LITEOS_COMPILER_PATH)/target/usr/lib/libc.so $(OUT)/musl
$(HIDE)cp -fp $(LITEOS_COMPILER_PATH)/arm-linux-musleabi/lib/libstdc++.so.6 $(OUT)/musl
$(HIDE)cp -fp $(LITEOS_COMPILER_PATH)/arm-linux-musleabi/lib/libgcc_s.so.1 $(OUT)/musl
$(STRIP) $(OUT)/musl/*
endif

View File

@ -46,14 +46,14 @@ if [ -d "${BIN_DIR}" ] && [ "$(ls -A "${BIN_DIR}")" != "" ]; then
for el in ${NEED_COPYTO_OUTDIR[@]}
do
if [ -e ${BIN_DIR}/$el ] && [ "${BIN_DIR}/$el" != "${OUT_DIR}/bin/$el" ]; then
cp -f ${BIN_DIR}/$el ${OUT_DIR}/bin/$el
cp -u ${BIN_DIR}/$el ${OUT_DIR}/bin/$el
fi
done
fi
cp -f ${LIB_DIR}/* ${ROOTFS_DIR}/lib
cp -f ${LIB_DIR}/* ${OUT_DIR}/libs
cp -u ${LIB_DIR}/* ${OUT_DIR}/libs
if [ -e ${ETC_DIR} ]; then
cp -f ${ETC_DIR}/.mkshrc ${ROOTFS_DIR}/etc
cp -f ${ETC_DIR}/.mkshrc ${OUT_DIR}/etc
cp -u ${ETC_DIR}/.mkshrc ${OUT_DIR}/etc
fi