line 59 of ebuild: use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly" So this line enables x86/gcc-assembly for mutexes, even when crosscompiling. So my target architecture is ARM and build fails: ***** ../dist/../mutex/mut_tas.c:118: warning: matching constraint does not allow a register<br> ../dist/../mutex/mut_tas.c:118: warning: matching constraint does not allow a register<br> ../dist/../mutex/mut_tas.c:118: error: impossible constraint in `asm' ***** Because right value for ARM arch is "ARM/gcc-assembly". When I changed this line in ebuild everything compiled.
This option comes from the amd64 team. In any case I don't really know how to properly do crosscompiling on gentoo. Shouldn't "use amd64" be false when compiling to an ARM system?
Yes, amd64 flag is false for ARM. But portage doesn't support crosscompiling yet so it uses USE flags of parent system. I can only manually disable some of them and add new flags. May be it is better to determine architecture by using CHOST variable? For amd64 it starts with "x86_64" and for arm it starts from "arm".
This was fixed in Portage IIRC.