[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: default -g ??!?

From: Paul Smith
Subject: Re: default -g ??!?
Date: Sat, 20 Nov 2010 12:13:38 -0500

On Sat, 2010-11-20 at 10:36 -0500, MK wrote:
> Ah, it's because of GNU make:
> "By default, the Make rules should compile and link with -g, so that
> executable programs have debugging symbols. Users who don't mind being
> helpless can strip the executables later if they wish." 
> Nice, flexible software it ain't.

That's a recommendation about the GNU standard way to create makefiles.
It's in a chapter called "Makefile Conventions" and the introductory
sentence, which is just a paragraph or two above the section quoted
above, says "All *GNU* programs *should* have the following targets in
their Makefiles" (emphasis added).

This chapter has no relationship to any default BUILT INTO or REQUIRED
by GNU make; in fact there IS NO default value for CFLAGS built into GNU

        ~$ env -i make -pf/dev/null | grep -- -g
        # This program built for x86_64-pc-linux-gnu
        make: *** No targets.  Stop.
        ~$ env -i make -pf/dev/null | grep CFLAGS
        make: *** No targets.  Stop.

Of course you can do what you like, but I should point out that the
recommendations from the GNU people are the best practices resulting
from decades of producing and using free software products.  If I were
you I'd take advantage of that experience.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

[Prev in Thread] Current Thread [Next in Thread]