LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2011, 04:49 PM   #1
rajeshu
LQ Newbie
 
Registered: May 2011
Posts: 5

Rep: Reputation: 0
Question How to find equivalent cc options for gcc compiler


I am comiling some programs on Linux using gcc previously compiled using cc compiler on Solaris. Below are some of the confusions:

1. There is -xildoff option in cc which is giving error "language ildoff not recognized". xildoff in cc is for switching off the option of incremental editor ild. Is there anything equivalent on gcc?

2. There is runtime link option in cc as -R but gcc just says "unrecognised option". Does gcc only supports LD_RUN_PATH?

3. There is -Xa option to force cc to chose a particular flavor of c.Its for default c and K&R C. gcc has -std option but not sure which one is equivalent to -Xa in c. It seems -std=c90?

Any help to chose the right options plese?
Thanks
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-31-2011, 02:57 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,388
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Quote:
Originally Posted by rajeshu View Post
There is -xildoff option in cc which is giving error "language ildoff not recognized". xildoff in cc is for switching off the option of incremental editor ild. Is there anything equivalent on gcc?
I'm assuming ild is an incremental linker. There is no ild in the GNU world, although ld supports relocatable linking (which also means the ability to incrementally link) using the '-r' or '-i' flags. There is no need to turn the option off, because by default you will not be incrementally linking.

Quote:
There is runtime link option in cc as -R but gcc just says "unrecognised option". Does gcc only supports LD_RUN_PATH?
The compiler does not directly link the files; the compiler chains to ld to do this. Options given to the compiler do not automatically get passed on to ld. Instead, use the '-X' flag where there are options that need to be passed to the linker. The command 'man ld' will give you a list of linker options; in this case '-rpath' to set the runtime library path, so gcc would need the options '-Xlinker -rpath=path'.

Quote:
There is -Xa option to force cc to chose a particular flavor of c.Its for default c and K&R C. gcc has -std option but not sure which one is equivalent to -Xa in c. It seems -std=c90?
If you mean the original K&R C, it was only an informal standard, so there is no need to supply any options. If you mean the second edition K&R, then it is the ANSI standard (which I am guessing is what '-Xa' means), so yes, this would mean using '-ansi' or '-std=c90' (and possibly '-pedantic' to enforce this). The gcc documentation has a page on this.
 
2 members found this post helpful.
Old 05-31-2011, 05:25 PM   #3
rajeshu
LQ Newbie
 
Registered: May 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Smile

Many thanks for the updates. Reaaly helped meclarify my doubts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable structure alignment using gcc compiler options ? aryan1 Programming 3 01-26-2010 08:21 AM
GNU Make and GNU GCC DEBUG vs RELEASE compiler options aryan1 Programming 1 01-12-2010 12:29 PM
gcc pre-compiler options !!!!! webquinty Programming 2 09-30-2008 03:57 PM
how do find out whether i have gcc compiler installed? ashlesha Linux - Newbie 3 06-27-2006 03:42 PM
GCC compiler options???!! Umanga Linux - Newbie 1 10-08-2004 03:16 AM


All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration