From c3f247f4edf681cb26b66f318673d051667a4f16 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Thu, 3 Jun 2010 06:45:02 +0000 Subject: [PATCH] re PR bootstrap/42798 (--enable-build-with-cxx bootstrap fails on i686-pc-linux-gnu (Fedora12)) Fix PR bootstrap/42798. libiberty/: PR bootstrap/42798 * configure.ac: Check for declaration of 'basename(char *)'. * configure: Regenerate. libcpp/: PR bootstrap/42798 * configure.ac: Check for declaration of 'basename(char *)'. * configure: Regenerate. * config.in: Regenerate. libjava/: * configure: Regenerate. libjava/classpath/: * configure: Regenerate. fixincludes/: PR bootstrap/42798 * configure.ac: Check for declaration of 'basename(char *)'. * configure: Regenerate. From-SVN: r160211 --- fixincludes/ChangeLog | 7 +++++++ fixincludes/configure | 19 ++++++++++++------ fixincludes/configure.ac | 3 ++- libcpp/ChangeLog | 8 ++++++++ libcpp/config.in | 4 ++-- libcpp/configure | 39 ++++++++++++++++++++++--------------- libcpp/configure.ac | 4 ++-- libiberty/ChangeLog | 9 ++++++++- libiberty/configure | 22 +++++++++++++-------- libiberty/configure.ac | 4 ++-- libjava/ChangeLog | 4 ++++ libjava/classpath/ChangeLog | 4 ++++ libjava/classpath/configure | 30 ++++++++++++++++------------ libjava/configure | 20 ++++++++++++------- 14 files changed, 120 insertions(+), 57 deletions(-) diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index b0b26dfe3fd..274d0039723 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2010-06-03 Joern Rennecke + Ralf Wildenhues + + PR bootstrap/42798 + * configure.ac: Check for declaration of 'basename(char *)'. + * configure: Regenerate. + 2010-04-12 Rainer Orth * inclhack.def (alpha_wchar): Remove. diff --git a/fixincludes/configure b/fixincludes/configure index 52821e47144..7b7109a9301 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -1743,8 +1743,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else @@ -1754,8 +1756,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -4725,8 +4731,8 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ASPRINTF $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default" -if test "x$ac_cv_have_decl_basename" = x""yes; then : +ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" +if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -4755,6 +4761,7 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VASPRINTF $ac_have_decl _ACEOF + ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then : ac_have_decl=1 diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index f30a6427658..2c488e70338 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -87,7 +87,8 @@ define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl putchar_unlocked putc_unlocked) AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS) -AC_CHECK_DECLS(m4_split(m4_normalize(abort asprintf basename errno vasprintf fixincludes_UNLOCKED_FUNCS))) +AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, vasprintf]) +AC_CHECK_DECLS(m4_split(m4_normalize(fixincludes_UNLOCKED_FUNCS))) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index cc77ca013bc..042d6fed4cf 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,11 @@ +2010-06-03 Joern Rennecke + Ralf Wildenhues + + PR bootstrap/42798 + * configure.ac: Check for declaration of 'basename(char *)'. + * configure: Regenerate. + * config.in: Regenerate. + 2010-04-25 Joseph Myers * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X. diff --git a/libcpp/config.in b/libcpp/config.in index 4c71ec3cea5..996993405db 100644 --- a/libcpp/config.in +++ b/libcpp/config.in @@ -33,8 +33,8 @@ don't. */ #undef HAVE_DECL_ASPRINTF -/* Define to 1 if you have the declaration of `basename', and to 0 if you - don't. */ +/* Define to 1 if you have the declaration of `basename(char *)', and to 0 if + you don't. */ #undef HAVE_DECL_BASENAME /* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if diff --git a/libcpp/configure b/libcpp/configure index 00cbd7a583d..cf17de447f2 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -2239,8 +2239,10 @@ $as_echo "$ac_res" >&6; } ac_fn_cxx_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else @@ -2250,8 +2252,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -5480,8 +5486,8 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ASPRINTF $ac_have_decl _ACEOF -ac_fn_cxx_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default" -if test "x$ac_cv_have_decl_basename" = x""yes; then : +ac_fn_cxx_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" +if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5510,6 +5516,17 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETOPT $ac_have_decl _ACEOF +ac_fn_cxx_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VASPRINTF $ac_have_decl +_ACEOF + ac_fn_cxx_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then : ac_have_decl=1 @@ -5670,16 +5687,6 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl _ACEOF -ac_fn_cxx_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_VASPRINTF $ac_have_decl -_ACEOF # Checks for library functions. diff --git a/libcpp/configure.ac b/libcpp/configure.ac index d520e933c90..9dcec239bc1 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -81,8 +81,8 @@ define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl putchar_unlocked putc_unlocked) AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS) -AC_CHECK_DECLS(m4_split(m4_normalize(abort asprintf basename errno getopt \ - libcpp_UNLOCKED_FUNCS vasprintf))) +AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, getopt, vasprintf]) +AC_CHECK_DECLS(m4_split(m4_normalize(libcpp_UNLOCKED_FUNCS))) # Checks for library functions. AC_FUNC_ALLOCA diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 520d5dc4a7b..744f6ae1aef 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,4 +1,11 @@ -2ß1ß-05-26 Kai Tietz +2010-06-03 Joern Rennecke + Ralf Wildenhues + + PR bootstrap/42798 + * configure.ac: Check for declaration of 'basename(char *)'. + * configure: Regenerate. + +2010-05-26 Kai Tietz * testsuite/demangle-expected: Add tests for __int128 and unsigned __int128 types. diff --git a/libiberty/configure b/libiberty/configure index 77aeb56c707..b47bc94248d 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -1904,8 +1904,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else @@ -1915,8 +1917,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -5310,8 +5316,8 @@ _ACEOF fi done - ac_fn_c_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default" -if test "x$ac_cv_have_decl_basename" = x""yes; then : + ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" +if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -6349,8 +6355,8 @@ _ACEOF fi done - ac_fn_c_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default" -if test "x$ac_cv_have_decl_basename" = x""yes; then : + ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" +if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 diff --git a/libiberty/configure.ac b/libiberty/configure.ac index 515bb338441..32ec8d9c095 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -379,7 +379,7 @@ if test "x" = "y"; then table times tmpnam \ vasprintf vfprintf vprintf vsprintf \ wait3 wait4 waitpid) - AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf]) + AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf]) AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.]) AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.]) AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.]) @@ -663,7 +663,7 @@ if test -z "${setobjs}"; then [AC_MSG_RESULT([no])]) AC_CHECK_FUNCS($checkfuncs) - AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf]) + AC_CHECK_DECLS([basename(char *), ffs, asprintf, vasprintf, snprintf, vsnprintf]) AC_CHECK_DECLS([calloc, getenv, getopt, malloc, realloc, sbrk]) AC_CHECK_DECLS([strverscmp]) libiberty_NEED_DECLARATION(canonicalize_file_name) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 78903df25dc..47caffe0438 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2010-06-03 Ralf Wildenhues + + * configure: Regenerate. + 2010-06-03 Matthias Klose * libtool-version: Bump soversion. diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index a12288ce72c..920bc8201a8 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,7 @@ +2010-06-03 Ralf Wildenhues + + * configure: Regenerate. + 2010-05-04 Andrew Haley * lib/gen-classlist.sh.in: Use absolute pathnames for all the diff --git a/libjava/classpath/configure b/libjava/classpath/configure index e452d98c4c4..b98c8e84a67 100755 --- a/libjava/classpath/configure +++ b/libjava/classpath/configure @@ -2312,8 +2312,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else @@ -2323,8 +2325,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -11812,7 +11818,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11815 "configure" +#line 11821 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11918,7 +11924,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11921 "configure" +#line 11927 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -21937,10 +21943,10 @@ fi gmplibs=-lgmp gmpinc= gmplibs="-L$with_gmp/lib $gmplibs" + gmpinc="-I$with_gmp/include $gmpinc" if test "x$with_gmp_include" != x; then gmpinc="-I$with_gmp_include $gmpinc" fi - gmpinc="-I$with_gmp/include $gmpinc" if test "x$with_gmp_lib" != x; then gmplibs="-L$with_gmp_lib $gmplibs" fi @@ -23728,7 +23734,7 @@ EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else - echo "configure: 23731: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 + echo "configure: 23737: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: failed file was:" >&5 cat Test.uue >&5 ac_cv_prog_uudecode_base64=no @@ -23873,7 +23879,7 @@ else JAVA_TEST=Object.java CLASS_TEST=Object.class cat << \EOF > $JAVA_TEST -/* #line 23876 "configure" */ +/* #line 23882 "configure" */ package java.lang; public class Object @@ -23920,7 +23926,7 @@ JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test cat << \EOF > $JAVA_TEST -/* [#]line 23923 "configure" */ +/* [#]line 23929 "configure" */ public class Test { public static void main (String args[]) { System.exit (0); @@ -24246,7 +24252,7 @@ else JAVA_TEST=Object.java CLASS_TEST=Object.class cat << \EOF > $JAVA_TEST -/* #line 24249 "configure" */ +/* #line 24255 "configure" */ package java.lang; public class Object @@ -24285,7 +24291,7 @@ fi JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST - /* #line 24288 "configure" */ + /* #line 24294 "configure" */ public class Test { public static void main(String args) diff --git a/libjava/configure b/libjava/configure index 06ba4e98b41..c0bfdea19dc 100755 --- a/libjava/configure +++ b/libjava/configure @@ -2315,8 +2315,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else @@ -2326,8 +2328,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -13339,7 +13345,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13342 "configure" +#line 13348 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13445,7 +13451,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13448 "configure" +#line 13454 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19424,7 +19430,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 19427 "configure" +#line 19433 "configure" struct S { ~S(); }; void bar(); void foo()