Message ID | 20240328154340.503623-1-daniel.mcgregor@vecima.com |
---|---|
State | New |
Headers | show |
Series | gcc: Allow using libc++ | expand |
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] > -=-=-=-=-=-=-=-=-=-=-=- >
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] > > -=-=-=-=-=-=-=-=-=-=-=- > >
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] > > > -=-=-=-=-=-=-=-=-=-=-=- > > >
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] > > > > -=-=-=-=-=-=-=-=-=-=-=- > > > >
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] > -=-=-=-=-=-=-=-=-=-=-=- >
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} \ "
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(-)