This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Finding canonical names of systems


On 11/28/06, Mike Stump <mrs@apple.com> wrote:
[ first, this is the wrong list to ask such question, gcc-help is the
right one ]

On Nov 27, 2006, at 7:25 PM, Ulf Magnusson wrote:
> How are you supposed to find the canonical name of a system (of
> known type) in CPU-Vendor-OS form in the general case?

In the general case, you ask someone that has such a machine to run
config.guess, or failing that, you ask someone, or failing that, you
just invent the obvious string and use it.

That still feels like a very roundabout way to do it, and it won't work for systems that don't have Unices for them (like some small embedded systems). Having to ask someone just to find this information also feels a bit silly, when it is at crucial as it is e.g. in building cross-compilers. The correct strings to use aren't always immediately obvious either, if you feel like guessing. It think the lack of documentation might scare people away.


Most portable software doesn't much care just what configuration you specify, some very non-portable software will fail to function unless you provide exactly the right string. gcc is of the later type, if you're interested in building it.


Yes, the reason I ended up here is that I wanted to build GCC as a cross-compiler, and was disappointed that no one had even made a comprehensible list of how to represent different CPU's, vendors and OS's. I see this as a bug in the documentation.

> If you have access to a system of that particular type, you can run
> config.guess to find out, but you might not have, and that approach
> won't work for many systems anyway.

That approach always works on all host systems.  :-)  If it didn't,
that'd be a bug and someone would fix it.


As previously mentioned, that won't work on systems that can't even run sh, like tiny embedded devices, and it's still a somewhat roundabout and silly method.

> The canonical name needs to be known e.g. when cross-compiling and
> building cross-compilers.

Ah, for crosses, you have to know what you want, and what you want is
what you specify.  If your question is, what do you want, well, you
want what you want.  Either, it works, or, you've not ported the
compiler.

For example, you can configure --target=arm, if you want an arm, or --
target=m68k if you want an m68k, or sparc, if you want sparc, or ppc
if you want ppc, or powerpc if you want powerpc, or x86_64, if you
want x86_64, or arm-elf, if you want arm-elf, or sparc-aout if you
want that.  The list _is_ endless.  If you interested in a specific
target, tell us which one and we'll answer the question specifically.


Yes, and <string representation of CPU/Vendor/OS Foo> if you want Foo. The problem is knowing what the string representation is. What I'd like to see is a list like the following.

..
Materola 2560xx series -> ma256k
Pute1000 64 bit -> p1k64
..
Macrosoft Inc. -> mcinc
Amtel -> amt
..
FroBar OS Version X.Y -> froos-x.y
Lunix x.y -> lunix-x.y
..

If you want pre-formed ideas for targets that might be useful, you
can check out:

   http://gcc.gnu.org/install/specific.html
   http://gcc.gnu.org/buildstat.html
   http://gcc.gnu.org/ml/gcc-testresults/

I was thinking there was one other that tried to be exhaustive, but
maybe we removed the complete list years ago.

Aside from that, yes, reading though the config type files is yet
another way.


Those are helpful links, but I still think there should be an easy-to-find comprehensive list documenting the strings to use in the canonical triplet for particular CPU's, vendors and OS's. "How do I represent system foo?" seems like a reasonable question to ask, and "dig through a shell script" is not very satisfactory. If that is the only way to find a truly comprehensive list, it should at least be mentioned in the documentation.

/Ulf Magnusson


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]