This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix bootstrap on FreeBSD i386/arm


Hi Jason,

On 30.05.15 11:27, Andreas Tobler wrote:

On 29.05.15 19:18, Steve Ellcey wrote:
On Thu, 2015-05-28 at 23:54 +0200, Eric Botcazou wrote:
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.

Solaris (x86 and SPARC) is also broken in various ways: for example, the "sun"
preprocessor macro is no more defined.  Why do we need strict ANSI exactly?

Andreas,

This patch (or the earlier one) is also breaking a build of my MIPS
cross compiler.  On CentOS 5.11 (yes I know that is old) I can build a
cross compiler where the executables are x86_64 objects but not when
they are i386 objects (i.e. when using -m32 to build GCC).  The error
is duplicate atoll definitions (one in read-rtl.c and one in stdlib.h).

I may be mistaken but think when you moved the atoll check from
AC_CHECK_FUNCS to gcc_AC_CHECK_DECLS you needed to change config.in and
read-rtl.c because gcc_AC_CHECK_DECLS sets HAVE_DECL_ATOLL instead of
HAVE_ATOLL.

I'm sorry. I totally forgot about autoheader...

I'm testing this one now. Would you mind giving it a try?

Steve has a valid point here and my update, see below, fixes that. Is this ok for trunk as well?

I tested on amd64/i386-freebsd and on x86_64 Gnu/Linux and also build in progress on i686 Gnu/Linux (CentOS).

Thanks,

Andreas


2015-05-31  Andreas Tobler  <andreast@gcc.gnu.org>

	* read-rtl.c: Adapt to use HAVE_DECL_ATOLL instead of HAVE_ATOLL.
	* config.in: Regenerate.

Attachment: fbsd_atoll_2.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]