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

Bug#157131: PROPOSAL] Suggest to minimize optimization when DEB_BUILD_OPTIONS contains "debug"



On Sat, 17 Aug 2002, Colin Walters wrote:

> The attached patch should mostly speak for itself.  I think it's great
> that a lot of packages support DEB_BUILD_OPTIONS=debug now, but if the
> program is compiled with optimization, it's very difficult to debug.

> --- debian-policy-3.5.6.1/policy.sgml	2002-03-14 13:17:48.000000000 -0500
> +++ debian-policy-3.5.6.1.hacked/policy.sgml	2002-08-17 22:36:06.000000000 -0400
> @@ -5362,10 +5362,12 @@
>  	  If the environment variable <tt>DEB_BUILD_OPTIONS</tt>
>  	  contains the string <tt>debug</tt>, compile the software
>  	  with debugging information (usually this involves adding the
> -	  <tt>-g</tt> flag to <tt>CFLAGS</tt>).  This allows the
> -	  generation of a build tree with debugging information.  If
> -	  the environment variable <tt>DEB_BUILD_OPTIONS</tt> contains
> -	  the string <tt>nostrip</tt>, do not strip the files at
> +	  <tt>-g</tt> and the <tt>-O0</tt> flags to <tt>CFLAGS</tt>).
> +	  This allows the generation of a build tree with debugging
> +	  information; the reduced optimization ensures that the
> +	  debugging tools can easily analyze the program.  If the
> +	  environment variable <tt>DEB_BUILD_OPTIONS</tt> contains the
> +	  string <tt>nostrip</tt>, do not strip the files at
>  	  installation time.  This allows one to generate a package
>  	  with debugging information included.<footnote>
>  	    <p>

I like the idea. In fact I already do that for some of my packages.
Seconded.

					yours,
					peter

-- 
 PGP signed and encrypted  |  .''`.  ** Debian GNU/Linux **
    messages preferred.    | : :' :      The  universal
                           | `. `'      Operating System
 http://www.palfrader.org/ |   `-    http://www.debian.org/

Attachment: pgpjrovXJVpYR.pgp
Description: PGP signature


Reply to: