[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Autoconf tests with C++ compiler
From: |
Ralf Wildenhues |
Subject: |
Autoconf tests with C++ compiler |
Date: |
Mon, 30 Nov 2009 22:19:48 +0100 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
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
testsuite-difference-CC=g++
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Autoconf tests with C++ compiler,
Ralf Wildenhues <=