473,466 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What all gcc does


Is there a way to print out all the operations performed in a gcc call:

eg. gcc foo.c -o foo

perhaps performs

foo.c --> foo.s (using compiler)
foo.s --> foo.o (using assembler as)
foo.o --> foo (using linker ld)

I am interested in the options gcc used when assembling and linking at the
intermediate steps.

thanks,
Sorav

Nov 14 '05 #1
3 1434
Sorav Bansal wrote:
Is there a way to print out all the operations performed in a gcc call:

eg. gcc foo.c -o foo

perhaps performs

foo.c --> foo.s (using compiler)
foo.s --> foo.o (using assembler as)
foo.o --> foo (using linker ld)

I am interested in the options gcc used when assembling and linking at the
intermediate steps.

thanks,
Sorav

As a matter of fact, there is. Though it's off topic here on
news:comp.lang.c, if you want verbose output, perhaps you should look at
your documentation to see how to get it.

Or, you could take the hint above.

HTH,
--ag

--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
Nov 14 '05 #2
Sorav Bansal wrote:
Is there a way to print out all the operations performed in a gcc call:

eg. gcc foo.c -o foo

perhaps performs

foo.c --> foo.s (using compiler)
foo.s --> foo.o (using assembler as)
foo.o --> foo (using linker ld)

I am interested in the options gcc used
when assembling and linking at the intermediate steps.


Try the gnu.gcc.help newsgroup.

gcc -v -Wall -std=c99 -pedantic -o main main.c
Reading specs from \
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Configured with: ../gcc-3.4.1.src/configure
Thread model: posix
gcc version 3.4.1
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.1/cc1 \
-quiet -v main.c -quiet -dumpbase main.c -mtune=pentiumpro \
-auxbase main -Wall -pedantic -std=c99 -version \
-o /tmp/ccKyMHYc.s
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/include
/usr/include
End of search list.
GNU C version 3.4.1 (i686-pc-linux-gnu)
compiled by GNU C version 3.4.1.
GGC heuristics: --param ggc-min-expand=64 \
--param ggc-min-heapsize=64329
as -V -Qy -o /tmp/ccQvmn4g.o /tmp/ccKyMHYc.s
GNU assembler version 2.15.90.0.3 (i386-redhat-linux) \
using BFD version 2.15.90.0.3 20040415
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.1/collect2 \
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 \
-o main /usr/lib/crt1.o /usr/lib/crti.o \
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/crtbegin.o \
-L/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1 \
-L/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/../../.. \
/tmp/ccQvmn4g.o -lgcc --as-needed -lgcc_s --no-as-needed \
-lc -lgcc --as-needed -lgcc_s --no-as-needed \
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/crtend.o \
/usr/lib/crtn.o
Nov 14 '05 #3
On 2005-04-20, Sorav Bansal <sb*****@stanford.edu> wrote:

Is there a way to print out all the operations performed in a gcc call:

eg. gcc foo.c -o foo

perhaps performs

foo.c --> foo.s (using compiler)
foo.s --> foo.o (using assembler as)
foo.o --> foo (using linker ld)

I am interested in the options gcc used when assembling and linking at the
intermediate steps.

thanks,
Sorav


maybe the -v option

ken
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
3
by: Chris Cioffi | last post by:
I started writing this list because I wanted to have definite points to base a comparison on and as the starting point of writing something myself. After looking around, I think it would be a...
65
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
3
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification...
7
by: Dan V. | last post by:
Situation: I have to connect with my Windows 2000 server using VS.NET 2003 and C# and connect to a remote Linux server at another company's office and query their XML file. Their file may be...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.