Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22031

is there any use for GCC -S flag with gcc -c

$
0
0

I wonder if there is any benefit for using the -S GCC option in my Makefiles.

I've been compiling C files like the following for quite some time now:

gcc -c a.c -o a.o
gcc -c b.c -o b.o
---
gcc a.o b.o -o a.out

Now would it be better going:

gcc -S a.c -o a.s
gcc -S b.c -o b.s
---
gcc -c a.s -o a.o
gcc -c b.s -o b.o
---
gcc a.o b.o -o a.out

Also there is apparently the option of skipping the .o phase, assembling directly .s files into a binary. Which option you think is the best and why?


Viewing all articles
Browse latest Browse all 22031

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>