The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / toolchain / toolchain.mk
1 # This file contains toolchain-related customisation of the content
2 # of the target/ directory. Those customisations are added to the
3 # TARGET_FINALIZE_HOOKS, to be applied just after all packages
4 # have been built.
5
6 # Install default nsswitch.conf file if the skeleton doesn't provide it
7 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
8 define GLIBC_COPY_NSSWITCH_FILE
9         $(Q)if [ ! -f "$(TARGET_DIR)/etc/nsswitch.conf" ]; then \
10                 $(INSTALL) -D -m 0644 package/glibc/nsswitch.conf $(TARGET_DIR)/etc/nsswitch.conf ; \
11         fi
12 endef
13 TARGET_FINALIZE_HOOKS += GLIBC_COPY_NSSWITCH_FILE
14 endif
15
16 # Install the gconv modules
17 ifeq ($(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY),y)
18 GCONV_LIBS = $(call qstrip,$(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST))
19 define COPY_GCONV_LIBS
20         $(Q)found_gconv=no; \
21         for d in $(TOOLCHAIN_EXTERNAL_PREFIX) ''; do \
22                 [ -d "$(STAGING_DIR)/usr/lib/$${d}/gconv" ] || continue; \
23                 found_gconv=yes; \
24                 break; \
25         done; \
26         if [ "$${found_gconv}" = "no" ]; then \
27                 printf "Unable to find gconv modules\n" >&2; \
28                 exit 1; \
29         fi; \
30         if [ -z "$(GCONV_LIBS)" ]; then \
31                 $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules \
32                                       $(TARGET_DIR)/usr/lib/gconv/gconv-modules && \
33                 $(INSTALL) -m 0644 $(STAGING_DIR)/usr/lib/$${d}/gconv/*.so \
34                                    $(TARGET_DIR)/usr/lib/gconv \
35                 || exit 1; \
36         else \
37                 for l in $(GCONV_LIBS); do \
38                         $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so \
39                                               $(TARGET_DIR)/usr/lib/gconv/$${l}.so \
40                         || exit 1; \
41                         $(TARGET_READELF) -d $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so |\
42                         sort -u |\
43                         sed -e '/.*(NEEDED).*\[\(.*\.so\)\]$$/!d; s//\1/;' |\
44                         while read lib; do \
45                                  $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${lib} \
46                                                        $(TARGET_DIR)/usr/lib/gconv/$${lib} \
47                                  || exit 1; \
48                         done; \
49                 done; \
50                 ./support/scripts/expunge-gconv-modules "$(GCONV_LIBS)" \
51                         <$(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules \
52                         >$(TARGET_DIR)/usr/lib/gconv/gconv-modules; \
53         fi
54 endef
55 TARGET_FINALIZE_HOOKS += COPY_GCONV_LIBS
56 endif