Changeset 26623


Ignore:
Timestamp:
2011-04-12T22:37:43+02:00 (7 years ago)
Author:
jow
Message:

base-files: return success on lib-copying with external toolchain
when using an external toolchain the base-files package copies libc, libgcc and
others from the library directory.

The file list is given as following in the .config:
CONFIG_LIBC_FILE_SPEC="./lib/ld{-*.so,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"

Because the filenames are composed with different endings, not all files exist
and will be skipped. Currently, this works only if the last composed file
(util.so.*) really exists. At the moment this works - but only if you don't add
a new file like 'uClibc'.

Adding it at the end '...resolv,util,uClibc}{-*.so,.so.*}' will lead to this
message, because the combination 'libuClibc.so.*' doesn't exist and Make will
evaluate the last copy statement of the for loop.

--- Message Snippet ---
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libnss_files.so.*': No such file or directory
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libresolv-*.so': No such file or directory
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libresolv.so.*': No such file or directory
cp: cannot stat `/home/user/Desktop/code/meetwise/toolchain/staging_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/./lib/libuClibc.so.*': No such file or directory
make[2]: * /home/user/Desktop/code/meetwise/openwrt/bin/at91/packages/libc_-68_at91.ipk Error 1
make[2]: Leaving directory `/home/user/Desktop/code/meetwise/openwrt/package/base-files'
make[1]:
* [package/base-files/compile] Error 2
make[1]: Leaving directory `/home/user/Desktop/code/meetwise/openwrt'
make: * [package/base-files/compile] Error 2
--- /Message Snippet/ ---

To fix this unwanted behaviour I added an extra 'exit 0' to each for-loop and
make ignores non-existing files as before.

Signed-off-by: Sven Bachmann <dev@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/Makefile

    r26230 r26623  
    488488                $(1)/lib/ 
    489489        for file in libanl libc libcidn libcrypt libdl libm $(use_libnsl) $(use_nsswitch) libresolv $(use_libutil); do \ 
    490                 $(CP) \ 
    491                         $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \ 
    492                         $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \ 
    493                         $(1)/lib/; \ 
     490                for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so; do \ 
     491                        if [ -e "$$$$file" ]; then \ 
     492                                $(CP) $$$$file $(1)/lib/; \ 
     493                        fi; \ 
     494                done; \  
    494495        done 
    495496  endef 
     
    576577                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    577578                $(CP) $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    578         done 
     579        done ; \ 
     580        exit 0 
    579581  endef 
    580582 
     
    584586                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    585587                $(CP) $(call qstrip,$(CONFIG_LIBSSP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    586         done 
     588        done ; \ 
     589        exit 0 
    587590  endef 
    588591 
     
    592595                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    593596                $(CP) $(call qstrip,$(CONFIG_LIBSTDCPP_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    594         done 
     597        done ; \ 
     598        exit 0 
    595599  endef 
    596600 
     
    600604                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    601605                $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    602         done 
     606        done ; \ 
     607        exit 0 
    603608  endef 
    604609 
     
    608613                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    609614                $(CP) $(call qstrip,$(CONFIG_LIBPTHREAD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    610         done 
     615        done ; \ 
     616        exit 0 
    611617  endef 
    612618 
     
    616622                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    617623                $(CP) $(call qstrip,$(CONFIG_LIBRT_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    618         done 
     624        done ; \ 
     625        exit 0 
    619626  endef 
    620627 
     
    624631                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    625632                $(CP) $(call qstrip,$(CONFIG_LDD_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    626         done 
     633        done ; \ 
     634        exit 0 
    627635  endef 
    628636 
     
    632640                $(INSTALL_DIR) $(1)/$$$$dir ; \ 
    633641                $(CP) $(call qstrip,$(CONFIG_LDCONFIG_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \ 
    634         done 
     642        done ; \ 
     643        exit 0 
    635644  endef 
    636645 
Note: See TracChangeset for help on using the changeset viewer.