This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New bootstrap failures with remaining clk_* uses
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Jul 2003 06:47:56 +0100
- Subject: Re: New bootstrap failures with remaining clk_* uses
- References: <200307010406.AAA09965@caip.rutgers.edu>
Kaveh R. Ghazi wrote:-
> Your recent patch broke bootstrap on at least solaris2 and probably
> several other platforms because you didn't catch uses of clk_* in the
> config directory. E.g. I needed this on solaris2:
>
> diff -rup orig/egcc-CVS20030630/gcc/config/sol2.h egcc-CVS20030630/gcc/config/sol2.h
> --- orig/egcc-CVS20030630/gcc/config/sol2.h 2003-06-16 09:44:20.000000000 -0400
> +++ egcc-CVS20030630/gcc/config/sol2.h 2003-06-30 23:54:10.060239000 -0400
> @@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */
> /* For C++ we need to add some additional macro \
> definitions required by the C++ standard \
> library. */ \
> - if (c_language == clk_cplusplus) \
> + if (c_dialect_cxx()) \
> { \
> builtin_define ("_XOPEN_SOURCE=500"); \
> builtin_define ("_LARGEFILE_SOURCE=1"); \
>
> I see about 15-20 others remain. Would you please fix them all?
I've applied this patch, which can't make it any worse.
Neil.
* config/sol2.h, config/alpha/alpha.h, config/alpha/linux.h,
config/i386/i386-interix.h, config/ia64/hpux.h, config/mips/iris6.h,
config/mips/linux.h, config/mips/mips.h, config/pa/pa-hpux.h,
config/pa/pa-hpux10.h, config/pa/pa-hpux11.h, config/pa/pa-pro-end.h,
config/pa/pa.h, config/pa/rtems.h: Use c_dialect_ macros.
Index: sol2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sol2.h,v
retrieving revision 1.4
diff -u -p -r1.4 sol2.h
--- sol2.h 16 Jun 2003 11:34:38 -0000 1.4
+++ sol2.h 1 Jul 2003 05:41:53 -0000
@@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */
/* For C++ we need to add some additional macro \
definitions required by the C++ standard \
library. */ \
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
{ \
builtin_define ("_XOPEN_SOURCE=500"); \
builtin_define ("_LARGEFILE_SOURCE=1"); \
Index: alpha/alpha.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
retrieving revision 1.203
diff -u -p -r1.203 alpha.h
--- alpha/alpha.h 30 Jun 2003 17:30:32 -0000 1.203
+++ alpha/alpha.h 1 Jul 2003 05:41:54 -0000
@@ -78,14 +78,14 @@ Boston, MA 02111-1307, USA. */
{ \
if (preprocessing_asm_p ()) \
builtin_define_std ("LANGUAGE_ASSEMBLY"); \
- else if (c_language == clk_c) \
- builtin_define_std ("LANGUAGE_C"); \
- else if (c_language == clk_cplusplus) \
+ else if (c_dialect_cxx ()) \
{ \
builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \
builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \
} \
- if (flag_objc) \
+ else \
+ builtin_define_std ("LANGUAGE_C"); \
+ if (c_dialect_objc ()) \
{ \
builtin_define ("__LANGUAGE_OBJECTIVE_C"); \
builtin_define ("__LANGUAGE_OBJECTIVE_C__"); \
Index: alpha/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/linux.h,v
retrieving revision 1.34
diff -u -p -r1.34 linux.h
--- alpha/linux.h 15 May 2003 22:58:33 -0000 1.34
+++ alpha/linux.h 1 Jul 2003 05:41:54 -0000
@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
builtin_define_std ("unix"); \
builtin_assert ("system=linux"); \
/* The GNU C++ standard library requires this. */ \
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
builtin_define ("_GNU_SOURCE"); \
} while (0)
Index: i386/i386-interix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-interix.h,v
retrieving revision 1.42
diff -u -p -r1.42 i386-interix.h
--- i386/i386-interix.h 28 Jun 2003 19:43:01 -0000 1.42
+++ i386/i386-interix.h 1 Jul 2003 05:41:54 -0000
@@ -71,9 +71,9 @@ Boston, MA 02111-1307, USA. */
else \
{ \
builtin_define_std ("LANGUAGE_C"); \
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
builtin_define_std ("LANGUAGE_C_PLUS_PLUS"); \
- if (flag_objc) \
+ if (c_dialect_objc ()) \
builtin_define_std ("LANGUAGE_OBJECTIVE_C"); \
} \
} \
Index: ia64/hpux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/hpux.h,v
retrieving revision 1.27
diff -u -p -r1.27 hpux.h
--- ia64/hpux.h 7 Jun 2003 17:11:45 -0000 1.27
+++ ia64/hpux.h 1 Jul 2003 05:41:54 -0000
@@ -42,7 +42,7 @@ do { \
builtin_define("__fpreg=long double"); \
builtin_define("__float80=long double"); \
builtin_define("__float128=long double"); \
- if (c_language == clk_cplusplus || !flag_iso) \
+ if (c_dialect_cxx () || !flag_iso) \
{ \
builtin_define("_HPUX_SOURCE"); \
builtin_define("__STDC_EXT__"); \
Index: mips/iris6.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris6.h,v
retrieving revision 1.62
diff -u -p -r1.62 iris6.h
--- mips/iris6.h 19 Jun 2003 21:47:16 -0000 1.62
+++ mips/iris6.h 1 Jul 2003 05:41:55 -0000
@@ -128,11 +128,11 @@ Boston, MA 02111-1307, USA. */
/* IRIX 6.5.18 and above provide many ISO C99 \
features protected by the __c99 macro. \
libstdc++ v3 needs them as well. */ \
- if ((c_language == clk_c && flag_isoc99) \
- || c_language == clk_cplusplus) \
+ if ((!c_dialect_cxx () && flag_isoc99) \
+ || c_dialect_cxx ()) \
builtin_define ("__c99"); \
\
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
{ \
builtin_define ("__EXTENSIONS__"); \
builtin_define ("_SGI_SOURCE"); \
Index: mips/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/linux.h,v
retrieving revision 1.59
diff -u -p -r1.59 linux.h
--- mips/linux.h 4 Jun 2003 17:53:07 -0000 1.59
+++ mips/linux.h 1 Jul 2003 05:41:55 -0000
@@ -126,7 +126,7 @@ void FN () \
builtin_define_std ("linux"); \
builtin_assert ("system=linux"); \
/* The GNU C++ standard library requires this. */ \
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
builtin_define ("_GNU_SOURCE"); \
\
if (mips_abi == ABI_N32) \
Index: mips/mips.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.268
diff -u -p -r1.268 mips.h
--- mips/mips.h 28 Jun 2003 19:43:01 -0000 1.268
+++ mips/mips.h 1 Jul 2003 05:41:56 -0000
@@ -479,18 +479,18 @@ extern void sbss_section PARAMS ((void)
builtin_define_std ("LANGUAGE_ASSEMBLY"); \
builtin_define ("_LANGUAGE_ASSEMBLY"); \
} \
- else if (c_language == clk_c) \
- { \
- builtin_define_std ("LANGUAGE_C"); \
- builtin_define ("_LANGUAGE_C"); \
- } \
- else if (c_language == clk_cplusplus) \
+ else if (c_dialect_cxx ()) \
{ \
builtin_define ("_LANGUAGE_C_PLUS_PLUS"); \
builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \
builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \
} \
- if (flag_objc) \
+ else \
+ { \
+ builtin_define_std ("LANGUAGE_C"); \
+ builtin_define ("_LANGUAGE_C"); \
+ } \
+ if (c_dialect_objc ()) \
{ \
builtin_define ("_LANGUAGE_OBJECTIVE_C"); \
builtin_define ("__LANGUAGE_OBJECTIVE_C"); \
Index: pa/pa-hpux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-hpux.h,v
retrieving revision 1.8
diff -u -p -r1.8 pa-hpux.h
--- pa/pa-hpux.h 19 Mar 2003 04:41:48 -0000 1.8
+++ pa/pa-hpux.h 1 Jul 2003 05:41:56 -0000
@@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__hpux__"); \
builtin_define ("__unix"); \
builtin_define ("__unix__"); \
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
{ \
builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \
Index: pa/pa-hpux10.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-hpux10.h,v
retrieving revision 1.15
diff -u -p -r1.15 pa-hpux10.h
--- pa/pa-hpux10.h 21 May 2003 22:00:57 -0000 1.15
+++ pa/pa-hpux10.h 1 Jul 2003 05:41:56 -0000
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__hpux__"); \
builtin_define ("__unix"); \
builtin_define ("__unix__"); \
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
{ \
builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \
Index: pa/pa-hpux11.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-hpux11.h,v
retrieving revision 1.9
diff -u -p -r1.9 pa-hpux11.h
--- pa/pa-hpux11.h 21 May 2003 22:00:57 -0000 1.9
+++ pa/pa-hpux11.h 1 Jul 2003 05:41:56 -0000
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__hpux__"); \
builtin_define ("__unix"); \
builtin_define ("__unix__"); \
- if (c_language == clk_cplusplus) \
+ if (c_dialect_cxx ()) \
{ \
builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \
Index: pa/pa-pro-end.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-pro-end.h,v
retrieving revision 1.11
diff -u -p -r1.11 pa-pro-end.h
--- pa/pa-pro-end.h 6 Jun 2003 21:10:59 -0000 1.11
+++ pa/pa-pro-end.h 1 Jul 2003 05:41:56 -0000
@@ -29,8 +29,7 @@ Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
- if (c_language != clk_cplusplus \
- && !flag_iso) \
+ if (!c_dialect_cxx () && !flag_iso) \
{ \
builtin_define ("hppa"); \
builtin_define_std ("PWB"); \
Index: pa/pa.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.h,v
retrieving revision 1.197
diff -u -p -r1.197 pa.h
--- pa/pa.h 14 Jun 2003 21:47:44 -0000 1.197
+++ pa/pa.h 1 Jul 2003 05:41:57 -0000
@@ -388,8 +388,7 @@ do { \
builtin_define_std ("hp800"); \
builtin_define_std ("hp9000"); \
builtin_define_std ("hp9k8"); \
- if (c_language != clk_cplusplus \
- && !flag_iso) \
+ if (!c_dialect_cxx () && !flag_iso) \
builtin_define ("hppa"); \
builtin_define_std ("spectrum"); \
builtin_define_std ("unix"); \
Index: pa/rtems.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/rtems.h,v
retrieving revision 1.12
diff -u -p -r1.12 rtems.h
--- pa/rtems.h 29 Jan 2003 14:54:09 -0000 1.12
+++ pa/rtems.h 1 Jul 2003 05:41:57 -0000
@@ -25,8 +25,7 @@ Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
- if (c_language != clk_cplusplus \
- && !flag_iso) \
+ if (!c_dialect_cxx () && !flag_iso) \
{ \
builtin_define ("hppa"); \
builtin_define_std ("PWB"); \