If I have CHOST="pentium3-pc-linux-gnu" set in make.conf, then "emerge sys-kernel/linux-headers" returns the following: * This version of linux-headers does not support unknown. * Please merge the appropriate sources, in most cases * (but not all) this will be called unknown-headers. * * ERROR: sys-kernel/linux-headers-2.6.28-r1 failed. * Call stack: * ebuild.sh, line 49: Called pkg_setup * ebuild.sh, line 1286: Called kernel-2_pkg_setup * kernel-2.eclass, line 1089: Called setup_headers * kernel-2.eclass, line 718: Called die * The specific snippet of code: * die "Package unsupported for $(tc-arch)" * The die message: * Package unsupported for unknown * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/sys-kernel/linux-headers-2.6.28-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/linux-headers-2.6.28-r1/temp/die.env'. It would appear that it is expecting only "i*86-pc-linux-gnu". I have my CHOST set to this for the benefit of packages like gmp and mpfr. I can get the package to emerge by overriding CHOST in /etc/portage/env (yuck!) but then "emerge -K sys-kernel/linux-headers" fails with: !!! All ebuilds that could satisfy "sys-kernel/linux-headers" have been masked. !!! One of the following masked packages is required to complete your request: - sys-kernel/linux-headers-2.6.28-r1 (masked by: CHOST: i686-pc-linux-gnu) - sys-kernel/linux-headers-2.6.27-r2 (masked by: CHOST: i686-pc-linux-gnu)
Set CFLAGS for (sub)architecture specific optimisations. CHOST has no influence on those whatsoever.
Unless I'm horribly mistaken, this is not true for the more heavily-optimized packages such as gmp, mpfr, and some of the multimedia libs. I do know that, for instance, gmp has multiple sets of optimized assembly routines for different specific flavours of x86, and uses the string passed to --host to determine which to use. Thus, "./configure --host=pentium3-pc-linux-gnu" will use assembly routines utilizing sse, but "./configure --host=i686-pc-linux-gnu" will not. In my particular situation, I am building an environment that has a minimum system requirement of a Pentium 3 processor, hence why I changed CHOST. I was worried about changing CHOST for just those packages - I was afraid that might cause library-linking issues, so I simply changed it in make.conf; perhaps that's not the correct answer here.
Your CHOST is not valid (there's a canonical list somewhere) GMP chooses optimizations based on the CPU yes, and it's wrongly doing so based on the CHOST setting. It needs to export that ability further out. If you can find packages where it's automatically using the CHOST to decide on optimizations, please file a bug for each of those packages.
Closing now, please report seperate bugs for each badly behaved package like GMP is doing with detection based on CHOST. (It can cause issues when you're building between machines easily).
no, dont report any bugs at all about CHOST=pentium3-xxx. that is not a valid chost. the gmp issue is completely isolated and there is a bug open dealing with that.
vapier: you mis-interpreted what I said. To clarify, if there are packages doing detection of what to build based on invalid CHOST strings (like pentium3-...), those packages need to be fixed.
not really ... in the case of gmp, it does extra special magic. look at the bug open about it.