kumquat-buildroot/package/bullet/bullet.mk
Giulio Benetti b785de9f3f package/bullet: fix build failure due to gcc bug 101952
The bullet package exhibits gcc bug 101952 when built for the SH4
architecture with optimization enabled, which causes a build failure.

As done for other packages in Buildroot work around this gcc bug by
setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_101952=y like we
already do for BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y.

Fixes:
http://autobuild.buildroot.net/results/32b/32bfaf0aae57ed18c18e82a72a958af9b3e1b241/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-08-19 22:41:44 +02:00

34 lines
986 B
Makefile

################################################################################
#
# bullet
#
################################################################################
BULLET_VERSION = 3.09
BULLET_SITE = $(call github,bulletphysics,bullet3,$(BULLET_VERSION))
BULLET_INSTALL_STAGING = YES
BULLET_LICENSE = Zlib
BULLET_LICENSE_FILES = LICENSE.txt
# Disable unit tests.
# Don't disable demos apps and Bullet3 library to avoid a build failure:
# https://github.com/bulletphysics/bullet3/issues/3143
BULLET_CONF_OPTS = -DBUILD_UNIT_TESTS=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)
ifneq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180)$(BR2_TOOLCHAIN_HAS_GCC_BUG_101952),)
BULLET_CXXFLAGS += -O0
endif
BULLET_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(BULLET_CXXFLAGS)"
$(eval $(cmake-package))