aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Giulio Benetti <giulio.benetti@micronovasrl.com>2019-06-14 23:03:39 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-06-22 19:50:21 +0200
commit4d8e5be0b4d6c4920daab70ae7cd807a1f8aa620 (patch)
treebfe3a05c836d58c4dc9ed071595c7f8b93c2d537
parentf00d6ddf5081b0c366827803915ccf9cf9697cf5 (diff)
downloadbuildroot-4d8e5be0b4d6c4920daab70ae7cd807a1f8aa620.tar.gz
buildroot-4d8e5be0b4d6c4920daab70ae7cd807a1f8aa620.tar.bz2
package/dmalloc: re-enable package on microblaze
Building dmalloc on Microblaze with optimization enabled and gcc < 8.x fails with: Error: operation combines symbols in different segments This is due to gcc bug 63261 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261). To avoid this, the dmalloc package has a !BR2_microblaze dependency. However, gcc bug 63261 only triggers when optimization is enabled, so we can work around the issue by passing -O0, which is what we do in other Buildroot packages to work around this bug. So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_63261, and re-enables dmalloc on Microblaze. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/dmalloc/Config.in4
-rw-r--r--package/dmalloc/dmalloc.mk4
2 files changed, 4 insertions, 4 deletions
diff --git a/package/dmalloc/Config.in b/package/dmalloc/Config.in
index e5be109332..0c01970b04 100644
--- a/package/dmalloc/Config.in
+++ b/package/dmalloc/Config.in
@@ -1,9 +1,5 @@
config BR2_PACKAGE_DMALLOC
bool "dmalloc"
- # On some packages, Microblaze gcc has issues when debugging
- # symbols are enabled: "Error: operation combines symbols in
- # different segments".
- depends on !(BR2_microblaze && BR2_ENABLE_DEBUG)
help
A debug memory allocation library which is a drop in
replacement for the system's malloc, realloc, calloc, free and
diff --git a/package/dmalloc/dmalloc.mk b/package/dmalloc/dmalloc.mk
index 6ebb44c5c0..38b2c02027 100644
--- a/package/dmalloc/dmalloc.mk
+++ b/package/dmalloc/dmalloc.mk
@@ -35,6 +35,10 @@ ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
DMALLOC_CFLAGS += -marm
endif
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_63261),y)
+DMALLOC_CFLAGS += -O0
+endif
+
DMALLOC_CONF_ENV = CFLAGS="$(DMALLOC_CFLAGS)"
define DMALLOC_POST_PATCH