package/bullet: re-enable package when gcc bug 85180 is present
authorGiulio Benetti <giulio.benetti@micronovasrl.com>
Fri, 14 Jun 2019 21:03:26 +0000 (23:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 19 Jun 2019 12:44:54 +0000 (14:44 +0200)
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>
package/bullet/Config.in
package/bullet/bullet.mk

index d4d69d2c9e17e26a34436f9a5f3d9af253177e80..fc285ab33a41cc69538f5ed2df90b6facb07fd00 100644 (file)
@@ -1,9 +1,6 @@
 config BR2_PACKAGE_BULLET
        bool "bullet"
        depends on BR2_INSTALL_LIBSTDCPP
-       # Affected by
-       # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68476
-       depends on !BR2_microblaze
        help
          Bullet is a Collision Detection and Rigid Body Dynamics
          Library.
@@ -12,4 +9,3 @@ config BR2_PACKAGE_BULLET
 
 comment "bullet needs a toolchain w/ C++"
        depends on !BR2_INSTALL_LIBSTDCPP
-       depends on !BR2_microblaze
index 36aaa157e1d8c79fd6ef4dbf7a40da81f3e0ef65..f343213702c1fe2f97dbd8dc975449ed335af557 100644 (file)
@@ -23,4 +23,12 @@ 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))