buildroot/package/bullet/bullet.mk
Giulio Benetti 28a9aec018 package/bullet: re-enable package when gcc bug 85180 is present
With Microblaze Gcc version < 8.x the build hangs due to gcc bug
85180: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This
package has been excluded from building on Microblaze due to this.

To be consistent with how we deal with this issue in other packages,
we re-enable the package and instead work around the issue by building
with -O0, since gcc bug 85180 manifests itself only when optimization
is enabled.

To achieve this pass -O0 in CMAKE_CXX_FLAGS and remove 'depends on
!BR2_microblaze' and its comment if not available from Config.in.

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

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

35 lines
917 B
Makefile

################################################################################
#
# bullet
#
################################################################################
BULLET_VERSION = 2.88
BULLET_SITE = $(call github,bulletphysics,bullet3,$(BULLET_VERSION))
BULLET_INSTALL_STAGING = YES
BULLET_LICENSE = Zlib
BULLET_LICENSE_FILES = LICENSE.txt
# Disable demos apps and unit tests.
# Disable Bullet3 library.
BULLET_CONF_OPTS = -DBUILD_UNIT_TESTS=OFF \
-DBUILD_BULLET2_DEMOS=OFF \
-DBUILD_BULLET3=OFF
# extras needs dlfcn.h and NPTL (pthread_barrier_init)
ifeq ($(BR2_STATIC_LIBS):$(BR2_TOOLCHAIN_HAS_THREADS_NPTL),:y)
BULLET_CONF_OPTS += -DBUILD_EXTRAS=ON
else
BULLET_CONF_OPTS += -DBUILD_EXTRAS=OFF
endif
BULLET_CXXFLAGS = $(TARGET_CXXFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
BULLET_CXXFLAGS += -O0
endif
BULLET_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(BULLET_CXXFLAGS)"
$(eval $(cmake-package))