package/jemalloc: fix build on or1k with gcc < 6
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 21 Apr 2019 17:08:51 +0000 (19:08 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 21 Apr 2019 20:32:21 +0000 (22:32 +0200)
Fixes:
 - http://autobuild.buildroot.org/results/8cb80bef5c60ac1e5f6507fbc68c21c32f4af84a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/jemalloc/jemalloc.mk

index 1273f8a72ace85f59406c34961f0e93754bdfae8..f4d64851bf2ff77b9143c6c90d89dc07a5eed887 100644 (file)
@@ -11,5 +11,11 @@ JEMALLOC_LICENSE = BSD-2-Clause
 JEMALLOC_LICENSE_FILES = COPYING
 JEMALLOC_INSTALL_STAGING = YES
 
+# gcc bug internal compiler error: in merge_overlapping_regs, at
+# regrename.c:304. This bug is fixed since gcc 6.
+ifeq ($(BR2_or1k):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:)
+JEMALLOC_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))