[Buildroot] [git commit] package/apitrace: fix microblaze build failure

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Jun 22 20:51:21 UTC 2020

commit: https://git.buildroot.net/buildroot/commit/?id=ce053a2004d089b3080a750496b3b3b21bcc224d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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


Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.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
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
 # This works around embedded Brotli build failure
+# 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.
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)

More information about the buildroot mailing list