This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: enabling -O2 with gcc 2.96 and later
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Re: enabling -O2 with gcc 2.96 and later
- From: Phil Edwards <pedwards at jaj dot com>
- Date: Fri, 17 Dec 1999 16:43:55 -0500
> can you please post the super-duper new patch pre-checkin please?
Appended.
> oh man. Please, let's not go here. It took about 2 days to get -O2 working
> with the tree-based inlining in 2.96. . . . I suppose if it works, yeah,
> enable for 2.96. But if it doesn't, drop it and we'll clean up later.
Uhhhhhg. I can't tell whether it works or not. With or without (shown
'with' here), the current CVS sources can't be built using 2.96. (Or 2.95,
actually.)
c++ -DHAVE_CONFIG_H -I. -I/home0/pedwards/libstdc++/src -I.. -nostdinc++
-I/home0/pedwards/libstdc++ -I/home0/pedwards/libstdc++/stl
-I/home0/pedwards/libstdc++/libio -D_GNU_SOURCE -fno-implicit-templates
-Wall -Wno-format -W -Wwrite-strings -Winline -Werror -g
-O2 -fstrict-aliasing -fimplicit-templates -c -fPIC -DPIC
/home0/pedwards/libstdc++/src/misc-inst.cc -o .libs/misc-inst.lo
[srcdir]/bits/fstream.tcc: In method `typename _Traits::int_type basic_filebuf<_CharT, _Traits>::_M_really_overflow (typename _Traits::int_type) [with _CharT = char, _Traits = char_traits<char>]':
[srcdir]/bits/fstream.tcc:133: instantiated from `basic_filebuf<_CharT, _Traits>::close () [with _CharT = char, _Traits = char_traits<char>]'
[srcdir]/bits/std_fstream.h:80: instantiated from `basic_filebuf<_CharT, _Traits>::basic_filebuf (int) [with _CharT = char, _Traits = char_traits<char>]'
[srcdir]/src/misc-inst.cc:79: instantiated from here
[srcdir]/bits/fstream.tcc:348: creating array with size zero (`(__plen + 1)')
[srcdir]/bits/fstream.tcc:348: confused by earlier errors, bailing out
Since I can't tell /what/ effect that switch has, I'm going to leave it out
of this patch, and somebody more knowledgeable about it can add it later...
> Of more interest to me is something for --enable-namespaces to turn on
> -fhonor-std
Okay, I'll hack on that over this weekend. Right now, I need a haircut,
badly.
(If you reply to the list, please don't cc another copy to me. Thanks!)
Phil
Index: configure
===================================================================
RCS file: /cvs/libstdc++/libstdc++/configure,v
retrieving revision 1.36
diff -u -3 -r1.36 configure
--- configure 1999/12/02 08:07:41 1.36
+++ configure 1999/12/17 20:16:42
@@ -1851,9 +1851,111 @@
fi
+# How optimal can we be?
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1857: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1872 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1878: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1889 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1895: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1906 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1912: \"$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
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+cat > conftest.$ac_ext <<EOF
+#line 1937 "configure"
+#include "confdefs.h"
+
+#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
+ok
+#fi
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "ok" >/dev/null 2>&1; then
+ rm -rf conftest*
+ OPTLEVEL='-O2'
+else
+ rm -rf conftest*
+ OPTLEVEL=
+fi
+rm -f conftest*
+
+
+
# More options.
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1857: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:1959: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -1876,12 +1978,12 @@
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1880: checking for Cygwin environment" >&5
+echo "configure:1982: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1885 "configure"
+#line 1987 "configure"
#include "confdefs.h"
int main() {
@@ -1892,7 +1994,7 @@
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -1909,19 +2011,19 @@
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1913: checking for mingw32 environment" >&5
+echo "configure:2015: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1918 "configure"
+#line 2020 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:1925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -1940,7 +2042,7 @@
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1944: checking for executable suffix" >&5
+echo "configure:2046: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1950,7 +2052,7 @@
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
@@ -1975,7 +2077,7 @@
# Math-related tests.
#
echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:1979: checking for sin in -lm" >&5
+echo "configure:2081: checking for sin in -lm" >&5
ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1983,7 +2085,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1987 "configure"
+#line 2089 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1994,7 +2096,7 @@
sin()
; return 0; }
EOF
-if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2024,12 +2126,12 @@
carg cargf nan hypot hypotf atan2f expf copysignf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2028: checking for $ac_func" >&5
+echo "configure:2130: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2033 "configure"
+#line 2135 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2052,7 +2154,7 @@
; return 0; }
EOF
-if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2083,12 +2185,12 @@
# the non-complex functions.
USE_LONG_DOUBLE=no
echo $ac_n "checking for sinl""... $ac_c" 1>&6
-echo "configure:2087: checking for sinl" >&5
+echo "configure:2189: checking for sinl" >&5
if eval "test \"`echo '$''{'ac_cv_func_sinl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2092 "configure"
+#line 2194 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sinl(); below. */
@@ -2111,7 +2213,7 @@
; return 0; }
EOF
-if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_sinl=yes"
else
@@ -2130,12 +2232,12 @@
csqrtl ctanhl ctanl cargl hypotl signbitl c_logl clog10l
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2134: checking for $ac_func" >&5
+echo "configure:2236: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2139 "configure"
+#line 2241 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2158,7 +2260,7 @@
; return 0; }
EOF
-if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2196,12 +2298,12 @@
strtof strtold fabsf sincos sincosf sincosl finite qfinite fpclass qfpclass
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2200: checking for $ac_func" >&5
+echo "configure:2302: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2205 "configure"
+#line 2307 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2224,7 +2326,7 @@
; return 0; }
EOF
-if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2258,12 +2360,12 @@
_strtof _strtold _fabsf _sincos _sincosf _sincosl _finite _qfinite _fpclass _qfpclass
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2262: checking for $ac_func" >&5
+echo "configure:2364: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2267 "configure"
+#line 2369 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2286,7 +2388,7 @@
; return 0; }
EOF
-if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2313,14 +2415,14 @@
# Test for builtin math functions.
cat > conftest.$ac_ext <<EOF
-#line 2317 "configure"
+#line 2419 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
float foo(void) { __builtin_sinf(0.0); }
; return 0; }
EOF
-if { (eval echo configure:2324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_builtin_sinf=yes
else
@@ -2338,14 +2440,14 @@
fi
cat > conftest.$ac_ext <<EOF
-#line 2342 "configure"
+#line 2444 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
float foo(void) { __builtin_cosf(0.0); }
; return 0; }
EOF
-if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_builtin_cosf=yes
else
@@ -2363,14 +2465,14 @@
fi
cat > conftest.$ac_ext <<EOF
-#line 2367 "configure"
+#line 2469 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
float foo(void) { __builtin_fabsf(0.0); }
; return 0; }
EOF
-if { (eval echo configure:2374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_builtin_fabsf=yes
else
@@ -2388,14 +2490,14 @@
fi
cat > conftest.$ac_ext <<EOF
-#line 2392 "configure"
+#line 2494 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
float foo(void) { __builtin_sqrtf(0.0); }
; return 0; }
EOF
-if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_builtin_sqrtf=yes
else
@@ -2414,99 +2516,19 @@
LIBS="$save_LIBS"
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2419: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 2434 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2440: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 2451 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2457: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 2468 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2474: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
ac_safe=`echo "complex.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for complex.h""... $ac_c" 1>&6
-echo "configure:2500: checking for complex.h" >&5
+echo "configure:2522: checking for complex.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
-#line 2505 "configure"
+#line 2527 "configure"
#include "confdefs.h"
#include <complex.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2532: \"$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*
@@ -2534,17 +2556,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2538: checking for $ac_hdr" >&5
+echo "configure:2560: checking for $ac_hdr" >&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
-#line 2543 "configure"
+#line 2565 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2570: \"$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*
@@ -2579,14 +2601,14 @@
&& test "$ac_cv_header_sys_machine_h" = no
then
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2583: checking whether byte ordering is bigendian" >&5
+echo "configure:2605: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 2590 "configure"
+#line 2612 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -2597,11 +2619,11 @@
#endif
; return 0; }
EOF
-if { (eval echo configure:2601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 2605 "configure"
+#line 2627 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -2612,7 +2634,7 @@
#endif
; return 0; }
EOF
-if { (eval echo configure:2616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -2632,7 +2654,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 2636 "configure"
+#line 2658 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -2645,7 +2667,7 @@
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -2674,12 +2696,12 @@
for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2678: checking for $ac_func" >&5
+echo "configure:2700: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2683 "configure"
+#line 2705 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2702,7 +2724,7 @@
; return 0; }
EOF
-if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2731,17 +2753,17 @@
ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
-echo "configure:2735: checking for wchar.h" >&5
+echo "configure:2757: checking for wchar.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
-#line 2740 "configure"
+#line 2762 "configure"
#include "confdefs.h"
#include <wchar.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2767: \"$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*
@@ -2760,14 +2782,14 @@
# Test wchar.h for mbstate_t, which is needed for char_traits and others.
cat > conftest.$ac_ext <<EOF
-#line 2764 "configure"
+#line 2786 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
mbstate_t teststate;
; return 0; }
EOF
-if { (eval echo configure:2771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_native_mbstatet=yes
else
@@ -2788,14 +2810,14 @@
# Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
# numeric_limits can instantiate type_traits<wchar_t>
cat > conftest.$ac_ext <<EOF
-#line 2792 "configure"
+#line 2814 "configure"
#include "confdefs.h"
#include <wchar.h>
int main() {
int i = WCHAR_MIN; int j = WCHAR_MAX;
; return 0; }
EOF
-if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
has_wchar_minmax=yes
else
@@ -2817,9 +2839,9 @@
# Test wchar.h for WEOF, which is what we use to determine whether
# to specialize for wchar_t or not.
echo $ac_n "checking for wide character support""... $ac_c" 1>&6
-echo "configure:2821: checking for wide character support" >&5
+echo "configure:2843: checking for wide character support" >&5
cat > conftest.$ac_ext <<EOF
-#line 2823 "configure"
+#line 2845 "configure"
#include "confdefs.h"
#include <wchar.h>
@@ -2828,7 +2850,7 @@
wint_t i = WEOF;
; return 0; }
EOF
-if { (eval echo configure:2832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
has_weof=yes
else
@@ -2862,13 +2884,13 @@
# Test for glibc 2. In this case we need not compile the libio.
echo $ac_n "checking for glibc 2""... $ac_c" 1>&6
-echo "configure:2866: checking for glibc 2" >&5
+echo "configure:2888: checking for glibc 2" >&5
if eval "test \"`echo '$''{'use_glibc2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2872 "configure"
+#line 2894 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
@@ -2878,7 +2900,7 @@
#endif
; return 0; }
EOF
-if { (eval echo configure:2882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_glibc2=yes
else
@@ -2904,17 +2926,17 @@
# Test for <ctype> _ISbit, so that ctype<char> will work correctly
ac_safe=`echo "ctype.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ctype.h""... $ac_c" 1>&6
-echo "configure:2908: checking for ctype.h" >&5
+echo "configure:2930: checking for ctype.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
-#line 2913 "configure"
+#line 2935 "configure"
#include "confdefs.h"
#include <ctype.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2940: \"$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*
@@ -2932,14 +2954,14 @@
echo "$ac_t""yes" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 2936 "configure"
+#line 2958 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
int i = _ISspace;
; return 0; }
EOF
-if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_native_ctype=yes
else
@@ -2962,19 +2984,19 @@
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2966: checking for LC_MESSAGES" >&5
+echo "configure:2988: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2971 "configure"
+#line 2993 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_val_LC_MESSAGES=yes
else
@@ -2998,7 +3020,7 @@
echo $ac_n "checking for GNU C++ float __complex__ support""... $ac_c" 1>&6
-echo "configure:3002: checking for GNU C++ float __complex__ support" >&5
+echo "configure:3024: checking for GNU C++ float __complex__ support" >&5
if eval "test \"`echo '$''{'glibcpp_cv_float_complex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3031,14 +3053,14 @@
};
EOB
cat > conftest.$ac_ext <<EOF
-#line 3035 "configure"
+#line 3057 "configure"
#include "confdefs.h"
#include "conftest.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
glibcpp_cv_float_complex=ok
else
@@ -3229,13 +3251,14 @@
s%@LN_S@%$LN_S%g
s%@LIBTOOL@%$LIBTOOL%g
s%@CXX@%$CXX%g
+s%@CPP@%$CPP%g
+s%@OPTLEVEL@%$OPTLEVEL%g
s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
s%@MAINT@%$MAINT%g
s%@EXEEXT@%$EXEEXT%g
s%@LIBMATHOBJS@%$LIBMATHOBJS%g
s%@USE_LONG_DOUBLE@%$USE_LONG_DOUBLE%g
-s%@CPP@%$CPP%g
s%@LIBSTRINGOBJS@%$LIBSTRINGOBJS%g
s%@GLIBCPP_NEED_LIBIO_TRUE@%$GLIBCPP_NEED_LIBIO_TRUE%g
s%@GLIBCPP_NEED_LIBIO_FALSE@%$GLIBCPP_NEED_LIBIO_FALSE%g
Index: configure.in
===================================================================
RCS file: /cvs/libstdc++/libstdc++/configure.in,v
retrieving revision 1.35
diff -u -3 -r1.35 configure.in
--- configure.in 1999/12/02 08:07:41 1.35
+++ configure.in 1999/12/17 20:16:42
@@ -10,6 +10,14 @@
AC_PROG_CXX
AC_PROG_LN_S
+# How optimal can we be?
+AC_EGREP_CPP([ok], [
+#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
+ok
+#fi
+], [OPTLEVEL='-O2'], [OPTLEVEL=])
+AC_SUBST(OPTLEVEL)
+
# More options.
AM_MAINTAINER_MODE
AC_EXEEXT
Index: src/Makefile.am
===================================================================
RCS file: /cvs/libstdc++/libstdc++/src/Makefile.am,v
retrieving revision 1.58
diff -u -3 -r1.58 Makefile.am
--- Makefile.am 1999/12/11 00:19:45 1.58
+++ Makefile.am 1999/12/17 20:16:42
@@ -8,8 +8,8 @@
WERROR = -Werror
# OPTIMIZE_CXXFLAGS = -fsquangle -fhonor-std -fnew-exceptions \
# -ffunction-sections -fvtable-gc -Wl,--gc-sections
-CXXFLAGS = -g
-AM_CXXFLAGS = -O2 -D_GNU_SOURCE -fno-implicit-templates \
+CXXFLAGS = -g @OPTLEVEL@
+AM_CXXFLAGS = -D_GNU_SOURCE -fno-implicit-templates \
-Wall -Wno-format -W -Wwrite-strings -Winline $(WERROR) \
$(OTHER_CXXFLAGS)
Index: src/Makefile.in
===================================================================
RCS file: /cvs/libstdc++/libstdc++/src/Makefile.in,v
retrieving revision 1.69
diff -u -3 -r1.69 Makefile.in
--- Makefile.in 1999/12/11 00:19:45 1.69
+++ Makefile.in 1999/12/17 20:16:42
@@ -72,6 +72,7 @@
MAKEINFO = @MAKEINFO@
NM = @NM@
OBJDUMP = @OBJDUMP@
+OPTLEVEL = @OPTLEVEL@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
@@ -85,10 +86,10 @@
# in libtool since this would add -lstdc++ to the link line which of
# course is impossible.
WERROR = -Werror
-# OTHER_CXXFLAGS = -fsquangle -fhonor-std -fnew-exceptions \
+# OPTIMIZE_CXXFLAGS = -fsquangle -fhonor-std -fnew-exceptions \
# -ffunction-sections -fvtable-gc -Wl,--gc-sections
-CXXFLAGS = -g
-AM_CXXFLAGS = -O2 -D_GNU_SOURCE -fno-implicit-templates \
+CXXFLAGS = -g @OPTLEVEL@
+AM_CXXFLAGS = -D_GNU_SOURCE -fno-implicit-templates \
-Wall -Wno-format -W -Wwrite-strings -Winline $(WERROR) \
$(OTHER_CXXFLAGS)