All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/apitrace: fix apitrace microblaze build failure
@ 2020-06-10 16:16 Giulio Benetti
  2020-06-22 20:55 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Giulio Benetti @ 2020-06-10 16:16 UTC (permalink / raw)
  To: buildroot

Apitrace is affected by Gcc Bug 68485 that has already been worked
around, but after version bumping, CMakeLists.txt adds -O2 to
CMAKE_C_FLAGS_RELWITHDEBINFO that is in order appended to CMAKE_C_FLAGS,
making -O0 end appending to fail. To prevent this we need to avoid
CMAKE_C_FLAGS_RELWITHDEBINFO to be appended to CMAKE_C_FLAGS, so let's
do the same as flare-engine package that set CMAKE_BUILD_TYPE to a fake
build type called "buildroot", this way -O2 won't be appended after -O0
and work around restart to work as expected.

Fixes:
http://autobuild.buildroot.net/results/2e3/2e31abd7b115d4c29117ca82007fd4f87f853ff7/

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

diff --git a/package/apitrace/apitrace.mk b/package/apitrace/apitrace.mk
index e4e6c41fed..b962ac01d3 100644
--- a/package/apitrace/apitrace.mk
+++ b/package/apitrace/apitrace.mk
@@ -27,6 +27,10 @@ APITRACE_CXXFLAGS = $(TARGET_CXXFLAGS)
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
 # This works around embedded Brotli build failure
 APITRACE_CFLAGS += -O0
+# CMakeLists.txt sets CMAKE_CXX_FLAGS_<BUILD_TYPE> depending on
+# BUILD_TYPE, and this comes after the generic CMAKE_CXX_FLAGS.
+# Override CMAKE_BUILD_TYPE so no overrides are applied.
+APITRACE_CONF_OPTS += -DCMAKE_BUILD_TYPE=Buildroot
 endif
 
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
-- 
2.25.1

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

* [Buildroot] [PATCH] package/apitrace: fix apitrace microblaze build failure
  2020-06-10 16:16 [Buildroot] [PATCH] package/apitrace: fix apitrace microblaze build failure Giulio Benetti
@ 2020-06-22 20:55 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2020-06-22 20:55 UTC (permalink / raw)
  To: buildroot

On Wed, 10 Jun 2020 18:16:01 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Apitrace is affected by Gcc Bug 68485 that has already been worked
> around, but after version bumping, CMakeLists.txt adds -O2 to
> CMAKE_C_FLAGS_RELWITHDEBINFO that is in order appended to CMAKE_C_FLAGS,
> making -O0 end appending to fail. To prevent this we need to avoid
> CMAKE_C_FLAGS_RELWITHDEBINFO to be appended to CMAKE_C_FLAGS, so let's
> do the same as flare-engine package that set CMAKE_BUILD_TYPE to a fake
> build type called "buildroot", this way -O2 won't be appended after -O0
> and work around restart to work as expected.
> 
> Fixes:
> http://autobuild.buildroot.net/results/2e3/2e31abd7b115d4c29117ca82007fd4f87f853ff7/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  package/apitrace/apitrace.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to master, thanks. I am wondering when this bug will be fixed
in upstream gcc...

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2020-06-22 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 16:16 [Buildroot] [PATCH] package/apitrace: fix apitrace microblaze build failure Giulio Benetti
2020-06-22 20:55 ` Thomas Petazzoni

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.