Don't limit uploads.
[fedora-mingw.git] / nsis / nsis-2.19-debian-debug-opt.patch
1 02_debug_symbols.patch
2 Paul Wise <pabs@debian.org>
3 Add an option to generate debugging symbols
4 without side-effects on optimisation flags
5 and an option to enable/disable optimisation
6 Index: SCons/Config/gnu
7 ===================================================================
8 --- SCons/Config/gnu.orig       2007-02-02 20:34:33.000000000 +1100
9 +++ SCons/Config/gnu    2007-02-08 15:33:51.000000000 +1100
10 @@ -81,13 +81,16 @@
11  \r
12  makensis_env = defenv.Copy()\r
13  \r
14 -if not defenv['DEBUG']:\r
15 -       makensis_env.Append(CCFLAGS = '-O2')            # optimize\r
16 +if defenv['DEBUG_SYMBOLS']:\r
17 +       makensis_env.Append(CCFLAGS = '-g')            # debugging\r
18 +       makensis_env.Append(LINKFLAGS = '-g')            # debugging\r
19 +if not defenv['DEBUG'] and defenv['OPT']:\r
20 +               makensis_env.Append(CCFLAGS = '-O2')            # optimize\r
21  makensis_env.Append(CCFLAGS = '-Wall')            # all warnings\r
22  \r
23  conf = FlagsConfigure(makensis_env)\r
24  conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file\r
25 -if not defenv['DEBUG']:\r
26 +if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS']:\r
27         TestStrip(conf)                                 # strip\r
28  conf.Finish()\r
29  \r
30 @@ -110,13 +113,16 @@
31  \r
32  cp_util_env = defenv.Copy()\r
33  \r
34 -if not defenv['DEBUG']:\r
35 +if defenv['DEBUG_SYMBOLS']:\r
36 +       cp_util_env.Append(CCFLAGS = '-g')            # debugging\r
37 +       cp_util_env.Append(LINKFLAGS = '-g')            # debugging\r
38 +if not defenv['DEBUG'] and defenv['OPT']:\r
39         cp_util_env.Append(CCFLAGS = '-O2')             # optimize\r
40  cp_util_env.Append(CCFLAGS = '-Wall')             # all warnings\r
41  \r
42  conf = FlagsConfigure(cp_util_env)\r
43  conf.CheckLinkFlag('$MAP_FLAG')                   # generate map file\r
44 -if not defenv['DEBUG']:\r
45 +if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS']:\r
46         TestStrip(conf)                                 # strip\r
47  conf.Finish()\r
48  \r
49 @@ -131,6 +137,9 @@
50  ### test environment\r
51  \r
52  test_env = defenv.Copy()\r
53 +if defenv['DEBUG_SYMBOLS']:\r
54 +       test_env.Append(LINKFLAGS = '-g')            # debugging\r
55 +       test_env.Append(CCFLAGS = '-g')            # debugging\r
56  \r
57  ### weird GCC requirements\r
58  \r
59 Index: SConstruct
60 ===================================================================
61 --- SConstruct.orig     2007-02-02 20:34:33.000000000 +1100
62 +++ SConstruct  2007-02-08 15:48:40.000000000 +1100
63 @@ -127,6 +127,8 @@
64  opts.Add(PathOption('LIBPATH', 'Path to search for libraries', None))\r
65  # build options\r
66  opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no'))\r
67 +opts.Add(BoolOption('DEBUG_SYMBOLS', 'Build with debugging information, but none of the side effects of DEBUG', 'no'))\r
68 +opts.Add(BoolOption('OPT', 'Build with optimization', 'yes'))\r
69  opts.Add(PathOption('CODESIGNER', 'A program used to sign executables', None))\r
70  # path related build options\r
71  opts.Add(('PREFIX_DEST', 'Intermediate installation prefix (extra install time prefix)', dirs['dest']))\r