dmalloc: fix static build
PATCH 1/1 dmalloc: fix static build
For example coldfire uses FLAT binaries, which are statically build. Fixes following autobuild failure:
http://autobuild.buildroot.net/results/cc4233a4c3f92275a4071c172330c920c35219ca/
--- package/dmalloc/dmalloc.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
package/dmalloc/dmalloc.mk +6 -2
@@ -58,11 +58,15 @@ define DMALLOC_INSTALL_STAGING_CMDS -C $(@D) install endef -define DMALLOC_INSTALL_TARGET_CMDS ifeq ($(BR2_STATIC_LIBS),) +define DMALLOC_INSTALL_TARGET_CMDS cp -dpf $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib -endif cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc endef +else +define DMALLOC_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc +endef +endif $(eval $(autotools-package))
Signature · 1 line
2.1.4
PATCH 1/1 dmalloc: fix static build
Hello,
Quoted 19 lines · Waldemar Brodkorb
For example coldfire uses FLAT binaries, which are statically build. Fixes following autobuild failure:
http://autobuild.buildroot.net/results/cc4233a4c3f92275a4071c172330c920c35219ca/Signed-off-by Waldemar Brodkorb <[email protected]>--- package/dmalloc/dmalloc.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)package/dmalloc/dmalloc.mk +0
-1@@ -58,11 +58,15 @@ define DMALLOC_INSTALL_STAGING_CMDS -C $(@D) install endef -define DMALLOC_INSTALL_TARGET_CMDS ifeq ($(BR2_STATIC_LIBS),)
package/dmalloc/dmalloc.mk define DMALLOC_INSTALL_STAGING_CMDS · line 70
Quoted 10 lines
package/dmalloc/dmalloc.mk +6
-1+define DMALLOC_INSTALL_TARGET_CMDS cp -dpf $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib -endif cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc endef +else +define DMALLOC_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc +endef +endif
Instead of duplicating the code that installs the program, I've created a temporary variable that does the library installation, and which only gets defined if BR2_STATIC_LIBS is empty:
ifeq ($(BR2_STATIC_LIBS),)
define DMALLOC_INSTALL_SHARED_LIB
cp -dpf $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib
endef
endif
define DMALLOC_INSTALL_TARGET_CMDS
$(DMALLOC_INSTALL_SHARED_LIB)
cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmallocendef
Applied with this modification. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com