kumquat-buildroot/package/flann/flann.mk
Giulio Benetti 467552234d package/flann: re-enable package on microblaze
With Microblaze gcc version <= 9.x, the build of flannel fails due to
gcc bug 68485: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485.

To avoid this, the flann package has a !BR2_microblaze
dependency. However, gcc bug 68485 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_68485, and
re-enables flann on Microblaze.

Note that the comment was talking about gcc bug 69401, but this gcc
bug is a duplicate of 68485. Since all Buildroot packages now use the
reference to gcc bug 68485 and the option is named
BR2_TOOLCHAIN_HAS_GCC_BUG_68485, we use this naming as well for flann.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-06-19 21:52:58 +02:00

30 lines
834 B
Makefile

################################################################################
#
# flann
#
################################################################################
FLANN_VERSION = 1.9.1
FLANN_SITE = $(call github,mariusmuja,flann,$(FLANN_VERSION))
FLANN_INSTALL_STAGING = YES
FLANN_LICENSE = BSD-3-Clause
FLANN_LICENSE_FILES = COPYING
FLANN_CONF_OPTS = \
-DBUILD_C_BINDINGS=ON \
-DBUILD_PYTHON_BINDINGS=OFF \
-DBUILD_MATLAB_BINDINGS=OFF \
-DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_FLANN_EXAMPLES),ON,OFF) \
-DUSE_OPENMP=$(if $(BR2_TOOLCHAIN_HAS_OPENMP),ON,OFF) \
-DPYTHON_EXECUTABLE=OFF \
-DCMAKE_DISABLE_FIND_PACKAGE_HDF5=TRUE
FLANN_CXXFLAGS = $(TARGET_CXXFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
FLANN_CXXFLAGS += -O0
endif
FLANN_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(FLANN_CXXFLAGS)"
$(eval $(cmake-package))