diff options
| author | Jason Rumney | 2008-07-23 15:41:23 +0000 |
|---|---|---|
| committer | Jason Rumney | 2008-07-23 15:41:23 +0000 |
| commit | 75663c75e0b1f07539c0b296405f707edb30c7a2 (patch) | |
| tree | 8de710a5515e7063f1d70edcc68e9b9660e3bade | |
| parent | 4b1355037a72c74a0711193d8ef9555bdb728772 (diff) | |
| download | emacs-75663c75e0b1f07539c0b296405f707edb30c7a2.tar.gz emacs-75663c75e0b1f07539c0b296405f707edb30c7a2.zip | |
* configure.bat: New option --profile.
* gmake.defs: Set cflags and ldflags for profiling when specified.
| -rw-r--r-- | nt/ChangeLog | 5 | ||||
| -rwxr-xr-x | nt/configure.bat | 10 | ||||
| -rw-r--r-- | nt/gmake.defs | 13 |
3 files changed, 26 insertions, 2 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 070e46939b8..583bb5d515a 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-07-23 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * configure.bat: New option --profile. | ||
| 4 | * gmake.defs: Set cflags and ldflags for profiling when specified. | ||
| 5 | |||
| 1 | 2008-07-23 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2008-07-23 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * config.nt (C_SWITCH_SITE, LD_SWITCH_SITE): Do not undefine. | 8 | * config.nt (C_SWITCH_SITE, LD_SWITCH_SITE): Do not undefine. |
diff --git a/nt/configure.bat b/nt/configure.bat index 3dd9a7fcc24..f99f0b284f4 100755 --- a/nt/configure.bat +++ b/nt/configure.bat | |||
| @@ -80,6 +80,7 @@ rem Default settings. | |||
| 80 | set prefix= | 80 | set prefix= |
| 81 | set nodebug=N | 81 | set nodebug=N |
| 82 | set noopt=N | 82 | set noopt=N |
| 83 | set profile=N | ||
| 83 | set nocygwin=N | 84 | set nocygwin=N |
| 84 | set COMPILER= | 85 | set COMPILER= |
| 85 | set usercflags= | 86 | set usercflags= |
| @@ -99,6 +100,7 @@ if "%1" == "--with-gcc" goto withgcc | |||
| 99 | if "%1" == "--with-msvc" goto withmsvc | 100 | if "%1" == "--with-msvc" goto withmsvc |
| 100 | if "%1" == "--no-debug" goto nodebug | 101 | if "%1" == "--no-debug" goto nodebug |
| 101 | if "%1" == "--no-opt" goto noopt | 102 | if "%1" == "--no-opt" goto noopt |
| 103 | if "%1" == "--profile" goto profile | ||
| 102 | if "%1" == "--no-cygwin" goto nocygwin | 104 | if "%1" == "--no-cygwin" goto nocygwin |
| 103 | if "%1" == "--cflags" goto usercflags | 105 | if "%1" == "--cflags" goto usercflags |
| 104 | if "%1" == "--ldflags" goto userldflags | 106 | if "%1" == "--ldflags" goto userldflags |
| @@ -116,6 +118,7 @@ echo. --with-gcc use GCC to compile Emacs | |||
| 116 | echo. --with-msvc use MSVC to compile Emacs | 118 | echo. --with-msvc use MSVC to compile Emacs |
| 117 | echo. --no-debug exclude debug info from executables | 119 | echo. --no-debug exclude debug info from executables |
| 118 | echo. --no-opt disable optimization | 120 | echo. --no-opt disable optimization |
| 121 | echo. --profile enable profiling | ||
| 119 | echo. --no-cygwin use -mno-cygwin option with GCC | 122 | echo. --no-cygwin use -mno-cygwin option with GCC |
| 120 | echo. --cflags FLAG pass FLAG to compiler | 123 | echo. --cflags FLAG pass FLAG to compiler |
| 121 | echo. --ldflags FLAG pass FLAG to compiler when linking | 124 | echo. --ldflags FLAG pass FLAG to compiler when linking |
| @@ -152,6 +155,11 @@ set noopt=Y | |||
| 152 | shift | 155 | shift |
| 153 | goto again | 156 | goto again |
| 154 | rem ---------------------------------------------------------------------- | 157 | rem ---------------------------------------------------------------------- |
| 158 | :profile | ||
| 159 | set profile=Y | ||
| 160 | shift | ||
| 161 | goto again | ||
| 162 | rem ---------------------------------------------------------------------- | ||
| 155 | :nocygwin | 163 | :nocygwin |
| 156 | set nocygwin=Y | 164 | set nocygwin=Y |
| 157 | shift | 165 | shift |
| @@ -492,6 +500,7 @@ if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings | |||
| 492 | if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings | 500 | if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings |
| 493 | if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings | 501 | if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings |
| 494 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings | 502 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings |
| 503 | if (%profile%) == (Y) echo PROFILE=1 >>config.settings | ||
| 495 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings | 504 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings |
| 496 | if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings | 505 | if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings |
| 497 | rem We go thru docflags because usercflags could be "-DFOO=bar" -something | 506 | rem We go thru docflags because usercflags could be "-DFOO=bar" -something |
| @@ -619,6 +628,7 @@ set $foo$= | |||
| 619 | set prefix= | 628 | set prefix= |
| 620 | set nodebug= | 629 | set nodebug= |
| 621 | set noopt= | 630 | set noopt= |
| 631 | set profile= | ||
| 622 | set nocygwin= | 632 | set nocygwin= |
| 623 | set COMPILER= | 633 | set COMPILER= |
| 624 | set MAKECMD= | 634 | set MAKECMD= |
diff --git a/nt/gmake.defs b/nt/gmake.defs index 24c08595547..4959aa947ee 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs | |||
| @@ -197,9 +197,18 @@ DEBUG_CFLAGS = -DEMACSDEBUG | |||
| 197 | else | 197 | else |
| 198 | DEBUG_CFLAGS = | 198 | DEBUG_CFLAGS = |
| 199 | endif | 199 | endif |
| 200 | CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) | 200 | CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) |
| 201 | EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 | 201 | EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 |
| 202 | 202 | ||
| 203 | ifdef PROFILE | ||
| 204 | PROFILE_CFLAGS = -pg | ||
| 205 | PROFILE_LDFLAGS = -pg | ||
| 206 | else | ||
| 207 | PROFILE_CFLAGS = | ||
| 208 | PROFILE_LDFLAGS = | ||
| 209 | endif | ||
| 210 | |||
| 211 | |||
| 203 | # see comments in allocate_heap in w32heap.c before changing any of the | 212 | # see comments in allocate_heap in w32heap.c before changing any of the |
| 204 | # -stack, -heap, or -image-base settings. | 213 | # -stack, -heap, or -image-base settings. |
| 205 | TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map | 214 | TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map |
| @@ -276,7 +285,7 @@ else | |||
| 276 | ERROR Unknown architecture type "$(ARCH)". | 285 | ERROR Unknown architecture type "$(ARCH)". |
| 277 | endif | 286 | endif |
| 278 | 287 | ||
| 279 | LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(NOCYGWIN) $(USER_LDFLAGS) | 288 | LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(PROFILE_LDFLAGS) $(NOCYGWIN) $(USER_LDFLAGS) |
| 280 | 289 | ||
| 281 | export XMFLAGS | 290 | export XMFLAGS |
| 282 | 291 | ||