Page 1 of 1
GCC formatting question
Posted: Thu Aug 21, 2008 3:49 pm
by sawdust
When I compile using gcc, the output is something like
Code: Select all
gcc-linux -m32 -Wall -Os -fomit-frame-pointer -fno-common -ffreestanding -fno-strict-aliasing -Wno-unused -nostdinc -imacros ../../build/i386/config.h -I../../arch/i386/include -I../../fwcore/drvInc -I/opt/crosstool/gcc-3.3.6-glibc-2.3.2/i386-unknown-linux-gnu/lib/gcc-lib/i386-unknown-linux-gnu/3.3.6/include -MD -c fault.c -o fault.o
gcc-linux -m32 -Wall -Os -fomit-frame-pointer -fno-common -ffreestanding -fno-strict-aliasing -Wno-unused -nostdinc -imacros ../../build/i386/config.h -I../../arch/i386/include -I../../fwcore/drvInc -I/opt/crosstool/gcc-3.3.6-glibc-2.3.2/i386-unknown-linux-gnu/lib/gcc-lib/i386-unknown-linux-gnu/3.3.6/include -MD -c tscdelay.c -o tscdelay.o
What should I do to output something like this
Code: Select all
gcc-linux -m32 -o fault.o ../../arch/i386/fault.c
gcc-linux -m32 -o tscdelay.o ../../arch/i386/tscdelay.c
TIA
Re: GCC formatting question
Posted: Thu Aug 21, 2008 10:30 pm
by Solar
Not sure what you're wondering about, here. There are a couple of compiler flags set, several of them quite necessary (-Wall, and -ffreestanding -nostdinc too if you're doing OS work). Didn't you set them yourself, somewhere - in your Makefile, for example?
How is the compiler executed by you?
Re: GCC formatting question
Posted: Thu Aug 21, 2008 11:09 pm
by sawdust
Solar wrote:Not sure what you're wondering about, here. There are a couple of compiler flags set, several of them quite necessary (-Wall, and -ffreestanding -nostdinc too if you're doing OS work). Didn't you set them yourself, somewhere - in your Makefile, for example?
Yes I set them in the Makefile. Question is, is there some 'echo off' option to minimize the output?
Re: GCC formatting question
Posted: Thu Aug 21, 2008 11:11 pm
by DeletedAccount
SanEliza : Cmon , Elucidate you thoughts
Re: GCC formatting question
Posted: Thu Aug 21, 2008 11:27 pm
by DeletedAccount
Redirect output to /dev/null , but i do no think that is a very good thing to do
Re: GCC formatting question
Posted: Fri Aug 22, 2008 3:05 am
by Solar
What you see is "make" printing each command it executes to output before actually executing it. That is default behaviour. By adding "@" to the Makefile command line, you set this to "off". You can then add an echo-line of your own chosing to keep track of progress.
Code: Select all
%.o: %.c Makefile
@echo " CC -c $< -o $@"
@$(CC) $(CFLAGS) -c $< -o $@
/dev/null is too radical for my tastes.
Re: GCC formatting question
Posted: Fri Aug 22, 2008 4:10 am
by JackScott
Biggest problem with /dev/null is that then your error messages go there too, which is of course the last thing you want to do with them. Out of preference, I would have them turn my screen pink and start playing "Barbie Girl" by Aqua, just so I noticed properly.
Re: GCC formatting question
Posted: Fri Aug 22, 2008 4:40 am
by Solar
Have you ever tried colorgcc?
Re: GCC formatting question
Posted: Fri Aug 22, 2008 5:41 am
by JackScott
Nope, but I've just apt-getted it. Thanks for pointing that out. With some suitable modification, it might be able to play Aqua music too!
Hmmm... different Aqua songs for different error types?
Re: GCC formatting question
Posted: Fri Aug 22, 2008 10:21 am
by sawdust
Solar wrote:
Code: Select all
%.o: %.c Makefile
@echo " CC -c $< -o $@"
@$(CC) $(CFLAGS) -c $< -o $@
Wow! This served my purpose. Thanks a lot...
Re: GCC formatting question
Posted: Fri Aug 22, 2008 10:24 am
by JamesM
Solar wrote:Have you ever tried colorgcc?
I love colorgcc. I have a ported version that works out of the box for pedigree's build system. Om nom nom.