On Wed, 2003-10-29 at 13:33, M.D. DeWar wrote: > for curiosity and exciting dinner banter, why is it I see > programs/application etc referring to FreeBSD as > i386-unknown-freebsd4.8 system > or when doing a configure it shows as that ?
The short answer is that 'unknown' means that the applications were compiled to run on (almost) any i386-based platform. If that's not enough of an answer, read on. In most cases, you're seeing what your development tools saw as the "target" when building the software you're running. So, you're running software (including FreeBSD itself) that was built to run on an 'i386-unknown-freebsd4.8' system. This string is in the format 'cpu-platform-os[-kernel]'. So, the 'unknown' is the hardware platform. There are different i386-based hardware platforms--the 'pc98' platform, for example. But the vast majority of i386 systems out there follow the loosely-defined, de facto "PC" standard. Knowing that you're building for an 'i386-pc' doesn't tell you much more than 'i386-unknown'. Basically, whenever software for 'i386-pc98' and 'i386-pc' would have to be different, 'i386-pc' doesn't tell you enough anyway. Fortunately, the target string usually gets matched up against a wildcard string like 'i386-*-freebsd*' or 'i*86-*-*bsd*'. So, 'i386-unknown-freebsd4.8' will match the same things as 'i386-pc-freebsd4.8' anyway. So, most of the code you run is going to be for 'i386-unknown', and code that you build locally will probably end up targetted at that platform as well. The same isn't true for all platforms. For example, since a DECstation and an SGI box are quite different (and in consistent, meaningful, and important ways), even though they both use MIPS processors, it's reasonably common to distinguish 'mips-dec-*' vs. 'mips-sgi-*'. Now you're probably wondering where the '[-kernel]' part comes in. After all, there's only one possible kernel that FreeBSD 4.8 could be running on--the FreeBSD 4.8 kernel. Same for Ultrix or Irix (you'll see something like 'mips-dec-ultrix4.1') or any other Unix, right? But linux isn't an OS, it's just a kernel, so you can't have 'i386-unknown-linux' or 'mips-sgi-linux', or rms will sing at you. The OS that you get when you buy/download Redhat Linux or Mandrake Linux is not linux at all, but GNU/Linux--the GNU operating system running on top of the linux kernel--which is compatible with GNU/Hurd--the GNU operating system running on top of the HURD thingy. So, in either case, you should have 'i386-unknown-gnu'. It's a pity about all that old code that checks for 'i386-*-linux' because GNU/Hurd didn't actually exist until recently (assuming you'd call 2006 recent), but what can you do? Unfortunately, GNU/Linux and GNU/Hurd aren't actually compatible in real life, so 'i386-*-gnu' doesn't really help--you need to distinguish between linux and HURD as often as between linux and FreeBSD. For that reason, you have 'i386-unknown-gnu-linux' or 'i386-unknown-gnu-hurd'. And you can then check for 'i386-*-gnu-linux' (plus, 'i386-*-linux' still works). Actually, some tools say 'i386-unknown-gnu-linux2.4.18', just like 'i386-unknown-freebsd4.8', so you really want to check 'i386-*-linux*', just like 'i386-*-freebsd*'. Not that this contradicts the fact that "any other Unix" only has one kernel to worry about (GNU's Not Unix), but since most Unix programs are built for linux as well (and vice-versa, fortunately, considering where the hype), it affects Unix anyway. If you want to know more about any of this... well, I'm not sure where all the information is, although there is a ton of it. Start by skimming the info pages for autoconf, I'd guess. _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"