Article View: csu.unix.linux
Article #132Re: where did it go?
From: Scott Scriven
Date: Sat, 05 Feb 2000 00:00
Date: Sat, 05 Feb 2000 00:00
32 lines
3307 bytes
3307 bytes
In article <slrn89eh3a.236.mike@localhost.localdomain>, mike@www.intrig.com (Mike) wrote: > mdwyer@holly.ColoState.EDU (Michael Dwyer): >> : I believe cc (c compiler) is what generally comes on a Unix box. With linux, >> : cc is just a symlink to gcc (GNU c compiler). Use g++ when you want to compile >> : anything c++ish. From the man page, 'g++ is a script to call gcc with options >> : to recognize C++' So, when it comes down to it, they are really all the same >> : thing on linux. >> >> Except I think on some machines, cc == gcc, and g++ == egcs. Its all a >> vicious conspiracy. Suffice to say, in the Bad Old Days (tm) cc was >> a symlink to gcc, and g++ was a symlink to gcc. Gcc would act a little >> differently depending on what you called it. > > Good call, on my system g++ isn't a script. The man page must need to be > updated. I wonder why the move was made from gcc to egcs. Are gcc packages > still being developed, or did they just rename it to egcs? Hi; just happened to see this while testing out a newsreader. The "cc" program should always exist on a unix system (assuming there is a C compiler of some sort). It is often just a link to the system's preferred compiler. Same goes for "CC", except this will compile as C++ instead of C. Some also have "c++", but "CC" is more standard. With gnu systems, gcc is the C compiler and g++ is the C++ compiler. Because gcc supports both C and C++ (both natively -- it doesn't need to translate C++ -> C like some compilers do), the same executable can compile both languages. It probably checks its name (argv[0]) to see which language it defaults to. Other programs do this, such as gzip -- it figures out whether to compress/decompress and where to send the data based on what its executable is called (gzip, gunzip, gzcat, etc). EGCS is simply the Cygnus version of gcc/g++. They had made their own branch in order to speed up development. If you remember, gcc was stuck at V2.7.2 for quite a long time, until Cygnus started egcs. Then some of the changes were merged back in to create gcc 2.8.0. Eventually, the FSF decided that gcc would be better off if it was maintained officially by Cygnus, and they handed over the name. So, now egcs and gcc are the same thing, and the current version is 2.95. Just FYI. :) _ _ _ _ ___ ___ ---"I don't get even - I just get odder."--- ( \/ ( \/ (__ (__ ) | Scott Scriven (Toy Keeper / XYZZ) | \ / \ / // // | mailto:toykeeper@cheerful.com | / \ / / //_ //_ | irc:serdevian.dyn.omnipotent.net | (_/\_(_/ (___(___) | http://www.vis.colostate.edu/~scriven/ |
Technical Details
Message-ID:
<389cfbc2@news.ColoState.EDU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3891AD13.26453051@holly.colostate.edu> <slrn894blm.ll1.mike@localhost.localdomain> <3892BA29.4F6F30EF@holly.colostate.edu> <slrn895u75.ra3.mike@localhost.localdomain> <38944316@news.ColoState.EDU> <slrn89eh3a.236.mike@localhost.localdomain>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1159f7,40fb624d1c14100a X-Google-Attributes: gid1159f7,public From: Scott Scriven <toykeeper@cheerful.com> Subject: Re: where did it go? Date: 2000/02/05 Message-ID: <389cfbc2@news.ColoState.EDU> X-Deja-AN: 582154195 References: <3891AD13.26453051@holly.colostate.edu> <slrn894blm.ll1.mike@localhost.localdomain> <3892BA29.4F6F30EF@holly.colostate.edu> <slrn895u75.ra3.mike@localhost.localdomain> <38944316@news.ColoState.EDU> <slrn89eh3a.236.mike@localhost.localdomain> X-Trace: 5 Feb 2000 21:42:42 -0700, dialup0317.ppp.colostate.edu Newsgroups: csu.unix.linux