public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] fix bootstrap on FreeBSD i386/arm
@ 2015-05-28 18:47 Andreas Tobler
  2015-05-28 20:45 ` Jason Merrill
  2015-05-28 23:02 ` Eric Botcazou
  0 siblings, 2 replies; 15+ messages in thread
From: Andreas Tobler @ 2015-05-28 18:47 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

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  <andreast@gcc.gnu.org>

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


[-- Attachment #2: fbsd_configure.ac.diff --]
[-- Type: text/plain, Size: 972 bytes --]

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 \

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-06-01 15:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-28 18:47 [patch] fix bootstrap on FreeBSD i386/arm Andreas Tobler
2015-05-28 20:45 ` Jason Merrill
2015-05-28 23:02 ` Eric Botcazou
2015-05-29 10:17   ` Rainer Orth
2015-05-29 10:26     ` Eric Botcazou
2015-05-29 10:39       ` Rainer Orth
2015-05-29 17:28   ` Steve Ellcey
2015-05-30 11:44     ` Andreas Tobler
2015-05-31 21:33       ` Andreas Tobler
2015-05-31 21:36         ` Jason Merrill
2015-06-01 14:45       ` Steve Ellcey
2015-06-01 15:08         ` Andreas Tobler
2015-06-01 15:20           ` Steve Ellcey
2015-05-31 20:38   ` Andreas Tobler
2015-05-31 22:43     ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).