Hello, I am working on LLVM/Clang support for Crossdev, and I propose a new eclass for cross compilation. This is mostly due to boilerplate currently shared by a lot of ebuilds.
One snippet of code that's used by basically all cross ebuilds is: > export CBUILD=${CBUILD:-${CHOST}} > export CTARGET=${CTARGET:-${CHOST}} > if [[ ${CTARGET} == ${CHOST} ]] ; then > if [[ ${CATEGORY} == cross-* ]] ; then > export CTARGET=${CATEGORY#cross-} > fi > fi and because I use cross_llvm-* for my categories it becomes even more of a mess. Let me know if this is a good idea, the other way is to inline all of this. Alfred Persson Forsberg (4): cross.eclass: new eclass sys-libs/musl: Support LLVM/Clang crossdev kernel-2.eclass: Use cross.eclass for figuring out CTARGET sys-libs/compiler-rt: Support LLVM/Clang crossdev eclass/cross.eclass | 83 +++++++++++++++++++ eclass/kernel-2.eclass | 7 +- .../compiler-rt-17.0.0.9999.ebuild | 36 +++++++- sys-libs/musl/musl-1.2.4.ebuild | 20 +---- 4 files changed, 120 insertions(+), 26 deletions(-) create mode 100644 eclass/cross.eclass -- 2.41.0