On 23/11/20 10:10 pm, Walter Dnes wrote: > On Sun, Nov 22, 2020 at 04:39:44PM -0700, the...@sys-concept.com wrote >> Duplicating was easy, but when I try to recompile a kernel I get an error: >> >> make menuconfig >> HOSTCC script/kconfig/mconf.o >> <build-in> : internal compiler error: Illegal instruction >> >> Even if I try to run: emerge --info I get: >> Illegal instruction > Ouch! Are the CPUs exactly identical? If not, then you may get the > "Illegal instruction" error. This is a "feature" of Gentoo, which is > often user-optimized for a specific CPU. What's the CPU on the source > machine and what's the CPU on the target machine? If in doubt, > execute... > > gcc -c -Q -march=native --help=target | grep march= > > ...on each machine. There are 3 sub-families of "Intel" machines. > > 1) bog-standard Intel code, e.g. core2, also runs on AMD and Intel Atom > CPUs at least as new or newer. > > 2) Intel Atom code runs only on same or newer Intel Atom, because it has > the MOVBE instruction set the others lack. > > 3) AMD code runs only on same or newer AMD, because it has the 3DNow! > instruction set the others lack. > > If you have such a mismatch, your only option may be to rebuild from > scratch. > quick package the toolchain packages from the wanted cpu system, untar them in the root of the new system so they overwrite the existing package files, do an emerge -e @system, then follow with another for world. Can also use the install CD packages - I have used some quite different versions when recovering a broken system so it <can> work :).
Have done it a few times, its a bit messier than than just gcc/glibc/libtool/binutils for the toolchain but does work. The two emerge -e shouldn't be strictly necessary, but it seems to get a better result than just doing world. BillK