Stage 2 gcc fails with missing symbols I eventually figured out it was because these were set in my /etc/portage/make.conf AR="gcc-ar" NM="gcc-nm" RANLIB="gcc-ranlib" Is there a way crossdev could warn they are set, or override them to the correct values, this took a very long time to figure out what was causing the failure Error attached It happened with gcc-9.3.0 too I also had issues if default-gold was set on binutils, I think gcc normally forces ld.bfd when it's built Reproducible: Always
Created attachment 639802 [details] Stage 2 build error
Yeah, cross-x86_64-w64-mingw32/gcc is tricky. It's techicaly a package that is not cross-compiled, but is a cross-compiler itself. It has to distinct between AR_FOR_BOUL/AR_FOR_HOST/AR_FOR_TARGET. I think AR= makes all 3 being lumped together. I need to explore it a bit more but it's probably 2 things: - toolchain.eclass assumes AR= to be applied for HOST - toolchain-funcs.eclass's tc-getAR has a nasty fallback from CTARGET to CHOST of CTARGET is not present.