* [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
* Re: [patch] fix bootstrap on FreeBSD i386/arm
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
1 sibling, 0 replies; 15+ messages in thread
From: Jason Merrill @ 2015-05-28 20:45 UTC (permalink / raw)
To: Andreas Tobler, GCC Patches
OK, thanks.
Jason
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
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
` (2 more replies)
1 sibling, 3 replies; 15+ messages in thread
From: Eric Botcazou @ 2015-05-28 23:02 UTC (permalink / raw)
To: Andreas Tobler; +Cc: gcc-patches
> 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?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-28 23:02 ` Eric Botcazou
@ 2015-05-29 10:17 ` Rainer Orth
2015-05-29 10:26 ` Eric Botcazou
2015-05-29 17:28 ` Steve Ellcey
2015-05-31 20:38 ` Andreas Tobler
2 siblings, 1 reply; 15+ messages in thread
From: Rainer Orth @ 2015-05-29 10:17 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Andreas Tobler, gcc-patches
Eric Botcazou <ebotcazou@adacore.com> writes:
>> 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?
Only Solaris 10, actually: Solaris 11 isn't affected since it has
clearenv(3C).
OTOH, why use sun in this place instead of __sun__ (or rather __sun__ &&
__svr4__) like any other platform?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-29 10:17 ` Rainer Orth
@ 2015-05-29 10:26 ` Eric Botcazou
2015-05-29 10:39 ` Rainer Orth
0 siblings, 1 reply; 15+ messages in thread
From: Eric Botcazou @ 2015-05-29 10:26 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, Andreas Tobler
> Only Solaris 10, actually: Solaris 11 isn't affected since it has
> clearenv(3C).
That's not the only problem AFAICS:
/usr/include/sys/resource.h: At global scope:
/usr/include/sys/resource.h:79:25: error: declaration does not declare
anything [-fpermissive]
/homes/botcazou/gcc-head/src/gcc/system.h:469:48: error: 'char* strstr(const
char*, const char*)' conflicts with previous using declaration 'const char*
std::strstr(const char*, const char*)'
and so on. It's SPARC/Solaris 10.
> OTOH, why use sun in this place instead of __sun__ (or rather __sun__ &&
> __svr4__) like any other platform?
Yes, I can change that, but it's probably not the only case.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-29 10:26 ` Eric Botcazou
@ 2015-05-29 10:39 ` Rainer Orth
0 siblings, 0 replies; 15+ messages in thread
From: Rainer Orth @ 2015-05-29 10:39 UTC (permalink / raw)
To: Eric Botcazou; +Cc: gcc-patches, Andreas Tobler
Eric Botcazou <ebotcazou@adacore.com> writes:
>> Only Solaris 10, actually: Solaris 11 isn't affected since it has
>> clearenv(3C).
>
> That's not the only problem AFAICS:
>
> /usr/include/sys/resource.h: At global scope:
> /usr/include/sys/resource.h:79:25: error: declaration does not declare
> anything [-fpermissive]
I didn't see this: my <sys/resource.h> has
typedef u_longlong_t rlim_t;
on line 79.
> /homes/botcazou/gcc-head/src/gcc/system.h:469:48: error: 'char* strstr(const
> char*, const char*)' conflicts with previous using declaration 'const char*
> std::strstr(const char*, const char*)'
>
> and so on. It's SPARC/Solaris 10.
Not during a Solaris 10/x86 bootstrap: <iso/string_iso.h> has
extern const char *strstr(const char *, const char *);
#if __cplusplus >= 199711L. Maybe this changed sometime after S10 FCS.
>> OTOH, why use sun in this place instead of __sun__ (or rather __sun__ &&
>> __svr4__) like any other platform?
>
> Yes, I can change that, but it's probably not the only case.
Possibly not. Still, it would be good to be consistent here.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-28 23:02 ` Eric Botcazou
2015-05-29 10:17 ` Rainer Orth
@ 2015-05-29 17:28 ` Steve Ellcey
2015-05-30 11:44 ` Andreas Tobler
2015-05-31 20:38 ` Andreas Tobler
2 siblings, 1 reply; 15+ messages in thread
From: Steve Ellcey @ 2015-05-29 17:28 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Andreas Tobler, gcc-patches
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.
Steve Ellcey
sellcey@imgtec.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-29 17:28 ` Steve Ellcey
@ 2015-05-30 11:44 ` Andreas Tobler
2015-05-31 21:33 ` Andreas Tobler
2015-06-01 14:45 ` Steve Ellcey
0 siblings, 2 replies; 15+ messages in thread
From: Andreas Tobler @ 2015-05-30 11:44 UTC (permalink / raw)
To: sellcey, Eric Botcazou; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
Hi Steve,
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?
Thanks,
Andreas
[-- Attachment #2: fbsd_atoll_2.diff --]
[-- Type: text/plain, Size: 1955 bytes --]
Index: config.in
===================================================================
--- config.in (revision 223885)
+++ config.in (working copy)
@@ -624,12 +624,6 @@
#endif
-/* Define to 1 if you have the `atoll' function. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_ATOLL
-#endif
-
-
/* Define to 1 if you have the `atoq' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_ATOQ
@@ -686,9 +680,16 @@
#endif
-/* Define to 1 if we found a declaration for 'basename', otherwise define to
- 0. */
+/* Define to 1 if we found a declaration for 'atoll', otherwise define to 0.
+ */
#ifndef USED_FOR_TARGET
+#undef HAVE_DECL_ATOLL
+#endif
+
+
+/* Define to 1 if you have the declaration of `basename(const char*)', and to
+ 0 if you don't. */
+#ifndef USED_FOR_TARGET
#undef HAVE_DECL_BASENAME
#endif
@@ -963,8 +964,8 @@
#endif
-/* Define to 1 if we found a declaration for 'strstr', otherwise define to 0.
- */
+/* Define to 1 if you have the declaration of `strstr(const char*,const
+ char*)', and to 0 if you don't. */
#ifndef USED_FOR_TARGET
#undef HAVE_DECL_STRSTR
#endif
Index: read-rtl.c
===================================================================
--- read-rtl.c (revision 223885)
+++ read-rtl.c (working copy)
@@ -704,7 +704,7 @@
\f
/* Provide a version of a function to read a long long if the system does
not provide one. */
-#if HOST_BITS_PER_WIDE_INT > HOST_BITS_PER_LONG && !defined(HAVE_ATOLL) && !defined(HAVE_ATOQ)
+#if HOST_BITS_PER_WIDE_INT > HOST_BITS_PER_LONG && !HAVE_DECL_ATOLL && !defined(HAVE_ATOQ)
HOST_WIDE_INT atoll (const char *);
HOST_WIDE_INT
@@ -1328,7 +1328,7 @@
#else
/* Prefer atoll over atoq, since the former is in the ISO C99 standard.
But prefer not to use our hand-rolled function above either. */
-#if defined(HAVE_ATOLL) || !defined(HAVE_ATOQ)
+#if HAVE_DECL_ATOLL || !defined(HAVE_ATOQ)
tmp_wide = atoll (name.string);
#else
tmp_wide = atoq (name.string);
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-28 23:02 ` Eric Botcazou
2015-05-29 10:17 ` Rainer Orth
2015-05-29 17:28 ` Steve Ellcey
@ 2015-05-31 20:38 ` Andreas Tobler
2015-05-31 22:43 ` Eric Botcazou
2 siblings, 1 reply; 15+ messages in thread
From: Andreas Tobler @ 2015-05-31 20:38 UTC (permalink / raw)
To: Eric Botcazou; +Cc: gcc-patches
On 28.05.15 23:54, 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?
>
It comes from -std=c++98, I don't know why we need it.
I come that far on Sparc Solaris 10:
Comparing stages 2 and 3
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/fortran/symbol.o differs
gcc/builtins.o differs
gcc/real.o differs
gcc/ubsan.o differs
libdecnumber/decimal128.o differs
gmake[2]: *** [compare] Error 1
gmake[2]: Leaving directory `/export/data/tobleran/gcc-test/head/objdir'
gmake[1]: *** [stage3-bubble] Error 2
gmake[1]: Leaving directory `/export/data/tobleran/gcc-test/head/objdir'
gmake: *** [bootstrap] Error 2
I do not face any issues from -std=c++98 so far. But I can imagine that
there will be something in libjava? There we disable 'sun' with -Usun.
But this should not be a big issue.
Andreas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
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
1 sibling, 1 reply; 15+ messages in thread
From: Andreas Tobler @ 2015-05-31 21:33 UTC (permalink / raw)
To: jason, gcc-patches; +Cc: sellcey
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
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 #2: fbsd_atoll_2.diff --]
[-- Type: text/plain, Size: 1955 bytes --]
Index: config.in
===================================================================
--- config.in (revision 223885)
+++ config.in (working copy)
@@ -624,12 +624,6 @@
#endif
-/* Define to 1 if you have the `atoll' function. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_ATOLL
-#endif
-
-
/* Define to 1 if you have the `atoq' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_ATOQ
@@ -686,9 +680,16 @@
#endif
-/* Define to 1 if we found a declaration for 'basename', otherwise define to
- 0. */
+/* Define to 1 if we found a declaration for 'atoll', otherwise define to 0.
+ */
#ifndef USED_FOR_TARGET
+#undef HAVE_DECL_ATOLL
+#endif
+
+
+/* Define to 1 if you have the declaration of `basename(const char*)', and to
+ 0 if you don't. */
+#ifndef USED_FOR_TARGET
#undef HAVE_DECL_BASENAME
#endif
@@ -963,8 +964,8 @@
#endif
-/* Define to 1 if we found a declaration for 'strstr', otherwise define to 0.
- */
+/* Define to 1 if you have the declaration of `strstr(const char*,const
+ char*)', and to 0 if you don't. */
#ifndef USED_FOR_TARGET
#undef HAVE_DECL_STRSTR
#endif
Index: read-rtl.c
===================================================================
--- read-rtl.c (revision 223885)
+++ read-rtl.c (working copy)
@@ -704,7 +704,7 @@
\f
/* Provide a version of a function to read a long long if the system does
not provide one. */
-#if HOST_BITS_PER_WIDE_INT > HOST_BITS_PER_LONG && !defined(HAVE_ATOLL) && !defined(HAVE_ATOQ)
+#if HOST_BITS_PER_WIDE_INT > HOST_BITS_PER_LONG && !HAVE_DECL_ATOLL && !defined(HAVE_ATOQ)
HOST_WIDE_INT atoll (const char *);
HOST_WIDE_INT
@@ -1328,7 +1328,7 @@
#else
/* Prefer atoll over atoq, since the former is in the ISO C99 standard.
But prefer not to use our hand-rolled function above either. */
-#if defined(HAVE_ATOLL) || !defined(HAVE_ATOQ)
+#if HAVE_DECL_ATOLL || !defined(HAVE_ATOQ)
tmp_wide = atoll (name.string);
#else
tmp_wide = atoq (name.string);
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-31 21:33 ` Andreas Tobler
@ 2015-05-31 21:36 ` Jason Merrill
0 siblings, 0 replies; 15+ messages in thread
From: Jason Merrill @ 2015-05-31 21:36 UTC (permalink / raw)
To: Andreas Tobler, gcc-patches; +Cc: sellcey
OK, thanks.
Jason
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-31 20:38 ` Andreas Tobler
@ 2015-05-31 22:43 ` Eric Botcazou
0 siblings, 0 replies; 15+ messages in thread
From: Eric Botcazou @ 2015-05-31 22:43 UTC (permalink / raw)
To: Andreas Tobler; +Cc: gcc-patches
> I come that far on Sparc Solaris 10:
>
> Comparing stages 2 and 3
> warning: gcc/cc1plus-checksum.o differs
> warning: gcc/cc1-checksum.o differs
> Bootstrap comparison failure!
> gcc/fortran/symbol.o differs
> gcc/builtins.o differs
> gcc/real.o differs
> gcc/ubsan.o differs
> libdecnumber/decimal128.o differs
> gmake[2]: *** [compare] Error 1
> gmake[2]: Leaving directory `/export/data/tobleran/gcc-test/head/objdir'
> gmake[1]: *** [stage3-bubble] Error 2
> gmake[1]: Leaving directory `/export/data/tobleran/gcc-test/head/objdir'
> gmake: *** [bootstrap] Error 2
That's something else, namely PR bootstrap/66252.
> I do not face any issues from -std=c++98 so far. But I can imagine that
> there will be something in libjava?
I don't know, I cannot go past stage #1, I have at least 3 different issues.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-05-30 11:44 ` Andreas Tobler
2015-05-31 21:33 ` Andreas Tobler
@ 2015-06-01 14:45 ` Steve Ellcey
2015-06-01 15:08 ` Andreas Tobler
1 sibling, 1 reply; 15+ messages in thread
From: Steve Ellcey @ 2015-06-01 14:45 UTC (permalink / raw)
To: Andreas Tobler; +Cc: Eric Botcazou, gcc-patches
On Sat, 2015-05-30 at 11:27 +0200, Andreas Tobler wrote:
>
> I'm sorry. I totally forgot about autoheader...
>
> I'm testing this one now. Would you mind giving it a try?
>
> Thanks,
> Andreas
This patch worked for me. I am curious about why you use
'!HAVE_DECL_ATOLL' in read-rtl.c instead of '!defined(HAVE_DECL_ATOLL)'.
The use of !defined seems more common and is used in the HAVE_ATOQ check
in the same #if statement.
Steve Ellcey
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-06-01 14:45 ` Steve Ellcey
@ 2015-06-01 15:08 ` Andreas Tobler
2015-06-01 15:20 ` Steve Ellcey
0 siblings, 1 reply; 15+ messages in thread
From: Andreas Tobler @ 2015-06-01 15:08 UTC (permalink / raw)
To: sellcey; +Cc: Eric Botcazou, gcc-patches
On 01.06.15 16:43, Steve Ellcey wrote:
> On Sat, 2015-05-30 at 11:27 +0200, Andreas Tobler wrote:
>
>>
>> I'm sorry. I totally forgot about autoheader...
>>
>> I'm testing this one now. Would you mind giving it a try?
>>
>> Thanks,
>> Andreas
>
> This patch worked for me. I am curious about why you use
> '!HAVE_DECL_ATOLL' in read-rtl.c instead of '!defined(HAVE_DECL_ATOLL)'.
> The use of !defined seems more common and is used in the HAVE_ATOQ check
> in the same #if statement.
Because HAVE_DECL_ATOLL is either defined as 0 or 1. So it is always
defined. HAVE_ATOQ on the other side is only defined if it is available.
From config.in:
----
/* Define to 1 if we found a declaration for 'atoll', otherwise define to 0.
*/
#ifndef USED_FOR_TARGET
#undef HAVE_DECL_ATOLL
#endif
----
Andreas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [patch] fix bootstrap on FreeBSD i386/arm
2015-06-01 15:08 ` Andreas Tobler
@ 2015-06-01 15:20 ` Steve Ellcey
0 siblings, 0 replies; 15+ messages in thread
From: Steve Ellcey @ 2015-06-01 15:20 UTC (permalink / raw)
To: Andreas Tobler; +Cc: Eric Botcazou, gcc-patches
On Mon, 2015-06-01 at 17:07 +0200, Andreas Tobler wrote:
> > This patch worked for me. I am curious about why you use
> > '!HAVE_DECL_ATOLL' in read-rtl.c instead of '!defined(HAVE_DECL_ATOLL)'.
> > The use of !defined seems more common and is used in the HAVE_ATOQ check
> > in the same #if statement.
>
> Because HAVE_DECL_ATOLL is either defined as 0 or 1. So it is always
> defined. HAVE_ATOQ on the other side is only defined if it is available.
>
> From config.in:
> ----
> /* Define to 1 if we found a declaration for 'atoll', otherwise define to 0.
> */
> #ifndef USED_FOR_TARGET
> #undef HAVE_DECL_ATOLL
> #endif
> ----
>
> Andreas
Ah, I looked at the code but didn't read the comment. When I look at
auto-host.h I see that the header does what the comment says it does.
Thanks for the explanation.
Steve Ellcey
sellcey@imgtec.com
^ 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).