All,

This patch restores bootstrap on i386-*-freebsd*.
The build was failing after the introduction of -std=c++98 configure/build flag. The -std=c++98 enables strict_ansi and on FreeBSD the libc function atoll is not defined for this.

But the configure always stated atoll available.....

A bit debugging showed, to my understanding now, the AC_CHECK_FUNCS only checks it a func is available, not more. While the gcc_AC_CHECK_DECLS really recognises the build flags and tells me that atoll w/o std=c++98 is available and with std=c++98 it is not available.

So, the below patch addresses this and restores bootstrap on FreeBSD.

Ok for trunk?

Thanks,
Andreas

2015-05-28  Andreas Tobler  <andre...@gcc.gnu.org>

        * configure.ac: Move the atoll check from AC_CHECK_FUNCS to
        gcc_AC_CHECK_DECLS.
        * configure: Regenerate.

Index: configure.ac
===================================================================
--- configure.ac        (revision 223845)
+++ configure.ac        (working copy)
@@ -1149,7 +1149,7 @@
   fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
   putchar_unlocked putc_unlocked)
-AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \
+AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoq \
        popen sysconf strsignal getrusage nl_langinfo \
        gettimeofday mbstowcs wcswidth mmap setlocale \
        gcc_UNLOCKED_FUNCS madvise)
@@ -1213,7 +1213,7 @@
 #include "ansidecl.h"
 #include "system.h"])
 
-gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \
+gcc_AC_CHECK_DECLS(getenv atol atoll asprintf sbrk abort atof getcwd getwd \
        madvise stpcpy strnlen strsignal strverscmp \
        strtol strtoul strtoll strtoull \
        errno snprintf vsnprintf vasprintf malloc realloc calloc \

Reply via email to