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>
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))