All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "cmake.bbclass: Set CXXFLAGS and CFLAGS"
@ 2022-02-28 16:37 Jose Quaresma
  2022-03-01  4:17 ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Jose Quaresma @ 2022-02-28 16:37 UTC (permalink / raw)
  To: openembedded-core; +Cc: raj.khem, Jose Quaresma

This reverts commit 47594d59ec4ab82fcf87d3c590caf7c46a6bfdff.

This patch was introduced 5 years ago as a temporary workaround
to fix an upstream bug.

Currently with that patch the following flags are duplicated:
 OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
 OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
 OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"

The duplicated flags is used in the toolchain.cmake:
 set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
 set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
 set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )

CC: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
 meta/classes/cmake.bbclass | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index fac7bbca7a..d9bcddbdbb 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -31,8 +31,6 @@ OECMAKE_C_FLAGS_RELEASE ?= "-DNDEBUG"
 OECMAKE_CXX_FLAGS_RELEASE ?= "-DNDEBUG"
 OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
 OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"
-CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
-CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
 
 def oecmake_map_compiler(compiler, d):
     args = d.getVar(compiler).split()
-- 
2.35.1



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

* Re: [PATCH] Revert "cmake.bbclass: Set CXXFLAGS and CFLAGS"
  2022-02-28 16:37 [PATCH] Revert "cmake.bbclass: Set CXXFLAGS and CFLAGS" Jose Quaresma
@ 2022-03-01  4:17 ` Khem Raj
  2022-03-01  7:50   ` [OE-core] " Richard Purdie
  2022-03-02  0:29   ` Jose Quaresma
  0 siblings, 2 replies; 5+ messages in thread
From: Khem Raj @ 2022-03-01  4:17 UTC (permalink / raw)
  To: Jose Quaresma; +Cc: Patches and discussions about the oe-core layer

this is fixing more than the workaround, e.g. see the patch I sent to
fix libical, where these flags are not passed to git compiler when
using cmake
I am not sure how many such fallouts there will be through out.

On Mon, Feb 28, 2022 at 8:37 AM Jose Quaresma <quaresma.jose@gmail.com> wrote:
>
> This reverts commit 47594d59ec4ab82fcf87d3c590caf7c46a6bfdff.
>
> This patch was introduced 5 years ago as a temporary workaround
> to fix an upstream bug.
>
> Currently with that patch the following flags are duplicated:
>  OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
>  OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
>  OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"
>
> The duplicated flags is used in the toolchain.cmake:
>  set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
>  set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
>  set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
>
> CC: Khem Raj <raj.khem@gmail.com>
> Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
> ---
>  meta/classes/cmake.bbclass | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index fac7bbca7a..d9bcddbdbb 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -31,8 +31,6 @@ OECMAKE_C_FLAGS_RELEASE ?= "-DNDEBUG"
>  OECMAKE_CXX_FLAGS_RELEASE ?= "-DNDEBUG"
>  OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
>  OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"
> -CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
> -CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
>
>  def oecmake_map_compiler(compiler, d):
>      args = d.getVar(compiler).split()
> --
> 2.35.1
>


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

* Re: [OE-core] [PATCH] Revert "cmake.bbclass: Set CXXFLAGS and CFLAGS"
  2022-03-01  4:17 ` Khem Raj
@ 2022-03-01  7:50   ` Richard Purdie
  2022-03-02  0:42     ` Jose Quaresma
  2022-03-02  0:29   ` Jose Quaresma
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2022-03-01  7:50 UTC (permalink / raw)
  To: Khem Raj, Jose Quaresma; +Cc: Patches and discussions about the oe-core layer

On Mon, 2022-02-28 at 20:17 -0800, Khem Raj wrote:
> this is fixing more than the workaround, e.g. see the patch I sent to
> fix libical, where these flags are not passed to git compiler when
> using cmake
> I am not sure how many such fallouts there will be through out.

The error Khem mentions is here:

https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/4839/steps/11/logs/stdio

with multiple other failures in that build in libical. I'm worried about other
failures resulting from this change.

Cheers,

Richard



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

* Re: [PATCH] Revert "cmake.bbclass: Set CXXFLAGS and CFLAGS"
  2022-03-01  4:17 ` Khem Raj
  2022-03-01  7:50   ` [OE-core] " Richard Purdie
@ 2022-03-02  0:29   ` Jose Quaresma
  1 sibling, 0 replies; 5+ messages in thread
From: Jose Quaresma @ 2022-03-02  0:29 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2433 bytes --]

Khem Raj <raj.khem@gmail.com> escreveu no dia terça, 1/03/2022 à(s) 04:18:

> this is fixing more than the workaround, e.g. see the patch I sent to
> fix libical, where these flags are not passed to git compiler when
> using cmake
> I am not sure how many such fallouts there will be through out.
>

I have looked on the libcal and I think that it is another issue with
the g-ir-scanner-wrapper
that doesn't use the cmake cflags CMAKE_C_FLAGS.
I can build the libcal with this patch disabling the gobject-introspection
with GI_DATA_ENABLED = "False"

Jose


> On Mon, Feb 28, 2022 at 8:37 AM Jose Quaresma <quaresma.jose@gmail.com>
> wrote:
> >
> > This reverts commit 47594d59ec4ab82fcf87d3c590caf7c46a6bfdff.
> >
> > This patch was introduced 5 years ago as a temporary workaround
> > to fix an upstream bug.
> >
> > Currently with that patch the following flags are duplicated:
> >  OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
> >  OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
> ${CPPFLAGS} ${LDFLAGS}"
> >  OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
> ${CXXFLAGS} ${LDFLAGS}"
> >
> > The duplicated flags is used in the toolchain.cmake:
> >  set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
> >  set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
> >  set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING
> "LDFLAGS" )
> >
> > CC: Khem Raj <raj.khem@gmail.com>
> > Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
> > ---
> >  meta/classes/cmake.bbclass | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> > index fac7bbca7a..d9bcddbdbb 100644
> > --- a/meta/classes/cmake.bbclass
> > +++ b/meta/classes/cmake.bbclass
> > @@ -31,8 +31,6 @@ OECMAKE_C_FLAGS_RELEASE ?= "-DNDEBUG"
> >  OECMAKE_CXX_FLAGS_RELEASE ?= "-DNDEBUG"
> >  OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
> ${CPPFLAGS} ${LDFLAGS}"
> >  OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}
> ${CXXFLAGS} ${LDFLAGS}"
> > -CXXFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
> > -CFLAGS += "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}"
> >
> >  def oecmake_map_compiler(compiler, d):
> >      args = d.getVar(compiler).split()
> > --
> > 2.35.1
> >
>


-- 
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 3620 bytes --]

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

* Re: [OE-core] [PATCH] Revert "cmake.bbclass: Set CXXFLAGS and CFLAGS"
  2022-03-01  7:50   ` [OE-core] " Richard Purdie
@ 2022-03-02  0:42     ` Jose Quaresma
  0 siblings, 0 replies; 5+ messages in thread
From: Jose Quaresma @ 2022-03-02  0:42 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Khem Raj, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia terça,
1/03/2022 à(s) 07:50:

> On Mon, 2022-02-28 at 20:17 -0800, Khem Raj wrote:
> > this is fixing more than the workaround, e.g. see the patch I sent to
> > fix libical, where these flags are not passed to git compiler when
> > using cmake
> > I am not sure how many such fallouts there will be through out.
>
> The error Khem mentions is here:
>
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/65/builds/4839/steps/11/logs/stdio
>
> with multiple other failures in that build in libical. I'm worried about
> other
> failures resulting from this change.
>

Thanks for the link, I can reproduce it on my side and it fails when
the gobject-introspection is enabled
and as I said to Khem I think that it's not related to cmake.
However I will try to build more cmake on oe-core to see if there are more
issues.

Without this patch none of the following variables makes much sense:

OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS}"
OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS}
${LDFLAGS}"
OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS}
${LDFLAGS}"

Jose


> Cheers,
>
> Richard
>
>

-- 
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 2313 bytes --]

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

end of thread, other threads:[~2022-03-02  0:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 16:37 [PATCH] Revert "cmake.bbclass: Set CXXFLAGS and CFLAGS" Jose Quaresma
2022-03-01  4:17 ` Khem Raj
2022-03-01  7:50   ` [OE-core] " Richard Purdie
2022-03-02  0:42     ` Jose Quaresma
2022-03-02  0:29   ` Jose Quaresma

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.