Note how these commands disagree on what architecture I have...
# cat /proc/cpuinfo | grep Pentium
model name : Intel(R) Pentium(R) 4 CPU 2.40GHz
# uname -a
Linux slackbox 18.104.22.168 #1 Tue Sep 7 16:27:09 CDT 2004 i686 unknown unknown GNU/Linux
# echo $HOSTTYPE
# echo $MACHTYPE
I have been compiling a few programs and noticed that some of them have files called "config.sub" and "config.guess" (for example, with tvtime). So here's more confusion...
config.sub looks like it tries to standardize these CPU-MANUFACTURER-OS strings, so I give it what I think mine should be...
# ./config.sub pentium4-slackware-linux-gnu
I've set $CHOST="i686-pc-linux-gnu" myself via /etc/profile before, so it looks like config.guess is getting its value from $CHOST. So now I change $CHOST="i786-slackware-linux-gnu" and try config.guess again, but it still gives i686-pc-linux-gnu. It must be getting its value from something else.
Now there's 4 different values for the architecture of my computer, i486, i686, i786, and pentium4. I think they should all be set to i786. Here's my questions:
1. Where does uname get the value for architecture type? What sets $HOSTTYPE and $MACHTYPE?
2. What are $HOSTTYPE and $MACHTYPE used for? Can I change the output from uname? If I change them, will that affect any programs?
3. How does config.guess find a value? What are config.sub and config.guess used for during compilation? (These are only included with some sources.) Does $CHOST override their values when I compile?
I'm really confused and I've done plenty of searching but I can't find a thing...