87858ac75e36649351b04e24b3e33bbcec94e010
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / attr / 0001-support-static-installation.patch
1 Support installation of .a file when doing static linking
2
3 When doing static linking (i.e ENABLE_SHARED != yes), the attr build
4 logic wasn't installing any library at all, not even the .a file which
5 is needed for static linking. This patch fixes that.
6
7 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8
9 Index: b/include/buildmacros
10 ===================================================================
11 --- a/include/buildmacros
12 +++ b/include/buildmacros
13 @@ -97,7 +97,15 @@
14  
15  INSTALL_LTLIB_STATIC = \
16         cd $(TOPDIR)/$(LIBNAME)/.libs; \
17 -       ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR);
18 +       ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
19 +       ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).la $(PKG_DEVLIB_DIR); \
20 +       ../$(INSTALL) -m 644 $(LIBNAME).la $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \
21 +       ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
22 +       ../$(INSTALL) -T so_base $(LIBNAME).la $(PKG_LIB_DIR); \
23 +       if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
24 +       ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
25 +       ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
26 +       fi
27  
28  INSTALL_MAN = \
29         @for d in $(MAN_PAGES); do \