All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/proj: fix build failure due to gcc bug 68485(C++)
@ 2019-12-31 15:09 Giulio Benetti
  2020-01-01 15:54 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Giulio Benetti @ 2019-12-31 15:09 UTC (permalink / raw)
  To: buildroot

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/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/proj/proj.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/proj/proj.mk b/package/proj/proj.mk
index ca943141ce..6b3d219953 100644
--- a/package/proj/proj.mk
+++ b/package/proj/proj.mk
@@ -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))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] package/proj: fix build failure due to gcc bug 68485(C++)
  2019-12-31 15:09 [Buildroot] [PATCH] package/proj: fix build failure due to gcc bug 68485(C++) Giulio Benetti
@ 2020-01-01 15:54 ` Thomas Petazzoni
  2020-01-01 16:00   ` Giulio Benetti
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2020-01-01 15:54 UTC (permalink / raw)
  To: buildroot

On Tue, 31 Dec 2019 16:09:57 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> +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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] package/proj: fix build failure due to gcc bug 68485(C++)
  2020-01-01 15:54 ` Thomas Petazzoni
@ 2020-01-01 16:00   ` Giulio Benetti
  0 siblings, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2020-01-01 16:00 UTC (permalink / raw)
  To: buildroot

On 1/1/20 4:54 PM, Thomas Petazzoni wrote:
> On Tue, 31 Dec 2019 16:09:57 +0100
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>> +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.

> I've adjusted that and applied. Thanks!

Thank you!

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-01 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-31 15:09 [Buildroot] [PATCH] package/proj: fix build failure due to gcc bug 68485(C++) Giulio Benetti
2020-01-01 15:54 ` Thomas Petazzoni
2020-01-01 16:00   ` Giulio Benetti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.