Results 1 to 5 of 5

Thread: cc vs gcc

  1. #1
    Join Date
    Dec 2007
    Beans
    62

    cc vs gcc

    Hi all programming jedas,

    I working on a project about porting from solaris to linux. The first thing to think about it is changing the compiler from cc to gcc. Is there any difference in term of programming (like syntax, declaration, C standard ... ) between them ? Why is there gcc when cc was already there ? The fact that in linux, cc is linked to gcc makes me so confused

  2. #2
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,288
    Distro
    Kubuntu

    Re: cc vs gcc

    Quote Originally Posted by bubuzzz View Post
    The fact that in linux, cc is linked to gcc makes me so confused
    It makes you confused? All it tells me is that they are the same.

  3. #3
    Join Date
    May 2006
    Beans
    1,790

    Re: cc vs gcc

    Quote Originally Posted by bubuzzz View Post
    Hi all programming jedas,

    I working on a project about porting from solaris to linux. The first thing to think about it is changing the compiler from cc to gcc. Is there any difference in term of programming (like syntax, declaration, C standard ... ) between them ? Why is there gcc when cc was already there ? The fact that in linux, cc is linked to gcc makes me so confused
    I suppose that on Solaris, cc is not gcc. One step in porting can be to fetch gcc to your Solaris environment and use it for building your code. What the important differences are in your case will become clear. Read the manual pages for both compilers, too. The next step is to build it in the Linux environment.

  4. #4
    Join Date
    Jan 2008
    Beans
    1,532

    Re: cc vs gcc

    'cc' is just code for 'whatever the C compiler on this system is'. On Linux platforms, it is always gcc. On other Unixes, it can be different. In the SunOS days, it was suncc, but now the new Solaris likely uses gcc too. On the old VMS, it was the old HP compiler.

    Ideally, your code base is standard C, so you shouldn't have much if any trouble compiling it with gcc regardless of the compiler cc used to refer to (which may have been gcc anyway).

  5. #5
    Join Date
    Dec 2007
    Beans
    62

    Re: cc vs gcc

    Thank all. I believe the old source code was once compiled under gcc, so at this moment, i have no trouble during the porting (need some twists in the source code, anw). However, part of the project is about investigating the difference between cc (under solaris 2.5) and gcc 4 (under centos 5.7). So, that is why i need to know more about them. At this moment, i only found out about the performance (http://www.osnews.com/story/5830)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •