aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Richard Genoud <richard.genoud@gmail.com>2015-01-20 12:24:37 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-01-25 20:30:18 +0100
commit88f3034651364d2cd6066f2df339a32e8eef8fc6 (patch)
tree50cc06fa48a8633e5292b67c6f5cec6a9c1acc6c
parent5bda8c9681e4da5239b83558d6d38061206e2436 (diff)
downloadbuildroot-88f3034651364d2cd6066f2df339a32e8eef8fc6.tar.gz
buildroot-88f3034651364d2cd6066f2df339a32e8eef8fc6.tar.bz2
dmalloc: Force arm mode instead of Thumb1 mode
dmalloc has some assembly that doesn't exist in thumb1 mode. So, force arm mode for dmalloc. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/dmalloc/dmalloc.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/dmalloc/dmalloc.mk b/package/dmalloc/dmalloc.mk
index 581ec40756..f87ae1709a 100644
--- a/package/dmalloc/dmalloc.mk
+++ b/package/dmalloc/dmalloc.mk
@@ -14,6 +14,7 @@ DMALLOC_LICENSE_FILES = dmalloc.h.1
DMALLOC_INSTALL_STAGING = YES
DMALLOC_CONF_OPTS = --enable-shlib
+DMALLOC_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
DMALLOC_CONF_OPTS += --enable-cxx
@@ -27,6 +28,15 @@ else
DMALLOC_CONF_OPTS += --disable-threads
endif
+# dmalloc has some assembly function that are not present in thumb1 mode:
+# Error: lo register required -- `str lr,[sp,#4]'
+# so, we desactivate thumb mode
+ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
+DMALLOC_CFLAGS += -marm
+endif
+
+DMALLOC_CONF_ENV = CFLAGS="$(DMALLOC_CFLAGS)"
+
define DMALLOC_POST_PATCH
$(SED) 's/^ac_cv_page_size=0$$/ac_cv_page_size=12/' $(@D)/configure
$(SED) 's/(ld -/($${LD-ld} -/' $(@D)/configure