revision 909:b4a21af8ce8c
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 909:b4a21af8ce8c |
parent | 908:a00debcf2600 |
child | 910:661367ef919d |
author | nkeynes |
date | Thu Oct 30 23:56:59 2008 +0000 (15 years ago) |
Add --enable-profiled configure option for convenience (and enable fastcall only on fully optimized builds)
![]() | config.h.in | view | annotate | diff | log | |
![]() | configure | view | annotate | diff | log | |
![]() | configure.in | view | annotate | diff | log | |
![]() | src/lxdream.h | view | annotate | diff | log |
1.1 --- a/config.h.in Thu Oct 30 05:50:21 2008 +00001.2 +++ b/config.h.in Thu Oct 30 23:56:59 2008 +00001.3 @@ -46,6 +46,9 @@1.4 /* Have exception stack-frame information */1.5 #undef HAVE_EXCEPTIONS1.7 +/* Use fast register-passing calling conventions */1.8 +#undef HAVE_FASTCALL1.9 +1.10 /* Define if the GNU gettext() function is already present or preinstalled. */1.11 #undef HAVE_GETTEXT
2.1 --- a/configure Thu Oct 30 05:50:21 2008 +00002.2 +++ b/configure Thu Oct 30 23:56:59 2008 +00002.3 @@ -805,6 +805,7 @@2.4 enable_strict_warn2.5 enable_translator2.6 enable_optimized2.7 +enable_profiled2.8 enable_trace2.9 enable_watch2.10 enable_sh4stats2.11 @@ -1473,6 +1474,7 @@2.12 --disable-translator Disable the SH4 translator (Enabled by default)2.13 --disable-optimized Disable compile-time optimizations (Enabled by2.14 default)2.15 + --enable-profiled Enable profiling build (implies disable-optimized)2.16 --enable-trace Enable generation of IO traces (warning: hurts2.17 performance)2.18 --enable-watch Enable watchpoints in the debugger (warning: hurts2.19 @@ -6575,6 +6577,13 @@2.20 enable_optimized=yes2.21 fi2.23 +# Check whether --enable-profiled was given.2.24 +if test "${enable_profiled+set}" = set; then2.25 + enableval=$enable_profiled; if test "$enableval" == "yes"; then2.26 + enable_profiled=yes;2.27 + fi2.28 +fi2.29 +2.30 # Check whether --enable-trace was given.2.31 if test "${enable_trace+set}" = set; then2.32 enableval=$enable_trace; if test "$enableval" == "yes"; then2.33 @@ -6638,11 +6647,25 @@2.37 -if test "x$enable_optimized" = "xyes"; then2.38 - CFLAGS="-g -O2"2.39 +if test "x$enable_profiled" = "xyes"; then2.40 + CFLAGS="-g -pg -fprofile-arcs"2.41 + LDFLAGS="$LDFLAGS -pg";2.42 +elif test "x$enable_optimized" = "xyes"; then2.43 + CFLAGS="-g -O2 -fexceptions -fomit-frame-pointer"2.44 +2.45 +cat >>confdefs.h <<\_ACEOF2.46 +#define HAVE_EXCEPTIONS 12.47 +_ACEOF2.48 +2.49 +2.50 +cat >>confdefs.h <<\_ACEOF2.51 +#define HAVE_FASTCALL 12.52 +_ACEOF2.53 +2.54 else2.55 CFLAGS="-g3"2.56 fi2.57 +2.58 if test "x$GCC" = "xyes"; then2.59 CFLAGS="$CFLAGS -fno-strict-aliasing"2.60 fi2.61 @@ -6865,14 +6888,6 @@2.62 _ACEOF2.64 fi2.65 -if test "x$enable_optimized" = "xyes"; then2.66 - CFLAGS="$CFLAGS -fexceptions -fomit-frame-pointer"2.67 -2.68 -cat >>confdefs.h <<\_ACEOF2.69 -#define HAVE_EXCEPTIONS 12.70 -_ACEOF2.71 -2.72 -fi
3.1 --- a/configure.in Thu Oct 30 05:50:21 2008 +00003.2 +++ b/configure.in Thu Oct 30 23:56:59 2008 +00003.3 @@ -28,6 +28,11 @@3.4 AC_ARG_ENABLE( optimized,3.5 AS_HELP_STRING( [--disable-optimized], [Disable compile-time optimizations (Enabled by default)]),3.6 [true], [enable_optimized=yes] )3.7 +AC_ARG_ENABLE( profiled,3.8 + AS_HELP_STRING( [--enable-profiled], [Enable profiling build (implies disable-optimized)]),3.9 + [if test "$enableval" == "yes"; then3.10 + enable_profiled=yes;3.11 + fi] )3.12 AC_ARG_ENABLE( trace,3.13 AS_HELP_STRING( [--enable-trace], [Enable generation of IO traces (warning: hurts performance)]),3.14 [if test "$enableval" == "yes"; then3.15 @@ -55,11 +60,17 @@3.17 dnl ------------3.19 -if test "x$enable_optimized" = "xyes"; then3.20 - CFLAGS="-g -O2"3.21 -else3.22 +if test "x$enable_profiled" = "xyes"; then3.23 + CFLAGS="-g -pg -fprofile-arcs"3.24 + LDFLAGS="$LDFLAGS -pg";3.25 +elif test "x$enable_optimized" = "xyes"; then3.26 + CFLAGS="-g -O2 -fexceptions -fomit-frame-pointer"3.27 + AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])3.28 + AC_DEFINE(HAVE_FASTCALL, [1], [Use fast register-passing calling conventions])3.29 +else3.30 CFLAGS="-g3"3.31 fi3.32 +3.33 if test "x$GCC" = "xyes"; then3.34 CFLAGS="$CFLAGS -fno-strict-aliasing"3.35 fi3.36 @@ -91,10 +102,6 @@3.37 if test "x$HAVE_COCOA" = 'xyes' -a "x$with_gtk" = "xno"; then3.38 AC_DEFINE(OSX_BUNDLE, [1], [Generating a bundled application])3.39 fi3.40 -if test "x$enable_optimized" = "xyes"; then3.41 - CFLAGS="$CFLAGS -fexceptions -fomit-frame-pointer"3.42 - AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])3.43 -fi3.45 dnl ----------- Check for mandatory dependencies --------------3.46 dnl Check for libpng (required)
4.1 --- a/src/lxdream.h Thu Oct 30 05:50:21 2008 +00004.2 +++ b/src/lxdream.h Thu Oct 30 23:56:59 2008 +00004.3 @@ -91,11 +91,6 @@4.4 const char *get_sysconf_path();4.5 const char *get_locale_path();4.7 -/* Use fast (regparam) calling conventions for core code - for now just turn it4.8 - * on always, but define the macro in case we need to remove it for some platforms4.9 - */4.10 -#define HAVE_FASTCALL 14.11 -4.12 #ifdef HAVE_FASTCALL4.13 #define FASTCALL __attribute__((regparm(3)))4.14 #else
.