| Message ID | 20250518-clang-toolchain-v1-2-5be46f8c4af5@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | clang: Add clang C/C++ toolchain | expand |
On Sun, 2025-05-18 at 14:30 -0700, Khem Raj via lists.openembedded.org wrote: > Some recipes demand either gcc or clang, they can not be compiled > with > both compilers e.g. glibc, gcc, libgcc etc all exclusively need gcc > to > build and similarily, libcxx, compiler-rt need clang compiler to > build > > This header will contain the pinned TOOLCHAIN variable defintions for > such cases > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > --- > meta/conf/distro/include/default-toolchains.inc | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/meta/conf/distro/include/default-toolchains.inc > b/meta/conf/distro/include/default-toolchains.inc > new file mode 100644 > index > 0000000000000000000000000000000000000000..691570a7a9f28187a5c7f6d0a6a > d80761c777e3d > --- /dev/null > +++ b/meta/conf/distro/include/default-toolchains.inc > @@ -0,0 +1,14 @@ > +TOOLCHAIN:pn-gcc = "gcc" > +TOOLCHAIN:pn-gcc-runtime = "gcc" > +TOOLCHAIN:pn-gcc-sanitizers = "gcc" > +TOOLCHAIN:pn-glibc = "gcc" > +TOOLCHAIN:pn-glibc-initial = "gcc" > +TOOLCHAIN:pn-glibc-locale = "gcc" > +TOOLCHAIN:pn-glibc-mtrace = "gcc" > +TOOLCHAIN:pn-glibc-scripts = "gcc" > +TOOLCHAIN:pn-glibc-testsuite = "gcc" > +TOOLCHAIN:pn-glibc-y2038-tests = "gcc" > +TOOLCHAIN:pn-libgcc-initial = "gcc" > +TOOLCHAIN:pn-libgcc = "gcc" > +TOOLCHAIN:pn-libgfortran = "gcc" > +TOOLCHAIN:pn-libssp-nonshared = "gcc" This format made sense when this was in a separate layer but should we be adding this markup directly to the recipes now? Does this markup work in recipes without overrides? I'm a bit worried that our variable syntax doesn't make this work too well at the recipe level. This approach is much more aligned with the direction I think we need to go, we just need to sort the final details like this... Cheers, Richard
On Tue, May 20, 2025 at 7:41 AM Richard Purdie <richard.purdie@linuxfoundation.org> wrote: > > On Sun, 2025-05-18 at 14:30 -0700, Khem Raj via lists.openembedded.org > wrote: > > Some recipes demand either gcc or clang, they can not be compiled > > with > > both compilers e.g. glibc, gcc, libgcc etc all exclusively need gcc > > to > > build and similarily, libcxx, compiler-rt need clang compiler to > > build > > > > This header will contain the pinned TOOLCHAIN variable defintions for > > such cases > > > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > > --- > > meta/conf/distro/include/default-toolchains.inc | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/meta/conf/distro/include/default-toolchains.inc > > b/meta/conf/distro/include/default-toolchains.inc > > new file mode 100644 > > index > > 0000000000000000000000000000000000000000..691570a7a9f28187a5c7f6d0a6a > > d80761c777e3d > > --- /dev/null > > +++ b/meta/conf/distro/include/default-toolchains.inc > > @@ -0,0 +1,14 @@ > > +TOOLCHAIN:pn-gcc = "gcc" > > +TOOLCHAIN:pn-gcc-runtime = "gcc" > > +TOOLCHAIN:pn-gcc-sanitizers = "gcc" > > +TOOLCHAIN:pn-glibc = "gcc" > > +TOOLCHAIN:pn-glibc-initial = "gcc" > > +TOOLCHAIN:pn-glibc-locale = "gcc" > > +TOOLCHAIN:pn-glibc-mtrace = "gcc" > > +TOOLCHAIN:pn-glibc-scripts = "gcc" > > +TOOLCHAIN:pn-glibc-testsuite = "gcc" > > +TOOLCHAIN:pn-glibc-y2038-tests = "gcc" > > +TOOLCHAIN:pn-libgcc-initial = "gcc" > > +TOOLCHAIN:pn-libgcc = "gcc" > > +TOOLCHAIN:pn-libgfortran = "gcc" > > +TOOLCHAIN:pn-libssp-nonshared = "gcc" > > This format made sense when this was in a separate layer but should we > be adding this markup directly to the recipes now? Yes we can, and I would prefer that as well. > > Does this markup work in recipes without overrides? I'm a bit worried > that our variable syntax doesn't make this work too well at the recipe > level. We would not require pn override if it is in the recipe. > > This approach is much more aligned with the direction I think we need > to go, we just need to sort the final details like this... I will move these changes to respective recipes > > Cheers, > > Richard
diff --git a/meta/conf/distro/include/default-toolchains.inc b/meta/conf/distro/include/default-toolchains.inc new file mode 100644 index 0000000000000000000000000000000000000000..691570a7a9f28187a5c7f6d0a6ad80761c777e3d --- /dev/null +++ b/meta/conf/distro/include/default-toolchains.inc @@ -0,0 +1,14 @@ +TOOLCHAIN:pn-gcc = "gcc" +TOOLCHAIN:pn-gcc-runtime = "gcc" +TOOLCHAIN:pn-gcc-sanitizers = "gcc" +TOOLCHAIN:pn-glibc = "gcc" +TOOLCHAIN:pn-glibc-initial = "gcc" +TOOLCHAIN:pn-glibc-locale = "gcc" +TOOLCHAIN:pn-glibc-mtrace = "gcc" +TOOLCHAIN:pn-glibc-scripts = "gcc" +TOOLCHAIN:pn-glibc-testsuite = "gcc" +TOOLCHAIN:pn-glibc-y2038-tests = "gcc" +TOOLCHAIN:pn-libgcc-initial = "gcc" +TOOLCHAIN:pn-libgcc = "gcc" +TOOLCHAIN:pn-libgfortran = "gcc" +TOOLCHAIN:pn-libssp-nonshared = "gcc"
Some recipes demand either gcc or clang, they can not be compiled with both compilers e.g. glibc, gcc, libgcc etc all exclusively need gcc to build and similarily, libcxx, compiler-rt need clang compiler to build This header will contain the pinned TOOLCHAIN variable defintions for such cases Signed-off-by: Khem Raj <raj.khem@gmail.com> --- meta/conf/distro/include/default-toolchains.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+)