package/libgeos: fix build failure due to Gcc Bug 68485
authorGiulio Benetti <giulio.benetti@benettiengineering.com>
Fri, 12 Feb 2021 22:42:38 +0000 (23:42 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 13 Feb 2021 21:51:14 +0000 (22:51 +0100)
Package libgeos manifests Microblaze Gcc Bug 68485 resulting in a build
failure due to an Internal Compiler Error.

As done for other packages in Buildroot work around this Gcc Bug by
setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y.

Fixes:
http://autobuild.buildroot.net/results/0da/0daa6b259aea5381fad86d01e6dd026b1c8ad073/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libgeos/libgeos.mk

index 50c3832c01216e114fe70f1758a6f644f798533f..a355732af8d30311c6118dc6bc710d35f75010fd 100644 (file)
@@ -13,8 +13,16 @@ LIBGEOS_INSTALL_STAGING = YES
 LIBGEOS_CONFIG_SCRIPTS = geos-config
 LIBGEOS_CONF_OPTS = -DBUILD_BENCHMARKS=OFF
 
+LIBGEOS_CXXFLAGS = $(TARGET_CXXCFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+LIBGEOS_CXXFLAGS += -O0
+endif
+
 ifeq ($(BR2_arm)$(BR2_armeb),y)
 LIBGEOS_CONF_OPTS += -DDISABLE_GEOS_INLINE=ON
 endif
 
+LIBGEOS_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(LIBGEOS_CXXFLAGS)"
+
 $(eval $(cmake-package))