All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gcc: Allow using libc++
@ 2024-03-28 15:43 Daniel McGregor
  2024-03-28 16:11 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel McGregor @ 2024-03-28 15:43 UTC (permalink / raw)
  To: openembedded-core; +Cc: Daniel McGregor

With the addition of the C++ runtime setting added recently, allow
gcc to use libc++ as its runtime. There's some minor fixes still
required, such as allowing setting the unwinder library. But this
allows for testing libc++ with gcc.

Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
---
 meta/recipes-devtools/gcc/gcc-13.2.inc           | 6 ------
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
 meta/recipes-devtools/gcc/gcc-cross.inc          | 1 +
 meta/recipes-devtools/gcc/gcc-target.inc         | 1 +
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc b/meta/recipes-devtools/gcc/gcc-13.2.inc
index 603377a49a2..a19ceadeaae 100644
--- a/meta/recipes-devtools/gcc/gcc-13.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
@@ -109,11 +109,5 @@ EXTRA_OECONF_INITIAL = "\
     --disable-libssp \
 "
 
-EXTRA_OECONF_PATHS = "\
-    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
-    --with-sysroot=/not/exist \
-    --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
-
 CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
 CVE_STATUS[CVE-2023-4039] = "fixed-version: Fixed via CVE-2023-4039.patch included here. Set the status explictly to deal with all recipes that share the gcc-source"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index ec87b462193..7c4233c2115 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -12,6 +12,7 @@ require gcc-configure-common.inc
 EXTRA_OECONF += "--with-plugin-ld=ld"
 EXTRA_OECONF_PATHS = "\
     --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
+    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
     --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
     --with-sysroot=/not/exist \
     --with-build-sysroot=${STAGING_DIR_TARGET} \
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index a540fb2434a..5b0ca15d476 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -37,6 +37,7 @@ EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
 
 EXTRA_OECONF_PATHS = "\
     --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
+    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
     --with-sysroot=/not/exist \
     --with-build-sysroot=${STAGING_DIR_TARGET} \
 "
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 7dac3ef422c..82da5ef82be 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -2,6 +2,7 @@ GCCMULTILIB = "--enable-multilib"
 require gcc-configure-common.inc
 
 EXTRA_OECONF_PATHS = "\
+    --with-gxx-libcxx-include-dir=${target_includedir}/c++/v1 \
     --with-build-sysroot=${STAGING_DIR_TARGET} \
 "
 
-- 
2.41.0



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

* Re: [OE-core] [PATCH] gcc: Allow using libc++
  2024-03-28 15:43 [PATCH] gcc: Allow using libc++ Daniel McGregor
@ 2024-03-28 16:11 ` Khem Raj
  2024-03-28 16:28   ` Dan McGregor
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2024-03-28 16:11 UTC (permalink / raw)
  To: Dan McGregor; +Cc: openembedded-core, Daniel McGregor

On Thu, Mar 28, 2024 at 8:43 AM Dan McGregor <danismostlikely@gmail.com> wrote:
>
> With the addition of the C++ runtime setting added recently, allow
> gcc to use libc++ as its runtime. There's some minor fixes still
> required, such as allowing setting the unwinder library. But this
> allows for testing libc++ with gcc.
>
> Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
> ---
>  meta/recipes-devtools/gcc/gcc-13.2.inc           | 6 ------
>  meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
>  meta/recipes-devtools/gcc/gcc-cross.inc          | 1 +
>  meta/recipes-devtools/gcc/gcc-target.inc         | 1 +
>  4 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc b/meta/recipes-devtools/gcc/gcc-13.2.inc
> index 603377a49a2..a19ceadeaae 100644
> --- a/meta/recipes-devtools/gcc/gcc-13.2.inc
> +++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
> @@ -109,11 +109,5 @@ EXTRA_OECONF_INITIAL = "\
>      --disable-libssp \
>  "
>
> -EXTRA_OECONF_PATHS = "\
> -    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
> -    --with-sysroot=/not/exist \
> -    --with-build-sysroot=${STAGING_DIR_TARGET} \
> -"

this include is used by almost all of gcc based recipes including
runtime libraries
if we remove it here, then I guess they will be impacted in some way.
e.g. libgcc
Can you check what the effect is ?

> -
>  CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
>  CVE_STATUS[CVE-2023-4039] = "fixed-version: Fixed via CVE-2023-4039.patch included here. Set the status explictly to deal with all recipes that share the gcc-source"
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> index ec87b462193..7c4233c2115 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> @@ -12,6 +12,7 @@ require gcc-configure-common.inc
>  EXTRA_OECONF += "--with-plugin-ld=ld"
>  EXTRA_OECONF_PATHS = "\
>      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
>      --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
>      --with-sysroot=/not/exist \
>      --with-build-sysroot=${STAGING_DIR_TARGET} \
> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> index a540fb2434a..5b0ca15d476 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> @@ -37,6 +37,7 @@ EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
>
>  EXTRA_OECONF_PATHS = "\
>      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
>      --with-sysroot=/not/exist \
>      --with-build-sysroot=${STAGING_DIR_TARGET} \
>  "
> diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> index 7dac3ef422c..82da5ef82be 100644
> --- a/meta/recipes-devtools/gcc/gcc-target.inc
> +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> @@ -2,6 +2,7 @@ GCCMULTILIB = "--enable-multilib"
>  require gcc-configure-common.inc
>
>  EXTRA_OECONF_PATHS = "\
> +    --with-gxx-libcxx-include-dir=${target_includedir}/c++/v1 \
>      --with-build-sysroot=${STAGING_DIR_TARGET} \
>  "
>
> --
> 2.41.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#197582): https://lists.openembedded.org/g/openembedded-core/message/197582
> Mute This Topic: https://lists.openembedded.org/mt/105199106/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH] gcc: Allow using libc++
  2024-03-28 16:11 ` [OE-core] " Khem Raj
@ 2024-03-28 16:28   ` Dan McGregor
  2024-03-28 16:59     ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Dan McGregor @ 2024-03-28 16:28 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core, Daniel McGregor

On Thu, 28 Mar 2024 at 10:11, Khem Raj <raj.khem@gmail.com> wrote:
>
> On Thu, Mar 28, 2024 at 8:43 AM Dan McGregor <danismostlikely@gmail.com> wrote:
> >
> > With the addition of the C++ runtime setting added recently, allow
> > gcc to use libc++ as its runtime. There's some minor fixes still
> > required, such as allowing setting the unwinder library. But this
> > allows for testing libc++ with gcc.
> >
> > Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
> > ---
> >  meta/recipes-devtools/gcc/gcc-13.2.inc           | 6 ------
> >  meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
> >  meta/recipes-devtools/gcc/gcc-cross.inc          | 1 +
> >  meta/recipes-devtools/gcc/gcc-target.inc         | 1 +
> >  4 files changed, 3 insertions(+), 6 deletions(-)
> >
> > diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > index 603377a49a2..a19ceadeaae 100644
> > --- a/meta/recipes-devtools/gcc/gcc-13.2.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > @@ -109,11 +109,5 @@ EXTRA_OECONF_INITIAL = "\
> >      --disable-libssp \
> >  "
> >
> > -EXTRA_OECONF_PATHS = "\
> > -    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
> > -    --with-sysroot=/not/exist \
> > -    --with-build-sysroot=${STAGING_DIR_TARGET} \
> > -"
>
> this include is used by almost all of gcc based recipes including
> runtime libraries
> if we remove it here, then I guess they will be impacted in some way.
> e.g. libgcc
> Can you check what the effect is ?

All of the recipes I looked at explicitly set this value
independently, either in the recipe, or another common(ish) include
file.
I thought about leaving this in, but it threw me off when I started
this, so I figured it's best to remove it so others don't hit the same
issue.

>
> > -
> >  CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
> >  CVE_STATUS[CVE-2023-4039] = "fixed-version: Fixed via CVE-2023-4039.patch included here. Set the status explictly to deal with all recipes that share the gcc-source"
> > diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > index ec87b462193..7c4233c2115 100644
> > --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > @@ -12,6 +12,7 @@ require gcc-configure-common.inc
> >  EXTRA_OECONF += "--with-plugin-ld=ld"
> >  EXTRA_OECONF_PATHS = "\
> >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> >      --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> >      --with-sysroot=/not/exist \
> >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> > index a540fb2434a..5b0ca15d476 100644
> > --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> > @@ -37,6 +37,7 @@ EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
> >
> >  EXTRA_OECONF_PATHS = "\
> >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> >      --with-sysroot=/not/exist \
> >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> >  "
> > diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> > index 7dac3ef422c..82da5ef82be 100644
> > --- a/meta/recipes-devtools/gcc/gcc-target.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> > @@ -2,6 +2,7 @@ GCCMULTILIB = "--enable-multilib"
> >  require gcc-configure-common.inc
> >
> >  EXTRA_OECONF_PATHS = "\
> > +    --with-gxx-libcxx-include-dir=${target_includedir}/c++/v1 \
> >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> >  "
> >
> > --
> > 2.41.0
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#197582): https://lists.openembedded.org/g/openembedded-core/message/197582
> > Mute This Topic: https://lists.openembedded.org/mt/105199106/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >


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

* Re: [OE-core] [PATCH] gcc: Allow using libc++
  2024-03-28 16:28   ` Dan McGregor
@ 2024-03-28 16:59     ` Khem Raj
  2024-03-28 17:06       ` Dan McGregor
       [not found]       ` <17C0FCA0F8780678.1578@lists.openembedded.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Khem Raj @ 2024-03-28 16:59 UTC (permalink / raw)
  To: Dan McGregor; +Cc: openembedded-core, Daniel McGregor

On Thu, Mar 28, 2024 at 9:29 AM Dan McGregor <danismostlikely@gmail.com> wrote:
>
> On Thu, 28 Mar 2024 at 10:11, Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Thu, Mar 28, 2024 at 8:43 AM Dan McGregor <danismostlikely@gmail.com> wrote:
> > >
> > > With the addition of the C++ runtime setting added recently, allow
> > > gcc to use libc++ as its runtime. There's some minor fixes still
> > > required, such as allowing setting the unwinder library. But this
> > > allows for testing libc++ with gcc.
> > >
> > > Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
> > > ---
> > >  meta/recipes-devtools/gcc/gcc-13.2.inc           | 6 ------
> > >  meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
> > >  meta/recipes-devtools/gcc/gcc-cross.inc          | 1 +
> > >  meta/recipes-devtools/gcc/gcc-target.inc         | 1 +
> > >  4 files changed, 3 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > index 603377a49a2..a19ceadeaae 100644
> > > --- a/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > +++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > @@ -109,11 +109,5 @@ EXTRA_OECONF_INITIAL = "\
> > >      --disable-libssp \
> > >  "
> > >
> > > -EXTRA_OECONF_PATHS = "\
> > > -    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
> > > -    --with-sysroot=/not/exist \
> > > -    --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > -"
> >
> > this include is used by almost all of gcc based recipes including
> > runtime libraries
> > if we remove it here, then I guess they will be impacted in some way.
> > e.g. libgcc
> > Can you check what the effect is ?
>
> All of the recipes I looked at explicitly set this value
> independently, either in the recipe, or another common(ish) include
> file.
> I thought about leaving this in, but it threw me off when I started
> this, so I figured it's best to remove it so others don't hit the same
> issue.

If it is redundant then perhaps its ok, I would suggest to do nativesdk builds
and mingw builds with this change.

>
> >
> > > -
> > >  CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
> > >  CVE_STATUS[CVE-2023-4039] = "fixed-version: Fixed via CVE-2023-4039.patch included here. Set the status explictly to deal with all recipes that share the gcc-source"
> > > diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > index ec87b462193..7c4233c2115 100644
> > > --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > @@ -12,6 +12,7 @@ require gcc-configure-common.inc
> > >  EXTRA_OECONF += "--with-plugin-ld=ld"
> > >  EXTRA_OECONF_PATHS = "\
> > >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> > >      --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> > >      --with-sysroot=/not/exist \
> > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> > > index a540fb2434a..5b0ca15d476 100644
> > > --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> > > +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> > > @@ -37,6 +37,7 @@ EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
> > >
> > >  EXTRA_OECONF_PATHS = "\
> > >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> > >      --with-sysroot=/not/exist \
> > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > >  "
> > > diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> > > index 7dac3ef422c..82da5ef82be 100644
> > > --- a/meta/recipes-devtools/gcc/gcc-target.inc
> > > +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> > > @@ -2,6 +2,7 @@ GCCMULTILIB = "--enable-multilib"
> > >  require gcc-configure-common.inc
> > >
> > >  EXTRA_OECONF_PATHS = "\
> > > +    --with-gxx-libcxx-include-dir=${target_includedir}/c++/v1 \
> > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > >  "
> > >
> > > --
> > > 2.41.0
> > >
> > >
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > > Links: You receive all messages sent to this group.
> > > View/Reply Online (#197582): https://lists.openembedded.org/g/openembedded-core/message/197582
> > > Mute This Topic: https://lists.openembedded.org/mt/105199106/1997914
> > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > > -=-=-=-=-=-=-=-=-=-=-=-
> > >


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

* Re: [OE-core] [PATCH] gcc: Allow using libc++
  2024-03-28 16:59     ` Khem Raj
@ 2024-03-28 17:06       ` Dan McGregor
       [not found]       ` <17C0FCA0F8780678.1578@lists.openembedded.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Dan McGregor @ 2024-03-28 17:06 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core, Daniel McGregor

On Thu, 28 Mar 2024 at 10:59, Khem Raj <raj.khem@gmail.com> wrote:
>
> On Thu, Mar 28, 2024 at 9:29 AM Dan McGregor <danismostlikely@gmail.com> wrote:
> >
> > On Thu, 28 Mar 2024 at 10:11, Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > On Thu, Mar 28, 2024 at 8:43 AM Dan McGregor <danismostlikely@gmail.com> wrote:
> > > >
> > > > With the addition of the C++ runtime setting added recently, allow
> > > > gcc to use libc++ as its runtime. There's some minor fixes still
> > > > required, such as allowing setting the unwinder library. But this
> > > > allows for testing libc++ with gcc.
> > > >
> > > > Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
> > > > ---
> > > >  meta/recipes-devtools/gcc/gcc-13.2.inc           | 6 ------
> > > >  meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
> > > >  meta/recipes-devtools/gcc/gcc-cross.inc          | 1 +
> > > >  meta/recipes-devtools/gcc/gcc-target.inc         | 1 +
> > > >  4 files changed, 3 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > > index 603377a49a2..a19ceadeaae 100644
> > > > --- a/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > > +++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > > @@ -109,11 +109,5 @@ EXTRA_OECONF_INITIAL = "\
> > > >      --disable-libssp \
> > > >  "
> > > >
> > > > -EXTRA_OECONF_PATHS = "\
> > > > -    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
> > > > -    --with-sysroot=/not/exist \
> > > > -    --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > > -"
> > >
> > > this include is used by almost all of gcc based recipes including
> > > runtime libraries
> > > if we remove it here, then I guess they will be impacted in some way.
> > > e.g. libgcc
> > > Can you check what the effect is ?
> >
> > All of the recipes I looked at explicitly set this value
> > independently, either in the recipe, or another common(ish) include
> > file.
> > I thought about leaving this in, but it threw me off when I started
> > this, so I figured it's best to remove it so others don't hit the same
> > issue.
>
> If it is redundant then perhaps its ok, I would suggest to do nativesdk builds
> and mingw builds with this change.

Ah, yes. I didn't try mingw. I did try nativesdk, though.

>
> >
> > >
> > > > -
> > > >  CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
> > > >  CVE_STATUS[CVE-2023-4039] = "fixed-version: Fixed via CVE-2023-4039.patch included here. Set the status explictly to deal with all recipes that share the gcc-source"
> > > > diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > > index ec87b462193..7c4233c2115 100644
> > > > --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > > +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > > @@ -12,6 +12,7 @@ require gcc-configure-common.inc
> > > >  EXTRA_OECONF += "--with-plugin-ld=ld"
> > > >  EXTRA_OECONF_PATHS = "\
> > > >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > > > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> > > >      --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> > > >      --with-sysroot=/not/exist \
> > > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > > diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> > > > index a540fb2434a..5b0ca15d476 100644
> > > > --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> > > > +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> > > > @@ -37,6 +37,7 @@ EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
> > > >
> > > >  EXTRA_OECONF_PATHS = "\
> > > >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > > > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> > > >      --with-sysroot=/not/exist \
> > > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > >  "
> > > > diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> > > > index 7dac3ef422c..82da5ef82be 100644
> > > > --- a/meta/recipes-devtools/gcc/gcc-target.inc
> > > > +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> > > > @@ -2,6 +2,7 @@ GCCMULTILIB = "--enable-multilib"
> > > >  require gcc-configure-common.inc
> > > >
> > > >  EXTRA_OECONF_PATHS = "\
> > > > +    --with-gxx-libcxx-include-dir=${target_includedir}/c++/v1 \
> > > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > >  "
> > > >
> > > > --
> > > > 2.41.0
> > > >
> > > >
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > > Links: You receive all messages sent to this group.
> > > > View/Reply Online (#197582): https://lists.openembedded.org/g/openembedded-core/message/197582
> > > > Mute This Topic: https://lists.openembedded.org/mt/105199106/1997914
> > > > Group Owner: openembedded-core+owner@lists.openembedded.org
> > > > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > > > -=-=-=-=-=-=-=-=-=-=-=-
> > > >


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

* Re: [OE-core] [PATCH] gcc: Allow using libc++
       [not found]       ` <17C0FCA0F8780678.1578@lists.openembedded.org>
@ 2024-03-28 21:34         ` Dan McGregor
  0 siblings, 0 replies; 6+ messages in thread
From: Dan McGregor @ 2024-03-28 21:34 UTC (permalink / raw)
  To: danismostlikely; +Cc: Khem Raj, openembedded-core, Daniel McGregor

On Thu, 28 Mar 2024 at 11:07, Dan McGregor via lists.openembedded.org
<danismostlikely=gmail.com@lists.openembedded.org> wrote:
>
> On Thu, 28 Mar 2024 at 10:59, Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Thu, Mar 28, 2024 at 9:29 AM Dan McGregor <danismostlikely@gmail.com> wrote:
> > >
> > > On Thu, 28 Mar 2024 at 10:11, Khem Raj <raj.khem@gmail.com> wrote:
> > > >
> > > > On Thu, Mar 28, 2024 at 8:43 AM Dan McGregor <danismostlikely@gmail.com> wrote:
> > > > >
> > > > > With the addition of the C++ runtime setting added recently, allow
> > > > > gcc to use libc++ as its runtime. There's some minor fixes still
> > > > > required, such as allowing setting the unwinder library. But this
> > > > > allows for testing libc++ with gcc.
> > > > >
> > > > > Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
> > > > > ---
> > > > >  meta/recipes-devtools/gcc/gcc-13.2.inc           | 6 ------
> > > > >  meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 1 +
> > > > >  meta/recipes-devtools/gcc/gcc-cross.inc          | 1 +
> > > > >  meta/recipes-devtools/gcc/gcc-target.inc         | 1 +
> > > > >  4 files changed, 3 insertions(+), 6 deletions(-)
> > > > >
> > > > > diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > > > index 603377a49a2..a19ceadeaae 100644
> > > > > --- a/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > > > +++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
> > > > > @@ -109,11 +109,5 @@ EXTRA_OECONF_INITIAL = "\
> > > > >      --disable-libssp \
> > > > >  "
> > > > >
> > > > > -EXTRA_OECONF_PATHS = "\
> > > > > -    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
> > > > > -    --with-sysroot=/not/exist \
> > > > > -    --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > > > -"
> > > >
> > > > this include is used by almost all of gcc based recipes including
> > > > runtime libraries
> > > > if we remove it here, then I guess they will be impacted in some way.
> > > > e.g. libgcc
> > > > Can you check what the effect is ?
> > >
> > > All of the recipes I looked at explicitly set this value
> > > independently, either in the recipe, or another common(ish) include
> > > file.
> > > I thought about leaving this in, but it threw me off when I started
> > > this, so I figured it's best to remove it so others don't hit the same
> > > issue.
> >
> > If it is redundant then perhaps its ok, I would suggest to do nativesdk builds
> > and mingw builds with this change.
>
> Ah, yes. I didn't try mingw. I did try nativesdk, though.

Okay, so I tested this out with mingw and nativesdk again. libgcc,
libgcc-initial, nativesdk-libgcc-initial, and nativesdk-libgcc lose
the extra paths settings, but they also don't use them. Those settings
are used to configure the compiler itself, and the build gets the
sysroot settings and such directly from our cross compiler.

So I think setting this here is unnecessary. If we really want to set
those values for libgcc* maybe I can put them in libgcc-common.inc.

>
> >
> > >
> > > >
> > > > > -
> > > > >  CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc"
> > > > >  CVE_STATUS[CVE-2023-4039] = "fixed-version: Fixed via CVE-2023-4039.patch included here. Set the status explictly to deal with all recipes that share the gcc-source"
> > > > > diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > > > index ec87b462193..7c4233c2115 100644
> > > > > --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > > > +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > > > > @@ -12,6 +12,7 @@ require gcc-configure-common.inc
> > > > >  EXTRA_OECONF += "--with-plugin-ld=ld"
> > > > >  EXTRA_OECONF_PATHS = "\
> > > > >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > > > > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> > > > >      --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> > > > >      --with-sysroot=/not/exist \
> > > > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > > > diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
> > > > > index a540fb2434a..5b0ca15d476 100644
> > > > > --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> > > > > +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> > > > > @@ -37,6 +37,7 @@ EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix"
> > > > >
> > > > >  EXTRA_OECONF_PATHS = "\
> > > > >      --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \
> > > > > +    --with-gxx-libcxx-include-dir=/not/exist${target_includedir}/c++/v1 \
> > > > >      --with-sysroot=/not/exist \
> > > > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > > >  "
> > > > > diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> > > > > index 7dac3ef422c..82da5ef82be 100644
> > > > > --- a/meta/recipes-devtools/gcc/gcc-target.inc
> > > > > +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> > > > > @@ -2,6 +2,7 @@ GCCMULTILIB = "--enable-multilib"
> > > > >  require gcc-configure-common.inc
> > > > >
> > > > >  EXTRA_OECONF_PATHS = "\
> > > > > +    --with-gxx-libcxx-include-dir=${target_includedir}/c++/v1 \
> > > > >      --with-build-sysroot=${STAGING_DIR_TARGET} \
> > > > >  "
> > > > >
> > > > > --
> > > > > 2.41.0
> > > > >
> > > > >
> > > > >
> > > > >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#197598): https://lists.openembedded.org/g/openembedded-core/message/197598
> Mute This Topic: https://lists.openembedded.org/mt/105199106/3617261
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [danismostlikely@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

end of thread, other threads:[~2024-03-28 21:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 15:43 [PATCH] gcc: Allow using libc++ Daniel McGregor
2024-03-28 16:11 ` [OE-core] " Khem Raj
2024-03-28 16:28   ` Dan McGregor
2024-03-28 16:59     ` Khem Raj
2024-03-28 17:06       ` Dan McGregor
     [not found]       ` <17C0FCA0F8780678.1578@lists.openembedded.org>
2024-03-28 21:34         ` Dan McGregor

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.