LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Default system-wide GCC options (https://www.linuxquestions.org/questions/linux-general-1/default-system-wide-gcc-options-490364/)

bLUEbYTE84 10-07-2006 11:52 AM

Default system-wide GCC options
 
Hi,
When I build a program from the source with usual ./configure & make route, the gcc passes the -g option when compiling, which results in bloated binaries. I check Makefile after ./configure, but there is no -g in CFLAGS and like, so it seems it is like a 'system default'. How can I change it so that no -g is passed by default?

Penguin of Wonder 10-07-2006 12:40 PM

Quote:

gcc --help

Options starting with -g, -f, -m, -O, -W, or --param are automatically
passed on to the various sub-processes invoked by gcc. In order to pass
other options on to these processes the -W<letter> options must be used.
Quote:

-g Generate debug information in default format
Are you really sure you want to get rid of the -g as a default option?

bLUEbYTE84 10-07-2006 12:45 PM

Yes, as I stated above it severely enlarges the output executables. I am almost certain that it is becuase of the -g parameter. It leaves the symbols that are helpful in debugging inside the executable.
As an example, it doubles the size in the case of FCEUltra (a Nintendo emulator)


All times are GMT -5. The time now is 08:25 AM.