* Re: [PATCH] Fix PR54659, include gmp.h from system.h
@ 2012-12-21 16:26 Dominique Dhumieres
2012-12-21 19:03 ` Ian Lance Taylor
2012-12-22 1:56 ` Gerald Pfeifer
0 siblings, 2 replies; 18+ messages in thread
From: Dominique Dhumieres @ 2012-12-21 16:26 UTC (permalink / raw)
To: gcc-patches; +Cc: jakub, rguenther
I think revision 194665 breaks bootstrap on at least x86_64-apple-darwin10:
g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../_clean/gcc -I../../_clean/gcc/build -I../../_clean/gcc/../include -I./../intl -I../../_clean/gcc/../libcpp/include -I/opt/mp/include -I../../_clean/gcc/../libdecnumber -I../../_clean/gcc/../libdecnumber/dpd -I../libdecnumber -I../../_clean/gcc/../libbacktrace -DCLOOG_INT_GMP -I/opt/mp/include \
-o build/genconstants.o ../../_clean/gcc/genconstants.c
In file included from ./bconfig.h:3:0,
from ../../_clean/gcc/genconstants.c:28:
./auto-host.h:1994:16: error: declaration does not declare anything [-fpermissive]
#define rlim_t long
^
In file included from ../../_clean/gcc/genconstants.c:29:0:
../../_clean/gcc/system.h:502:34: error: declaration of C function 'const char* strsignal(int)' conflicts with
extern const char *strsignal (int);
^
In file included from /opt/gcc/gcc4.8a/include/c++/4.8.0/cstring:44:0,
from ../../_clean/gcc/system.h:207,
from ../../_clean/gcc/genconstants.c:29:
/usr/include/string.h:136:7: error: previous declaration 'char* strsignal(int)' here
char *strsignal(int sig);
^
TIA
Dominique
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-21 16:26 [PATCH] Fix PR54659, include gmp.h from system.h Dominique Dhumieres
@ 2012-12-21 19:03 ` Ian Lance Taylor
2012-12-21 20:06 ` Dominique Dhumieres
2012-12-21 21:20 ` Dominique Dhumieres
2012-12-22 1:56 ` Gerald Pfeifer
1 sibling, 2 replies; 18+ messages in thread
From: Ian Lance Taylor @ 2012-12-21 19:03 UTC (permalink / raw)
To: Dominique Dhumieres; +Cc: gcc-patches, jakub, rguenther
On Fri, Dec 21, 2012 at 8:26 AM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
> I think revision 194665 breaks bootstrap on at least x86_64-apple-darwin10:
>
> g++ -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../_clean/gcc -I../../_clean/gcc/build -I../../_clean/gcc/../include -I./../intl -I../../_clean/gcc/../libcpp/include -I/opt/mp/include -I../../_clean/gcc/../libdecnumber -I../../_clean/gcc/../libdecnumber/dpd -I../libdecnumber -I../../_clean/gcc/../libbacktrace -DCLOOG_INT_GMP -I/opt/mp/include \
> -o build/genconstants.o ../../_clean/gcc/genconstants.c
> In file included from ./bconfig.h:3:0,
> from ../../_clean/gcc/genconstants.c:28:
> ./auto-host.h:1994:16: error: declaration does not declare anything [-fpermissive]
> #define rlim_t long
That doesn't make much sense. What do the lines around this look like?
> In file included from ../../_clean/gcc/genconstants.c:29:0:
> ../../_clean/gcc/system.h:502:34: error: declaration of C function 'const char* strsignal(int)' conflicts with
> extern const char *strsignal (int);
> ^
> In file included from /opt/gcc/gcc4.8a/include/c++/4.8.0/cstring:44:0,
> from ../../_clean/gcc/system.h:207,
> from ../../_clean/gcc/genconstants.c:29:
> /usr/include/string.h:136:7: error: previous declaration 'char* strsignal(int)' here
> char *strsignal(int sig);
> ^
In auto-host.h, what are the values of HAVE_STRSIGNAL and HAVE_DECL_STRSIGNAL?
Ian
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-21 19:03 ` Ian Lance Taylor
@ 2012-12-21 20:06 ` Dominique Dhumieres
2012-12-21 21:20 ` Dominique Dhumieres
1 sibling, 0 replies; 18+ messages in thread
From: Dominique Dhumieres @ 2012-12-21 20:06 UTC (permalink / raw)
To: iant, dominiq; +Cc: rguenther, jakub, gcc-patches
> That doesn't make much sense. What do the lines around this look like?
I am currently bootstrapping r194675 with revision 194665 reverted.
The diff between gcc/auto-host.h with(-)/without(+) r194665 reverted
and --enable-checking=release for (+) looks like:
--- ../build_w/gcc/auto-host.h 2012-12-21 20:16:59.000000000 +0100
+++ gcc/auto-host.h 2012-12-21 20:54:49.000000000 +0100
@@ -49,7 +49,7 @@
/* Define if you want more run-time sanity checks. This one gets a grab bag of
miscellaneous but relatively cheap checks. */
#ifndef USED_FOR_TARGET
-#define ENABLE_CHECKING 1
+/* #undef ENABLE_CHECKING */
#endif
@@ -96,7 +96,7 @@
/* Define if you want the garbage collector to do object poisoning and other
memory allocation checks. This is quite expensive. */
#ifndef USED_FOR_TARGET
-#define ENABLE_GC_CHECKING 1
+/* #undef ENABLE_GC_CHECKING */
#endif
...
/* Define to 1 if we found a declaration for 'strsignal', otherwise define to
0. */
#ifndef USED_FOR_TARGET
-#define HAVE_DECL_STRSIGNAL 1
+#define HAVE_DECL_STRSIGNAL 0
#endif
...
@@ -1991,7 +1991,7 @@
/* Define to `long' if <sys/resource.h> doesn't define. */
#ifndef USED_FOR_TARGET
-/* #undef rlim_t */
+#define rlim_t long
#endif
I see
#define HAVE_STRSIGNAL 1
in both files.
Dominique
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-21 19:03 ` Ian Lance Taylor
2012-12-21 20:06 ` Dominique Dhumieres
@ 2012-12-21 21:20 ` Dominique Dhumieres
1 sibling, 0 replies; 18+ messages in thread
From: Dominique Dhumieres @ 2012-12-21 21:20 UTC (permalink / raw)
To: iant, dominiq; +Cc: rguenther, jakub, gcc-patches
I think I understand at least part of the problem:
(1) I configure gcc with
../work/configure --prefix=/opt/gcc/gcc4.8w --enable-languages=c,c++,fortran,objc,obj-c++,java,ada,lto --with-gmp=/opt/mp --with-system-zlib --with-isl=/opt/mp --enable-lto --enable-plugin --enable-build-with-cxx
i.e., the files for gmp, mpfr, mpc, isl, ... are found in /opt/mp
(2) before r194665 the files including gcc/system.h did not need gmp.h
and the tests using it in configure were happy with
gcc -c -g -I../../work/gcc -I../../work/gcc/../include conftest.c >&5
(3) starting with r194665 all these tests fails as
configure:10333: checking whether getenv is declared
configure:10356: gcc -c -g -I../../p_work/gcc -I../../p_work/gcc/../include conftest.c >&5
In file included from conftest.c:108:0:
../../p_work/gcc/system.h:641:17: fatal error: gmp.h: No such file or directory
#include <gmp.h>
^
compilation terminated.
configure:10356: $? = 1
I think the fix requires to use gmpinc='-I/opt/mp/include '
Dominique
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-21 16:26 [PATCH] Fix PR54659, include gmp.h from system.h Dominique Dhumieres
2012-12-21 19:03 ` Ian Lance Taylor
@ 2012-12-22 1:56 ` Gerald Pfeifer
2012-12-22 8:55 ` Richard Biener
1 sibling, 1 reply; 18+ messages in thread
From: Gerald Pfeifer @ 2012-12-22 1:56 UTC (permalink / raw)
To: Dominique Dhumieres; +Cc: gcc-patches, Jakub Jelinek, rguenther
On Fri, 21 Dec 2012, Dominique Dhumieres wrote:
> I think revision 194665 breaks bootstrap on at least x86_64-apple-darwin10:
Same on everything FreeBSD.
PR 55784 - [4.8 regression] declaration of C function 'const char*
strsignal(int)' conflicts with /usr/include/string.h:112: error: previous
declaration
Gerald
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-22 1:56 ` Gerald Pfeifer
@ 2012-12-22 8:55 ` Richard Biener
2012-12-22 9:50 ` Andreas Schwab
0 siblings, 1 reply; 18+ messages in thread
From: Richard Biener @ 2012-12-22 8:55 UTC (permalink / raw)
To: Gerald Pfeifer, Dominique Dhumieres; +Cc: gcc-patches, Jakub Jelinek
Gerald Pfeifer <gerald@pfeifer.com> wrote:
>On Fri, 21 Dec 2012, Dominique Dhumieres wrote:
>> I think revision 194665 breaks bootstrap on at least
>x86_64-apple-darwin10:
>
>Same on everything FreeBSD.
>
>PR 55784 - [4.8 regression] declaration of C function 'const char*
>strsignal(int)' conflicts with /usr/include/string.h:112: error:
>previous
>declaration
If you cannot sort this out yourself (I suppose somehow gmp.h is pulled in configure tests?) consider reverting the patch until I am back after Christmas.
Thanks,
Richard.
>Gerald
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-22 8:55 ` Richard Biener
@ 2012-12-22 9:50 ` Andreas Schwab
2012-12-22 10:43 ` Richard Biener
0 siblings, 1 reply; 18+ messages in thread
From: Andreas Schwab @ 2012-12-22 9:50 UTC (permalink / raw)
To: Richard Biener
Cc: Gerald Pfeifer, Dominique Dhumieres, gcc-patches, Jakub Jelinek
Richard Biener <rguenther@suse.de> writes:
> (I suppose somehow gmp.h is pulled in configure tests?)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
]], [[rlim_t l = 0;]])],[],[AC_DEFINE([rlim_t],[long],
[Define to `long' if <sys/resource.h> doesn't define.])])
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-22 9:50 ` Andreas Schwab
@ 2012-12-22 10:43 ` Richard Biener
2012-12-22 10:52 ` Dominique Dhumieres
2012-12-22 11:03 ` Andreas Schwab
0 siblings, 2 replies; 18+ messages in thread
From: Richard Biener @ 2012-12-22 10:43 UTC (permalink / raw)
To: Andreas Schwab
Cc: Richard Biener, Gerald Pfeifer, Dominique Dhumieres, gcc-patches,
Jakub Jelinek
On Sat, Dec 22, 2012 at 10:49 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Richard Biener <rguenther@suse.de> writes:
>
>> (I suppose somehow gmp.h is pulled in configure tests?)
>
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
> #include "ansidecl.h"
> #include "system.h"
> #ifdef HAVE_SYS_RESOURCE_H
> #include <sys/resource.h>
> #endif
> ]], [[rlim_t l = 0;]])],[],[AC_DEFINE([rlim_t],[long],
> [Define to `long' if <sys/resource.h> doesn't define.])])
Huh - looks at least bogus to not include config.h here, no? Oh...
that isn't there.
Thus, it looks bogus to include system.h here. Why's that done anyway?
Richard.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-22 10:43 ` Richard Biener
@ 2012-12-22 10:52 ` Dominique Dhumieres
2012-12-22 11:14 ` Richard Sandiford
2012-12-22 11:03 ` Andreas Schwab
1 sibling, 1 reply; 18+ messages in thread
From: Dominique Dhumieres @ 2012-12-22 10:52 UTC (permalink / raw)
To: schwab, richard.guenther; +Cc: rguenther, jakub, gerald, gcc-patches, dominiq
The following patch allowed me to proceed for c,c++,lto,fortran,ada,objc,obj-c++
up to libada which has the same problem:
--- ../_clean/gcc/configure 2012-12-20 17:19:54.000000000 +0100
+++ ../p_work/gcc/configure 2012-12-21 23:44:46.000000000 +0100
@@ -10321,9 +10321,9 @@ $as_echo "#define HAVE_LANGINFO_CODESET
# We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
+CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
saved_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include"
+CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
strsignal strstr stpcpy strverscmp \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
Dominique
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-22 10:52 ` Dominique Dhumieres
@ 2012-12-22 11:14 ` Richard Sandiford
0 siblings, 0 replies; 18+ messages in thread
From: Richard Sandiford @ 2012-12-22 11:14 UTC (permalink / raw)
To: Dominique Dhumieres
Cc: schwab, richard.guenther, rguenther, jakub, gerald, gcc-patches
dominiq@lps.ens.fr (Dominique Dhumieres) writes:
> The following patch allowed me to proceed for c,c++,lto,fortran,ada,objc,obj-c++
> up to libada which has the same problem:
>
> --- ../_clean/gcc/configure 2012-12-20 17:19:54.000000000 +0100
> +++ ../p_work/gcc/configure 2012-12-21 23:44:46.000000000 +0100
> @@ -10321,9 +10321,9 @@ $as_echo "#define HAVE_LANGINFO_CODESET
>
> # We will need to find libiberty.h and ansidecl.h
> saved_CFLAGS="$CFLAGS"
> -CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
> +CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
> saved_CXXFLAGS="$CXXFLAGS"
> -CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include"
> +CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC"
> for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \
> strsignal strstr stpcpy strverscmp \
> errno snprintf vsnprintf vasprintf malloc realloc calloc \
Yeah, just came up with the same fix here (plain x86_64-linux-gnu,
but I don't have a gmp dev package installed and rely on --with-gmp).
Worked for me too.
Richard
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-22 10:43 ` Richard Biener
2012-12-22 10:52 ` Dominique Dhumieres
@ 2012-12-22 11:03 ` Andreas Schwab
2012-12-27 16:11 ` Richard Biener
1 sibling, 1 reply; 18+ messages in thread
From: Andreas Schwab @ 2012-12-22 11:03 UTC (permalink / raw)
To: Richard Biener
Cc: Richard Biener, Gerald Pfeifer, Dominique Dhumieres, gcc-patches,
Jakub Jelinek
Richard Biener <richard.guenther@gmail.com> writes:
> On Sat, Dec 22, 2012 at 10:49 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Richard Biener <rguenther@suse.de> writes:
>>
>>> (I suppose somehow gmp.h is pulled in configure tests?)
>>
>> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
>> #include "ansidecl.h"
>> #include "system.h"
>> #ifdef HAVE_SYS_RESOURCE_H
>> #include <sys/resource.h>
>> #endif
>> ]], [[rlim_t l = 0;]])],[],[AC_DEFINE([rlim_t],[long],
>> [Define to `long' if <sys/resource.h> doesn't define.])])
>
> Huh - looks at least bogus to not include config.h here, no?
config.h uses auto-host.h which doesn't exist yet, it's created by
configure. All already known config defs are set in conftest.c (see
config.log).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-22 11:03 ` Andreas Schwab
@ 2012-12-27 16:11 ` Richard Biener
0 siblings, 0 replies; 18+ messages in thread
From: Richard Biener @ 2012-12-27 16:11 UTC (permalink / raw)
To: Andreas Schwab
Cc: Richard Biener, Gerald Pfeifer, Dominique Dhumieres, gcc-patches,
Jakub Jelinek
On Sat, Dec 22, 2012 at 12:03 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Richard Biener <richard.guenther@gmail.com> writes:
>
>> On Sat, Dec 22, 2012 at 10:49 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> Richard Biener <rguenther@suse.de> writes:
>>>
>>>> (I suppose somehow gmp.h is pulled in configure tests?)
>>>
>>> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
>>> #include "ansidecl.h"
>>> #include "system.h"
>>> #ifdef HAVE_SYS_RESOURCE_H
>>> #include <sys/resource.h>
>>> #endif
>>> ]], [[rlim_t l = 0;]])],[],[AC_DEFINE([rlim_t],[long],
>>> [Define to `long' if <sys/resource.h> doesn't define.])])
>>
>> Huh - looks at least bogus to not include config.h here, no?
>
> config.h uses auto-host.h which doesn't exist yet, it's created by
> configure. All already known config defs are set in conftest.c (see
> config.log).
I still question the inclusion of system.h here - why is that needed, or
why isn't this either a copy of the relevant piece of system.h, or - _just_
including system.h and nothing else ... in fact system.h already includes
sys/resource.h the way above.
Richard.
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH] Fix PR54659, include gmp.h from system.h
@ 2012-12-21 13:15 Richard Biener
2012-12-21 13:17 ` Jakub Jelinek
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Richard Biener @ 2012-12-21 13:15 UTC (permalink / raw)
To: gcc-patches; +Cc: Diego Novillo, iant
After the Ada fix including gmp.h from system.h is trivial
(by means of double-int.h it was included from almost everywhere
already)
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
Ok for trunk? (Go frontend "unfixed")
Thanks,
Richard.
2012-12-21 Richard Biener <rguenther@suse.de>
PR bootstrap/54659
* system.h: Include gmp.h.
* tree-ssa-loop-niter.c: Do not include gmp.h here.
* double-int.h: Likewise.
* realmpfr.h: Likewise.
fortran/
* gfortran.h: Do not include gmp.h here.
Index: gcc/tree-ssa-loop-niter.c
===================================================================
*** gcc/tree-ssa-loop-niter.c (revision 194659)
--- gcc/tree-ssa-loop-niter.c (working copy)
*************** along with GCC; see the file COPYING3.
*** 38,44 ****
#include "flags.h"
#include "diagnostic-core.h"
#include "tree-inline.h"
- #include "gmp.h"
#define SWAP(X, Y) do { affine_iv *tmp = (X); (X) = (Y); (Y) = tmp; } while (0)
--- 38,43 ----
Index: gcc/double-int.h
===================================================================
*** gcc/double-int.h (revision 194659)
--- gcc/double-int.h (working copy)
*************** along with GCC; see the file COPYING3.
*** 20,29 ****
#ifndef DOUBLE_INT_H
#define DOUBLE_INT_H
- #ifndef GENERATOR_FILE
- #include <gmp.h>
- #endif
-
/* A large integer is currently represented as a pair of HOST_WIDE_INTs.
It therefore represents a number with precision of
2 * HOST_BITS_PER_WIDE_INT bits (it is however possible that the
--- 20,25 ----
Index: gcc/fortran/gfortran.h
===================================================================
*** gcc/fortran/gfortran.h (revision 194659)
--- gcc/fortran/gfortran.h (working copy)
*************** gfc_intrinsic_sym;
*** 1699,1705 ****
EXPR_COMPCALL Function (or subroutine) call of a procedure pointer
component or type-bound procedure. */
- #include <gmp.h>
#include <mpfr.h>
#include <mpc.h>
#define GFC_RND_MODE GMP_RNDN
--- 1699,1704 ----
Index: gcc/realmpfr.h
===================================================================
*** gcc/realmpfr.h (revision 194659)
--- gcc/realmpfr.h (working copy)
***************
*** 22,28 ****
#ifndef GCC_REALGMP_H
#define GCC_REALGMP_H
- #include <gmp.h>
#include <mpfr.h>
#include <mpc.h>
#include "real.h"
--- 22,27 ----
Index: gcc/system.h
===================================================================
*** gcc/system.h (revision 194660)
--- gcc/system.h (working copy)
*************** extern int vsnprintf(char *, size_t, con
*** 638,643 ****
--- 638,645 ----
#include <dlfcn.h>
#endif
+ #include <gmp.h>
+
/* Get libiberty declarations. */
#include "libiberty.h"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-21 13:15 Richard Biener
@ 2012-12-21 13:17 ` Jakub Jelinek
2012-12-21 16:00 ` Ian Lance Taylor
2013-01-08 18:50 ` H.J. Lu
2 siblings, 0 replies; 18+ messages in thread
From: Jakub Jelinek @ 2012-12-21 13:17 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches, Diego Novillo, iant
On Fri, Dec 21, 2012 at 02:14:37PM +0100, Richard Biener wrote:
> After the Ada fix including gmp.h from system.h is trivial
> (by means of double-int.h it was included from almost everywhere
> already)
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
>
> Ok for trunk? (Go frontend "unfixed")
Yes, thanks.
Jakub
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-21 13:15 Richard Biener
2012-12-21 13:17 ` Jakub Jelinek
@ 2012-12-21 16:00 ` Ian Lance Taylor
2013-01-08 18:50 ` H.J. Lu
2 siblings, 0 replies; 18+ messages in thread
From: Ian Lance Taylor @ 2012-12-21 16:00 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches, Diego Novillo
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
On Fri, Dec 21, 2012 at 5:14 AM, Richard Biener <rguenther@suse.de> wrote:
>
> After the Ada fix including gmp.h from system.h is trivial
> (by means of double-int.h it was included from almost everywhere
> already)
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
>
> Ok for trunk? (Go frontend "unfixed")
Fixed like so. Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu. Committed to mainline.
Ian
2012-12-21 Ian Lance Taylor <iant@google.com>
PR bootstrap/54659
* go-system.h: Don't include <cstdio>.
[-- Attachment #2: foo.patch --]
[-- Type: application/octet-stream, Size: 3081 bytes --]
Index: gcc/go/gofrontend/runtime.cc
===================================================================
--- gcc/go/gofrontend/runtime.cc (revision 194666)
+++ gcc/go/gofrontend/runtime.cc (working copy)
@@ -6,8 +6,6 @@
#include "go-system.h"
-#include <gmp.h>
-
#include "gogo.h"
#include "types.h"
#include "expressions.h"
Index: gcc/go/gofrontend/expressions.h
===================================================================
--- gcc/go/gofrontend/expressions.h (revision 194666)
+++ gcc/go/gofrontend/expressions.h (working copy)
@@ -7,7 +7,6 @@
#ifndef GO_EXPRESSIONS_H
#define GO_EXPRESSIONS_H
-#include <gmp.h>
#include <mpfr.h>
#include "operator.h"
Index: gcc/go/gofrontend/statements.cc
===================================================================
--- gcc/go/gofrontend/statements.cc (revision 194666)
+++ gcc/go/gofrontend/statements.cc (working copy)
@@ -6,8 +6,6 @@
#include "go-system.h"
-#include <gmp.h>
-
#include "go-c.h"
#include "types.h"
#include "expressions.h"
Index: gcc/go/gofrontend/gogo-tree.cc
===================================================================
--- gcc/go/gofrontend/gogo-tree.cc (revision 194666)
+++ gcc/go/gofrontend/gogo-tree.cc (working copy)
@@ -6,8 +6,6 @@
#include "go-system.h"
-#include <gmp.h>
-
#include "toplev.h"
#include "tree.h"
#include "gimple.h"
Index: gcc/go/gofrontend/types.cc
===================================================================
--- gcc/go/gofrontend/types.cc (revision 194666)
+++ gcc/go/gofrontend/types.cc (working copy)
@@ -6,8 +6,6 @@
#include "go-system.h"
-#include <gmp.h>
-
#include "toplev.h"
#include "intl.h"
#include "tree.h"
Index: gcc/go/gofrontend/expressions.cc
===================================================================
--- gcc/go/gofrontend/expressions.cc (revision 194666)
+++ gcc/go/gofrontend/expressions.cc (working copy)
@@ -8,8 +8,6 @@
#include <algorithm>
-#include <gmp.h>
-
#include "toplev.h"
#include "intl.h"
#include "tree.h"
Index: gcc/go/gofrontend/lex.h
===================================================================
--- gcc/go/gofrontend/lex.h (revision 194666)
+++ gcc/go/gofrontend/lex.h (working copy)
@@ -7,7 +7,6 @@
#ifndef GO_LEX_H
#define GO_LEX_H
-#include <gmp.h>
#include <mpfr.h>
#include "operator.h"
Index: gcc/go/go-system.h
===================================================================
--- gcc/go/go-system.h (revision 194666)
+++ gcc/go/go-system.h (working copy)
@@ -125,15 +125,6 @@ struct hash<T*>
// system.h.
#include <iostream>
-// Some versions of gmp.h assume that #include <iostream> will define
-// std::FILE. This is not true with libstdc++ 4.3 and later. This is
-// fixed in GMP 4.3, but at this point we don't know which version of
-// GMP is in use. Since the top level configure script accepts GMP
-// 4.2, at least for now we #include <cstdio> to ensure that GMP 4.2
-// will work. FIXME: This can be removed when we require GMP 4.3 or
-// later.
-#include <cstdio>
-
#include "system.h"
#include "ansidecl.h"
#include "coretypes.h"
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2012-12-21 13:15 Richard Biener
2012-12-21 13:17 ` Jakub Jelinek
2012-12-21 16:00 ` Ian Lance Taylor
@ 2013-01-08 18:50 ` H.J. Lu
2013-01-09 2:31 ` Iyer, Balaji V
2013-01-09 8:36 ` Richard Biener
2 siblings, 2 replies; 18+ messages in thread
From: H.J. Lu @ 2013-01-08 18:50 UTC (permalink / raw)
To: Richard Biener, Iyer, Balaji V; +Cc: gcc-patches, Diego Novillo, iant
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
On Fri, Dec 21, 2012 at 5:14 AM, Richard Biener <rguenther@suse.de> wrote:
>
> After the Ada fix including gmp.h from system.h is trivial
> (by means of double-int.h it was included from almost everywhere
> already)
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
>
> Ok for trunk? (Go frontend "unfixed")
>
> Thanks,
> Richard.
>
> 2012-12-21 Richard Biener <rguenther@suse.de>
>
> PR bootstrap/54659
> * system.h: Include gmp.h.
> * tree-ssa-loop-niter.c: Do not include gmp.h here.
> * double-int.h: Likewise.
> * realmpfr.h: Likewise.
>
> fortran/
> * gfortran.h: Do not include gmp.h here.
>
This breaks bootstrap with in-tree gmp since system.h is included for
host feature test by gcc/configure. Before gmp is built, gmp.h isn't
available. We need to build gmp first before configuring gcc.
Balaji, can you try this patch?
--
H.J.
--
2013-01-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.def (configure-gcc): Depend on all-gmp.
(all-gcc): Remove dependency on all-gmp.
* Makefile.in: Regenerated.
[-- Attachment #2: gcc-gmp.patch --]
[-- Type: application/octet-stream, Size: 2472 bytes --]
2013-01-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.def (configure-gcc): Depend on all-gmp.
(all-gcc): Remove dependency on all-gmp.
* Makefile.in: Regenerated.
diff --git a/Makefile.def b/Makefile.def
index 899ea2d..04088c3 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -291,6 +291,7 @@ dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
// Host modules specific to gcc.
dependencies = { module=configure-gcc; on=configure-intl; };
+dependencies = { module=configure-gcc; on=all-gmp; };
dependencies = { module=configure-gcc; on=all-lto-plugin; };
dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };
@@ -298,7 +299,6 @@ dependencies = { module=configure-gcc; on=all-ld; };
dependencies = { module=configure-gcc; on=all-gold; };
dependencies = { module=configure-gcc; on=all-libelf; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
-dependencies = { module=all-gcc; on=all-gmp; };
dependencies = { module=all-gcc; on=all-intl; };
dependencies = { module=all-gcc; on=all-mpfr; };
dependencies = { module=all-gcc; on=all-mpc; };
diff --git a/Makefile.in b/Makefile.in
index ba5e041..06adbee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45485,6 +45485,14 @@ configure-stage3-gcc: maybe-configure-stage3-intl
configure-stage4-gcc: maybe-configure-stage4-intl
configure-stageprofile-gcc: maybe-configure-stageprofile-intl
configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
+configure-gcc: maybe-all-gmp
+
+configure-stage1-gcc: maybe-all-stage1-gmp
+configure-stage2-gcc: maybe-all-stage2-gmp
+configure-stage3-gcc: maybe-all-stage3-gmp
+configure-stage4-gcc: maybe-all-stage4-gmp
+configure-stageprofile-gcc: maybe-all-stageprofile-gmp
+configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
configure-gcc: maybe-all-lto-plugin
configure-stage1-gcc: maybe-all-stage1-lto-plugin
@@ -45541,14 +45549,6 @@ all-stage3-gcc: all-stage3-libiberty
all-stage4-gcc: all-stage4-libiberty
all-stageprofile-gcc: all-stageprofile-libiberty
all-stagefeedback-gcc: all-stagefeedback-libiberty
-all-gcc: maybe-all-gmp
-
-all-stage1-gcc: maybe-all-stage1-gmp
-all-stage2-gcc: maybe-all-stage2-gmp
-all-stage3-gcc: maybe-all-stage3-gmp
-all-stage4-gcc: maybe-all-stage4-gmp
-all-stageprofile-gcc: maybe-all-stageprofile-gmp
-all-stagefeedback-gcc: maybe-all-stagefeedback-gmp
all-gcc: maybe-all-intl
all-stage1-gcc: maybe-all-stage1-intl
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH] Fix PR54659, include gmp.h from system.h
2013-01-08 18:50 ` H.J. Lu
@ 2013-01-09 2:31 ` Iyer, Balaji V
2013-01-09 8:36 ` Richard Biener
1 sibling, 0 replies; 18+ messages in thread
From: Iyer, Balaji V @ 2013-01-09 2:31 UTC (permalink / raw)
To: H.J. Lu, Richard Biener; +Cc: gcc-patches, Diego Novillo, iant
> -----Original Message-----
> From: H.J. Lu [mailto:hjl.tools@gmail.com]
> Sent: Tuesday, January 08, 2013 1:50 PM
> To: Richard Biener; Iyer, Balaji V
> Cc: gcc-patches@gcc.gnu.org; Diego Novillo; iant@google.com
> Subject: Re: [PATCH] Fix PR54659, include gmp.h from system.h
>
> On Fri, Dec 21, 2012 at 5:14 AM, Richard Biener <rguenther@suse.de> wrote:
> >
> > After the Ada fix including gmp.h from system.h is trivial (by means
> > of double-int.h it was included from almost everywhere
> > already)
> >
> > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> >
> > Ok for trunk? (Go frontend "unfixed")
> >
> > Thanks,
> > Richard.
> >
> > 2012-12-21 Richard Biener <rguenther@suse.de>
> >
> > PR bootstrap/54659
> > * system.h: Include gmp.h.
> > * tree-ssa-loop-niter.c: Do not include gmp.h here.
> > * double-int.h: Likewise.
> > * realmpfr.h: Likewise.
> >
> > fortran/
> > * gfortran.h: Do not include gmp.h here.
> >
>
> This breaks bootstrap with in-tree gmp since system.h is included for host
> feature test by gcc/configure. Before gmp is built, gmp.h isn't available. We
> need to build gmp first before configuring gcc.
>
> Balaji, can you try this patch?
Yes, this seem to do the trick in my initial runs! Is this already committed to the trunk? If so, I will just merge my branch (cilkplus) with the trunk. Otherwise I have to manually apply it.
Thanks,
Balaji V. Iyer.
>
>
> --
> H.J.
> --
> 2013-01-08 H.J. Lu <hongjiu.lu@intel.com>
>
> * Makefile.def (configure-gcc): Depend on all-gmp.
> (all-gcc): Remove dependency on all-gmp.
> * Makefile.in: Regenerated.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix PR54659, include gmp.h from system.h
2013-01-08 18:50 ` H.J. Lu
2013-01-09 2:31 ` Iyer, Balaji V
@ 2013-01-09 8:36 ` Richard Biener
1 sibling, 0 replies; 18+ messages in thread
From: Richard Biener @ 2013-01-09 8:36 UTC (permalink / raw)
To: H.J. Lu; +Cc: Iyer, Balaji V, gcc-patches, Diego Novillo, iant
On Tue, 8 Jan 2013, H.J. Lu wrote:
> On Fri, Dec 21, 2012 at 5:14 AM, Richard Biener <rguenther@suse.de> wrote:
> >
> > After the Ada fix including gmp.h from system.h is trivial
> > (by means of double-int.h it was included from almost everywhere
> > already)
> >
> > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> >
> > Ok for trunk? (Go frontend "unfixed")
> >
> > Thanks,
> > Richard.
> >
> > 2012-12-21 Richard Biener <rguenther@suse.de>
> >
> > PR bootstrap/54659
> > * system.h: Include gmp.h.
> > * tree-ssa-loop-niter.c: Do not include gmp.h here.
> > * double-int.h: Likewise.
> > * realmpfr.h: Likewise.
> >
> > fortran/
> > * gfortran.h: Do not include gmp.h here.
> >
>
> This breaks bootstrap with in-tree gmp since system.h is included for
> host feature test by gcc/configure. Before gmp is built, gmp.h isn't
> available. We need to build gmp first before configuring gcc.
Ok.
Thanks,
Richard.
> Balaji, can you try this patch?
>
>
>
--
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-01-09 8:36 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-21 16:26 [PATCH] Fix PR54659, include gmp.h from system.h Dominique Dhumieres
2012-12-21 19:03 ` Ian Lance Taylor
2012-12-21 20:06 ` Dominique Dhumieres
2012-12-21 21:20 ` Dominique Dhumieres
2012-12-22 1:56 ` Gerald Pfeifer
2012-12-22 8:55 ` Richard Biener
2012-12-22 9:50 ` Andreas Schwab
2012-12-22 10:43 ` Richard Biener
2012-12-22 10:52 ` Dominique Dhumieres
2012-12-22 11:14 ` Richard Sandiford
2012-12-22 11:03 ` Andreas Schwab
2012-12-27 16:11 ` Richard Biener
-- strict thread matches above, loose matches on Subject: below --
2012-12-21 13:15 Richard Biener
2012-12-21 13:17 ` Jakub Jelinek
2012-12-21 16:00 ` Ian Lance Taylor
2013-01-08 18:50 ` H.J. Lu
2013-01-09 2:31 ` Iyer, Balaji V
2013-01-09 8:36 ` Richard Biener
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).