All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] ostree: workaround compile error with option gcc option -Og
@ 2021-12-03  3:21 Hongxu Jia
  0 siblings, 0 replies; only message in thread
From: Hongxu Jia @ 2021-12-03  3:21 UTC (permalink / raw)
  To: raj.khem; +Cc: openembedded-devel

While DEBUG_BUILD = "1" in local.conf, `-Og' is added to cfalgs by Yocto,
it broke ostree build with `-Werror=aggregate-return' (the
-Werror=aggregate-return is added by ostree configure.ac)

So remove -Og and use -O2 as workaround

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta-oe/recipes-extended/ostree/ostree_2021.6.bb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta-oe/recipes-extended/ostree/ostree_2021.6.bb b/meta-oe/recipes-extended/ostree/ostree_2021.6.bb
index 9e0f7bc7c..d2d5dc0aa 100644
--- a/meta-oe/recipes-extended/ostree/ostree_2021.6.bb
+++ b/meta-oe/recipes-extended/ostree/ostree_2021.6.bb
@@ -29,6 +29,14 @@ S = "${WORKDIR}/git"
 
 inherit autotools bash-completion gobject-introspection gtk-doc manpages pkgconfig ptest-gnome systemd
 
+# Workaround compile failure:
+# |../git/src/libotutil/zbase32.c:37:1: error: function returns an aggregate [-Werror=aggregate-return]
+# so remove -Og and use -O2 as workaround
+DEBUG_OPTIMIZATION:remove = "-Og"
+DEBUG_OPTIMIZATION:append = " -O2"
+BUILD_OPTIMIZATION:remove = "-Og"
+BUILD_OPTIMIZATION:append = " -O2"
+
 # Package configuration - match ostree defaults, but without rofiles-fuse
 # otherwise we introduce a dependendency on meta-filesystems
 PACKAGECONFIG ??= " \
-- 
2.27.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-03  3:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  3:21 [meta-oe][PATCH] ostree: workaround compile error with option gcc option -Og Hongxu Jia

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.