[OpenAFS-devel] Compiling and running OpenAFS both optimized and debugged

Phil.Moore@morganstanley.com Phil.Moore@morganstanley.com
Thu, 9 Jan 2003 12:26:06 -0500


In order to obtain the maximum amount of debugging information from
failure in our production environment, I want to build OpenAFS 1.2.8
with at least -g, and if it works, also with -O, and also ensure that
the installed binaries are NOT stripped.

I can't find an easy way to do this.

It would appear that turning off stripping is simply a matter of
setting 

    STRIP = /bin/true

in the appropriate Makefile.sysname, but its not clear to me how to
get debugging and optimization simultaneously.   I can see that both
are defined:

    OPTMZ=-O
    DBG=-g

but I can NOT figure out the "right way" to get each invocation of CC
to use these.  INfact, I can't figure out how to get a debugging
version at *all*, let alone both debugged and optimized.

Now, I suppose I can cheat, and set

    OPTMZ=-g

but then I'll just get a debugging version, without optimization (my
second preference).

A search of the TWiki and the openafs-devel archives didn't turn up
the answer.

What's the trick?????