gcc build without debug (no -g)

Ian Lance Taylor iant@google.com
Thu Nov 11 06:16:00 GMT 2010


kevin diggs <diggskevin38@gmail.com> writes:

> I can't seem to figure out how to disable debug in a gcc build without
> hacking on some of the build files. Is there a built in way to get a
> build with debug symbols disabled (for the installed size reduction)?
> This is for 3.4.6 and 4.3.5 on a Linux PowerPC.

At least for recent versions of gcc you can use
    make BOOT_CFLAGS="-O2"
The default value for BOOT_CFLAGS is "-g -O2".  See the installation
documentation.

I don't know the answers to your other questions, sorry.

Ian



More information about the Gcc-help mailing list