> So it must be the kernel's crypto functions tripping over it, and I > can understand new instruction set evolutions wouldn't be > backwards-compatible. Still, if gcc weren't trying to embed those > instructions in the kernel and were just setting the kernel up to use > gmplib, it seems more likely they would be a runtime error.
Paul, I don't think gcc ever exports any gmp code into its output. Rather, gcc just uses gmp for its own internal purposes. I searched the net for why gcc needs gmp and found this: https://stackoverflow.com/questions/15826628/why-does-gcc-require-gmp which states that under C, gcc uses gmp for (1) constant calculations; and (2) optimization calculations. So, if for the code to be compiled, gcc only uses gmp under C compilation for optimization, then one might be able to get around an "incompatible-CPU-compiled" gmp if one disables gcc optimization: CFLAGS='-O0' CXXFLAGS='-O0' This might be helpful if you just need to recompile something (maybe even gmp itself) to rescue a "hosed" machine. Then, after gmp is working, you can recompile it again with normal optimizations. (If you ever try this, do let us know if it works as it might help someone out of a jam one day.) However, it likely won't work if the code in question uses constant/macro math because gcc uses gmp for that too. In the case of your kernel compile failure: > drivers/gpu/drm/i2c/ch7006_mode.c:51:3: internal compiler error: Illegal > instruction > NTSC_LIKE_TIMINGS, > ^~~~~~~~~~~~~~~~~ and in drivers/gpu/drm/i2c/ch7006_mode.c we find: #define NTSC_LIKE_TIMINGS .vrefresh = 60 * fixed1/1.001, \ .vdisplay = 480, \ .vtotal = 525, \ .hvirtual = 660 where fixed1 is defined in ch7006_priv.h to be: #define fixed1 (1LL << 32) where LL means "long long" (or 64 bits). All gcc has to do here is to evaluate the .vrefresh constant. So, it seems that gcc tried to use gmp to do the "60 * (1LL << 32)/1.001" constant calculation and this is what triggered the problem. Cheers, Mike -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
