package/proj: fix build failure due to gcc bug 68485
authorGiulio Benetti <giulio.benetti@micronovasrl.com>
Tue, 25 Jun 2019 06:44:36 +0000 (08:44 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 1 Aug 2019 13:36:00 +0000 (15:36 +0200)
The proj package exhibits gcc bug 68485 when built for the Microblaze
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_68485=y.

Fixes:

http://autobuild.buildroot.net/results/e61/e61bd55067071415223e523a81de3c2e9cafea6f/

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Tested-by: Zoltan Gyarmati <zgyarmati@zgyarmati.de>
Acked-by: Zoltan Gyarmati <zgyarmati@zgyarmati.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/proj/proj.mk

index 0b239b2bbe14cb648c1cbf1770f34ec883bf0a3a..2969eb57acb06b92bf9c9a2e3094c5627c4339d1 100644 (file)
@@ -10,4 +10,12 @@ PROJ_LICENSE = MIT
 PROJ_LICENSE_FILES = COPYING
 PROJ_INSTALL_STAGING = YES
 
+PROJ_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+PROJ_CFLAGS += -O0
+endif
+
+PROJ_CONF_ENV = CFLAGS="$(PROJ_CFLAGS)"
+
 $(eval $(autotools-package))