Given the recent mmap regression, I figured it was time that we go after
this a bit more systematically. As a cheap approximation to
AC_LANG_PUSH([C++])
tested_macro
AC_LANG_POP
I ran the testsuite once each with
TESTSUITEFLAGS='-d'
TESTSUITEFLAGS='-d CC=g++'
renamed the respective tests/testsuite.dir directories after each run,
and compared the cache files with this bash-specific (${var/..//}) script:
find testsuite.dir-orig -name config.cache |
while read f; do
sed 's|^ac_cv_env_CC_set=$|&set|;
s|^ac_cv_env_CC_value=$|&g++|;
/^ac_cv_prog_CPP=/s|gcc|g++|;
/^ac_cv_prog_ac_ct_CC=/s|gcc|g++|;
/^ac_cv_prog_cc_c89=/s|=}|=no}|' $f |
diff -u - ${f/dir-orig/dir-g++/} ;
done > testsuite-difference-CC=g++
The result is attached (for a tree which unfortunately had a couple of
unpublished patches, so the testsuite numbers are a bit off). It
reveals a number of differences on Debian GNU/Linux/x86:
- AC_F77_MAIN, AC_FC_MAIN,
- AC_PROG_LEX lex library,
- AC_FUNC_MKTIME bug (see patch in reply)
- AC_FUNC_STRERROR_R
This difference is really due to the glibc headers; though it should
probably be noted in the documentation of this macro or of the
strerror_r portability issue section.
- AC_HEADER_STDBOOL
probably a macro bug, haven't investigated yet.
- AC_FUNC_STRTOLD
gcc without -std=c99 does not declare strtold, but g++ does,
- AC_C_FLEXIBLE_ARRAY_MEMBER
genuine difference between gcc and g++ extensions.
- some differences due to the names being encoded and due to sin being
found without -lm already.
I think this should be added to the set of tests run before a release,
if we can make it more or less agnostic to a few systems at least;
requiring GCC is probably ok.
Cheers,
Ralf
--- - 2009-11-29 17:47:46.236931780 +0100
+++ testsuite.dir-g++//362/config.cache 2009-11-29 17:31:37.000000000 +0100
@@ -28,11 +28,11 @@
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
-ac_cv_lib_lex=${ac_cv_lib_lex=-lfl}
+ac_cv_lib_lex=${ac_cv_lib_lex='none needed'}
ac_cv_objext=${ac_cv_objext=o}
ac_cv_prog_LEX=${ac_cv_prog_LEX=flex}
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
ac_cv_prog_lex_root=${ac_cv_prog_lex_root=lex.yy}
-ac_cv_prog_lex_yytext_pointer=${ac_cv_prog_lex_yytext_pointer=yes}
+ac_cv_prog_lex_yytext_pointer=${ac_cv_prog_lex_yytext_pointer=no}
--- - 2009-11-29 17:47:46.277149488 +0100
+++ testsuite.dir-g++//425/config.cache 2009-11-29 17:33:05.000000000 +0100
@@ -31,7 +31,7 @@
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_alarm=${ac_cv_func_alarm=yes}
-ac_cv_func_working_mktime=${ac_cv_func_working_mktime=yes}
+ac_cv_func_working_mktime=${ac_cv_func_working_mktime=no}
ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h=yes}
ac_cv_header_memory_h=${ac_cv_header_memory_h=yes}
ac_cv_header_stdc=${ac_cv_header_stdc=yes}
--- - 2009-11-29 17:47:46.309562146 +0100
+++ testsuite.dir-g++//280/config.cache 2009-11-29 17:30:07.000000000 +0100
@@ -34,8 +34,8 @@
ac_cv_env_target_alias_value=
ac_cv_fc_compiler_gnu=${ac_cv_fc_compiler_gnu=yes}
ac_cv_fc_libs=${ac_cv_fc_libs=' -L/usr/lib/gcc/x86_64-linux-gnu/4.2.4
-L/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../..
-lgfortranbegin -lgfortran -lm'}
-ac_cv_fc_main=${ac_cv_fc_main=MAIN__}
-ac_cv_fortran_main=${ac_cv_fortran_main=MAIN__}
+ac_cv_fc_main=${ac_cv_fc_main=main}
+ac_cv_fortran_main=${ac_cv_fortran_main=main}
ac_cv_objext=${ac_cv_objext=o}
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_ac_ct_FC=${ac_cv_prog_ac_ct_FC=gfortran}
--- - 2009-11-29 17:47:46.323361451 +0100
+++ testsuite.dir-g++//433/config.cache 2009-11-29 17:33:16.000000000 +0100
@@ -31,7 +31,7 @@
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_strerror_r=${ac_cv_func_strerror_r=yes}
-ac_cv_func_strerror_r_char_p=${ac_cv_func_strerror_r_char_p=no}
+ac_cv_func_strerror_r_char_p=${ac_cv_func_strerror_r_char_p=yes}
ac_cv_have_decl_strerror_r=${ac_cv_have_decl_strerror_r=yes}
ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h=yes}
ac_cv_header_memory_h=${ac_cv_header_memory_h=yes}
--- - 2009-11-29 17:47:46.388732758 +0100
+++ testsuite.dir-g++//377/config.cache 2009-11-29 17:31:51.000000000 +0100
@@ -48,4 +48,4 @@
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
-ac_cv_type__Bool=${ac_cv_type__Bool=yes}
+ac_cv_type__Bool=${ac_cv_type__Bool=no}
--- - 2009-11-29 17:47:46.398638150 +0100
+++ testsuite.dir-g++//437/config.cache 2009-11-29 17:33:20.000000000 +0100
@@ -28,7 +28,7 @@
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
-ac_cv_func_strtold=${ac_cv_func_strtold=no}
+ac_cv_func_strtold=${ac_cv_func_strtold=yes}
ac_cv_objext=${ac_cv_objext=o}
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
--- - 2009-11-29 17:47:46.404608513 +0100
+++ testsuite.dir-g++//266/config.cache 2009-11-29 17:29:50.000000000 +0100
@@ -31,5 +31,5 @@
ac_cv_objext=${ac_cv_objext=o}
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
-ac_cv_prog_cc_c99=${ac_cv_prog_cc_c99=-std=gnu99}
+ac_cv_prog_cc_c99=${ac_cv_prog_cc_c99=no}
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
--- - 2009-11-29 17:47:46.409463220 +0100
+++ testsuite.dir-g++//257/config.cache 2009-11-29 17:29:42.000000000 +0100
@@ -12,7 +12,7 @@
# following values.
ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu=yes}
-ac_cv_c_flexmember=${ac_cv_c_flexmember=yes}
+ac_cv_c_flexmember=${ac_cv_c_flexmember=no}
ac_cv_env_CC_set=set
ac_cv_env_CC_value=g++
ac_cv_env_CFLAGS_set=
--- - 2009-11-29 17:47:46.463835287 +0100
+++ testsuite.dir-g++//267/config.cache 2009-11-29 17:29:53.000000000 +0100
@@ -32,4 +32,4 @@
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
-ac_cv_prog_cc_gcc_c_o=${ac_cv_prog_cc_gcc_c_o=yes}
+ac_cv_prog_cc_g___c_o=${ac_cv_prog_cc_g___c_o=yes}
--- - 2009-11-29 17:47:46.505201122 +0100
+++ testsuite.dir-g++//278/config.cache 2009-11-29 17:30:03.000000000 +0100
@@ -34,8 +34,8 @@
ac_cv_env_target_alias_value=
ac_cv_f77_compiler_gnu=${ac_cv_f77_compiler_gnu=yes}
ac_cv_f77_libs=${ac_cv_f77_libs=' -L/usr/lib/gcc/x86_64-linux-gnu/3.4.6
-L/usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../../lib
-L/usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../.. -L/lib/../lib -L/usr/lib/../lib
-lfrtbegin -lg2c -lm'}
-ac_cv_f77_main=${ac_cv_f77_main=MAIN__}
-ac_cv_fortran_main=${ac_cv_fortran_main=MAIN__}
+ac_cv_f77_main=${ac_cv_f77_main=main}
+ac_cv_fortran_main=${ac_cv_fortran_main=main}
ac_cv_objext=${ac_cv_objext=o}
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_ac_ct_F77=${ac_cv_prog_ac_ct_F77=g77}
--- - 2009-11-29 17:47:46.508348922 +0100
+++ testsuite.dir-g++//294/config.cache 2009-11-29 17:30:17.000000000 +0100
@@ -32,4 +32,4 @@
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
-ac_cv_search_cos=${ac_cv_search_cos=-lm}
+ac_cv_search_cos=${ac_cv_search_cos='none required'}
--- - 2009-11-29 17:47:46.560773832 +0100
+++ testsuite.dir-g++//268/config.cache 2009-11-29 17:29:53.000000000 +0100
@@ -31,6 +31,6 @@
ac_cv_objext=${ac_cv_objext=o}
ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
-ac_cv_prog_cc_c99=${ac_cv_prog_cc_c99=-std=gnu99}
+ac_cv_prog_cc_c99=${ac_cv_prog_cc_c99=no}
ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
-ac_cv_prog_cc_stdc=${ac_cv_prog_cc_stdc=-std=gnu99}
+ac_cv_prog_cc_stdc=${ac_cv_prog_cc_stdc=no}
--- - 2009-11-29 17:47:46.602370451 +0100
+++ testsuite.dir-g++//293/config.cache 2009-11-29 17:30:15.000000000 +0100
@@ -1,42 +0,0 @@
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu=yes}
-ac_cv_env_CC_set=set
-ac_cv_env_CC_value=g++
-ac_cv_env_CFLAGS_set=
-ac_cv_env_CFLAGS_value=
-ac_cv_env_CPPFLAGS_set=
-ac_cv_env_CPPFLAGS_value=
-ac_cv_env_LDFLAGS_set=
-ac_cv_env_LDFLAGS_value=
-ac_cv_env_LIBS_set=
-ac_cv_env_LIBS_value=
-ac_cv_env_build_alias_set=
-ac_cv_env_build_alias_value=
-ac_cv_env_host_alias_set=
-ac_cv_env_host_alias_value=
-ac_cv_env_target_alias_set=
-ac_cv_env_target_alias_value=
-ac_cv_lib_m___acos=${ac_cv_lib_m___acos=yes}
-ac_cv_lib_m___acossack=${ac_cv_lib_m___acossack=no}
-ac_cv_lib_m___asin=${ac_cv_lib_m___asin=yes}
-ac_cv_lib_m___asinner=${ac_cv_lib_m___asinner=no}
-ac_cv_lib_m_cos=${ac_cv_lib_m_cos=yes}
-ac_cv_lib_m_cossack=${ac_cv_lib_m_cossack=no}
-ac_cv_lib_m_sin=${ac_cv_lib_m_sin=yes}
-ac_cv_lib_m_sinner=${ac_cv_lib_m_sinner=no}
-ac_cv_objext=${ac_cv_objext=o}
-ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC=g++}
-ac_cv_prog_cc_c89=${ac_cv_prog_cc_c89=no}
-ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}