0001-support-static-installation.patch 1.1 KB

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