Skip to content
Browse files

Removed guessing of best optimizing CFLAGS.

With old versions of GCC "-O1 -fomit-frame-pointer" produced the best
code for x86 systems, but with GCC 4.x this is no longer the case.

With GCC 4.1.0, building with "-O1 -fomit-frame-pointer" makes TRE
about 15% slower than when built with "-O2 -g" (the default).
Removing the "-g" has a negligible positive effect, so it's better to
leave it in so the result is actually debuggable.

darcs-hash:20060722115947-ced27-23242246b62f51ef08efd91e501e7a9756a88411.gz
  • Loading branch information...
1 parent 94baa89 commit e934ac3417090fa586330b82f59e9030983585b4 Ville Laurikari committed Jul 22, 2006
Showing with 0 additions and 34 deletions.
  1. +0 −3 configure.ac
  2. +0 −1 m4/Makefile.am
  3. +0 −30 m4/tre_prog_cc_optimizations.m4
View
3 configure.ac
@@ -42,9 +42,6 @@ if test "$tre_debug" = "yes"; then
[ Define if you want TRE to print debug messages to stdout. ])
else
AM_CONDITIONAL(TRE_DEBUG, false)
- if test "$tre_profile" != "yes"; then
- TRE_PROG_CC_OPTIMIZATIONS
- fi
AC_DEFINE(NDEBUG, 1, [ Define if you want to disable debug assertions. ])
fi
View
1 m4/Makefile.am
@@ -1,7 +1,6 @@
EXTRA_DIST = \
ac_libtool_tags.m4 \
ax_check_funcs_comp.m4 \
- tre_prog_cc_optimizations.m4 \
ax_check_sign.m4 \
ax_decl_wchar_max.m4 \
vl_prog_cc_warnings.m4
View
30 m4/tre_prog_cc_optimizations.m4
@@ -1,30 +0,0 @@
-dnl @synopsis TRE_PROG_CC_OPTIMIZATIONS
-dnl
-dnl Sets C compiler optimizations which have been found to give
-dnl best results for TRE with this compiler and architecture.
-dnl
-dnl @version 1.3
-dnl @author Ville Laurikari <vl@iki.fi>
-dnl
-AC_DEFUN([TRE_PROG_CC_OPTIMIZATIONS], [
- # Don't override if CFLAGS was already set.
- if test -z "$ac_env_CFLAGS_set"; then
- AC_MSG_CHECKING([for the best optimization flags])
- tre_cflags=""
- if test "$GCC" = "yes"; then
- # The default CFLAGS is `-g -O2' (`-O2' on systems where gcc does
- # not accept `-g').
- case "$target" in
- i686-*-*-* )
- tre_cflags="-O1 -fomit-frame-pointer"
- ;;
- esac
- fi
- if test -n "$tre_cflags"; then
- AC_MSG_RESULT([$tre_cflags])
- CFLAGS="$tre_cflags"
- else
- AC_MSG_RESULT(unknown)
- fi
- fi
-])dnl

0 comments on commit e934ac3

Please sign in to comment.
Something went wrong with that request. Please try again.