Skip to contentSkip to conversation

package/proj: fix build failure due to gcc bug 68485(C++)

PATCH Superseded Giulio Benetti 2 participants 3 messages Dec 31, 2019 – Jan 1, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/proj: fix build failure due to gcc bug 68485(C++)

The proj package exhibits gcc bug 68485 when building for the Microblaze architecture C files(already fixed), but also for C++ files.

As done for other packages in Buildroot work around this gcc bug by setting optimization to -O0 when compiling C++ files too if BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y.

Fixes:
http://autobuild.buildroot.net/results/dc9/dc9bc52ff3d5a83dcfe4a86a391590bef57e1cf0/

---
 package/proj/proj.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/proj/proj.mk +8 -0
index ca943141ce..6b3d219953 100644
@@ -19,4 +19,12 @@ endif
 
 PROJ_CONF_ENV = CFLAGS="$(PROJ_CFLAGS)"
 
+PROJ_CXXFLAGS = $(TARGET_CXXFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+PROJ_CXXFLAGS += -O0
+endif
+
+PROJ_CONF_ENV += CXXFLAGS="$(PROJ_CXXFLAGS)"
+
 $(eval $(autotools-package))
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/proj: fix build failure due to gcc bug 68485(C++)

package/proj/proj.mk endif · line 28

Quoted 7 lines · On Tue, 31 Dec 2019 16:09:57 +0100 Giulio Benetti…
package/proj/proj.mk +7 -0
+PROJ_CXXFLAGS = $(TARGET_CXXFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+PROJ_CXXFLAGS += -O0
+endif
+
+PROJ_CONF_ENV += CXXFLAGS="$(PROJ_CXXFLAGS)"

The duplication of the condition was really not necessary, you can use the same condition to tweak the CFLAGS/CXXFLAGS values.

I've adjusted that and applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/proj: fix build failure due to gcc bug 68485(C++)

Quoted 13 lines · Thomas Petazzoni

package/proj/proj.mk endif · line 28

Quoted 7 lines · On Tue, 31 Dec 2019 16:09:57 +0100 Giulio Benetti…
package/proj/proj.mk +7 -0
+PROJ_CXXFLAGS = $(TARGET_CXXFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+PROJ_CXXFLAGS += -O0
+endif
+
+PROJ_CONF_ENV += CXXFLAGS="$(PROJ_CXXFLAGS)"

The duplication of the condition was really not necessary, you can use the same condition to tweak the CFLAGS/CXXFLAGS values.

Oops, you're right.

Quoted 1 line

I've adjusted that and applied. Thanks!

Thank you!

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas