From bb8237e9407ad94a40f78b68d6fa45fe8ec304f3 Mon Sep 17 00:00:00 2001 From: hobbs Date: Thu, 30 Dec 2004 01:51:01 +0000 Subject: * win/tcl.m4, win/configure: update MSVC CFLAGS_OPT to -O2, remove -Gs (included in -O2) and -GD (outdated). Use "link -lib" instead of "lib" binary and remove -YX for MSVC7 portability. Add -fomit-frame-pointer for gcc OPT compiles. [Bug 1092952, 1091967] --- ChangeLog | 7 +++++++ win/configure | 43 +++++++++++++++++++++++-------------------- win/tcl.m4 | 15 +++++++++------ 3 files changed, 39 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index cca7ff4..8b0c959 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-12-29 Jeff Hobbs + + * win/tcl.m4, win/configure: update MSVC CFLAGS_OPT to -O2, remove + -Gs (included in -O2) and -GD (outdated). Use "link -lib" instead + of "lib" binary and remove -YX for MSVC7 portability. Add + -fomit-frame-pointer for gcc OPT compiles. [Bug 1092952, 1091967] + 2004-12-20 Donal K. Fellows * doc/panedwindow.n: Fix silly typo. [Bug 1087842] diff --git a/win/configure b/win/configure index e506889..fe97e37 100755 --- a/win/configure +++ b/win/configure @@ -1310,7 +1310,7 @@ echo "configure:1226: checking compiler flags" >&5 EXTRA_CFLAGS="${extra_cflags}" CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O + CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" CFLAGS_WARNING="-Wall -Wconversion" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= @@ -1386,17 +1386,20 @@ echo "configure:1226: checking compiler flags" >&5 -I${MSSDK}/Include" RC="${MSSDK}/bin/rc.exe" CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" - CFLAGS_OPTIMIZE="-nologo -O2 -Gs ${runtime}" + CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \ -LIBPATH:${MSSDK}/Lib/Prerelease/IA64" STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}" LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}" else RC="rc" + # -Od - no optimization + # -WX - warnings as errors CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" - CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" - STLIB_LD="lib -nologo" - LINKBIN="link -link50compat" + # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) + CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" + STLIB_LD="link -lib -nologo" + LINKBIN="link" fi SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" @@ -1412,7 +1415,7 @@ echo "configure:1226: checking compiler flags" >&5 MAKE_EXE="\${CC} -Fe\$@" LIBPREFIX="" - EXTRA_CFLAGS="-YX" + EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" LDFLAGS_DEBUG="-debug:full -debugtype:both" LDFLAGS_OPTIMIZE="-release" @@ -1439,7 +1442,7 @@ echo "configure:1226: checking compiler flags" >&5 #-------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1443: checking how to run the C preprocessor" >&5 +echo "configure:1446: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1454,13 +1457,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1471,13 +1474,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1488,13 +1491,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1520,17 +1523,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for errno.h""... $ac_c" 1>&6 -echo "configure:1524: checking for errno.h" >&5 +echo "configure:1527: checking for errno.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1562,7 +1565,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:1566: checking for build with symbols" >&5 +echo "configure:1569: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -1623,7 +1626,7 @@ TK_DBGX=${DBGX} echo $ac_n "checking the location of tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1627: checking the location of tclConfig.sh" >&5 +echo "configure:1630: checking the location of tclConfig.sh" >&5 if test -d ../../tcl8.4$TK_PATCH_LEVEL/win; then TCL_BIN_DIR_DEFAULT=../../tcl8.4$TK_PATCH_LEVEL/win @@ -1651,7 +1654,7 @@ fi echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:1655: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 +echo "configure:1658: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 @@ -1704,7 +1707,7 @@ echo "configure:1655: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:1708: checking for tclsh" >&5 +echo "configure:1711: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 diff --git a/win/tcl.m4 b/win/tcl.m4 index 2afcb6e..3219f41 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -513,7 +513,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ EXTRA_CFLAGS="${extra_cflags}" CFLAGS_DEBUG=-g - CFLAGS_OPTIMIZE=-O + CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" CFLAGS_WARNING="-Wall -Wconversion" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= @@ -589,17 +589,20 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ -I${MSSDK}/Include" RC="${MSSDK}/bin/rc.exe" CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d" - CFLAGS_OPTIMIZE="-nologo -O2 -Gs ${runtime}" + CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \ -LIBPATH:${MSSDK}/Lib/Prerelease/IA64" STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}" LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}" else RC="rc" + # -Od - no optimization + # -WX - warnings as errors CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d" - CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}" - STLIB_LD="lib -nologo" - LINKBIN="link -link50compat" + # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) + CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}" + STLIB_LD="link -lib -nologo" + LINKBIN="link" fi SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no" @@ -615,7 +618,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ MAKE_EXE="\${CC} -Fe\[$]@" LIBPREFIX="" - EXTRA_CFLAGS="-YX" + EXTRA_CFLAGS="" CFLAGS_WARNING="-W3" LDFLAGS_DEBUG="-debug:full -debugtype:both" LDFLAGS_OPTIMIZE="-release" -- cgit v0.12