In crossdev, we have: ``` [...] # Bare metal targets *-newlib|*-elf|*-eabi|*-rtems*) LPKG="newlib" KPKG="[none]" STAGE_DEFAULT=${STAGE_LIBC} [...] ;; ``` which means we only build a C compiler (-s3) with 'crossdev arm-none-eabi'. This ended up confusing a user in #gentoo. I'd say it's probably common for users to not want a freestanding C++ compiler, but I'm not sure if we should warn on it or what.
I was looking at https://forums.gentoo.org/viewtopic-p-8734819.html and this is related to what that user experienced. It looks like when crossdev was developed, it may have been assumed that USE flags were processed such that the first one takes precedence. It's hard to tell what is actually intended behavior in some places in crossdev and what is being done for other reasons. In the case of the forum post above, I see clearly that cross-arm-none-abi contains: cross-arm-none-eabi/gcc cxx -openmp -fortran -hardened -default-stack-clash-protection -ssp -sanitize -vtv -selinux -boundschecking -d -gcj -gtk -libffi -mudflap -objc -objc++ -objc-gc -fortran -go -jit -cxx -mpx -openmp -sanitize -vtv multilib In the crossdev script, line 387, cxx is added to GUSE for -eabi, and later when the use flags are combined in line 1790: USE="${GUSE} ${USE} ${GUSE_DISABLE_STAGE_1}" So the GUSE flags defined are overridden by GUSE_DISABLE_STAGE_1 (which contains -cxx). I wonder if it was intended that the GUSE flags were placed after GUSE_DISABLE_STAGE_1 flags. Not knowing for sure what the intent of these variables are, it is impossible to determine if this was what was meant here...
(In reply to Gil Kloepfer from comment #1) > Not knowing for sure what the intent of these variables are, it is > impossible to determine if this was what was meant here... Looking at this a bit more, and with a clearer head, I retract my previous comments. I think the forum comment, while well-intentioned (and brings-up a good point) misses the purpose of the --stage4 option. It is definitely more efficient to build the c++ compiler at the same time as the c compiler, but whether this is the right thing to do or not is probably something the crossdev team should decide.