diff mbox

RFA: hookize BOOL_TYPE_SIZE and ADA_LONG_TYPE_SIZE

Message ID 20101201003200.tzlku02bwoswsg0g-nzlynne@webmail.spamcop.net
State New
Headers show

Commit Message

Joern Rennecke Dec. 1, 2010, 5:32 a.m. UTC
bootstrapped & regtested on x86_64-pc-linux-gnu
cross-tested on x86_64-pc-linux-gnu for the following targets:
ppc-darwin
alpha-linux-gnu hppa-linux-gnu mips-elf sh-elf arc-elf ia64-elf sparc-elf
arm-eabi iq2000-elf mn10300-elf spu-elf avr-elf lm32-elf moxie-elf v850-elf
m32c-elf pdp11-aout cris-elf m32r-elf picochip-elf xstormy16-elf  
crx-elf m68hc11-elf ppc-elf xtensa-elf fr30-elf m68k-elf rx-elf  
mcore-elf
s390-linux-gnu h8300-elf mep-elf score-elf

bootstrapped on i686-pc-linux-gnu
cross-tested on i686-pc-linux-gnu for targets:
bfin-elf frv-elf mmix-knuth-mmixware vax-linux-gnu

Ada testing for microblaze is currently not possible because of PR46738.
2010-12-01  Joern Rennecke  <amylaar@spamcop.net>

	PR other/46677
gcc:
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in (ADA_LONG_TYPE_SIZE, BOOL_TYPE_SIZE): Delete.
	(TARGET_ADA_LONG_TYPE_SIZE, TARGET_BOOL_TYPE_SIZE): New hook.
	* targhooks.c (default_bool_type_size): New function.
	(default_ada_long_type_size): Likewise.
	* targhooks.h (default_bool_type_size): Declare.
	(default_ada_long_type_size): Likewise.
	* hooks.c (hook_int_void_64): New function.
	* hooks.h (hook_int_void_64): Declare.
	* target.def (bool_type_size, ada_long_type_size): New hooks.
	* defaults.h (BOOL_TYPE_SIZE): Delete.
	* tree.c (free_lang_data): Use targetm.bool_type_size.
	(build_common_tree_nodes): Likewise.
	* config/alpha/vms.h (ADA_LONG_TYPE_SIZE): Delete.
	(TARGET_ADA_LONG_TYPE_SIZE): Define.
	* config/ia64/vms.h (ADA_LONG_TYPE_SIZE): Delete.
	(TARGET_ADA_LONG_TYPE_SIZE): Define.
	* config/rs6000/darwin.h (BOOL_TYPE_SIZE): Delete.
	(darwin_bool_type_size): Declare.
	(TARGET_BOOL_TYPE_SIZE): Define.
	* config/darwin.c (darwin_bool_type_size): New function.
	* system.h (BOOL_TYPE_SIZE, ADA_LONG_TYPE_SIZE): Poison.
gcc/ada:
	* gcc-interface/targtyps.c: Include target.h
	(ADA_LONG_TYPE_SIZE): Don't define.
	(get_target_long_size): Use targetm.ada_long_type_size.
	* gcc-interface/Make-lang.in (ada/targtyps.o): Depend on $(TARGET_H) .
gcc/fortran:
	* iso-c-binding.def (c_bool): Use targetm.bool_type_size.
	* trans-types.c (gfc_build_logical_type): Likewise.
	* types.def (BT_BOOL): Likewise.

Comments

Laurent GUERBY Dec. 1, 2010, 9:31 a.m. UTC | #1
On Wed, 2010-12-01 at 00:32 -0500, Joern Rennecke wrote:
> bootstrapped & regtested on x86_64-pc-linux-gnu
> cross-tested on x86_64-pc-linux-gnu for the following targets:
> ppc-darwin
> alpha-linux-gnu hppa-linux-gnu mips-elf sh-elf arc-elf ia64-elf sparc-elf
> arm-eabi iq2000-elf mn10300-elf spu-elf avr-elf lm32-elf moxie-elf v850-elf
> m32c-elf pdp11-aout cris-elf m32r-elf picochip-elf xstormy16-elf  
> crx-elf m68hc11-elf ppc-elf xtensa-elf fr30-elf m68k-elf rx-elf  
> mcore-elf
> s390-linux-gnu h8300-elf mep-elf score-elf
> 
> bootstrapped on i686-pc-linux-gnu
> cross-tested on i686-pc-linux-gnu for targets:
> bfin-elf frv-elf mmix-knuth-mmixware vax-linux-gnu
> 
> Ada testing for microblaze is currently not possible because of PR46738.

This one looks like a missing include (again): the macro
ASM_OUTPUT_IDENT is visible and defined in microblaze.h calling
microblaze_asm_output_ident from microblaze.c which is not visible from
microblaze.h but from microblaze-protos.h which for some reason
end up not included from ada/gcc-interface/trans.c

What are the include rules in GCC? Why would a macro in one .h do not
include what's needed to implement it? Is it a microblaze issue
or a trans.c issue?

Thanks in advance,

Laurent
Joern Rennecke Dec. 1, 2010, 3:14 p.m. UTC | #2
Quoting Laurent GUERBY <laurent@guerby.net>:

> On Wed, 2010-12-01 at 00:32 -0500, Joern Rennecke wrote:
>> bootstrapped & regtested on x86_64-pc-linux-gnu
>> cross-tested on x86_64-pc-linux-gnu for the following targets:
>> ppc-darwin
>> alpha-linux-gnu hppa-linux-gnu mips-elf sh-elf arc-elf ia64-elf sparc-elf
>> arm-eabi iq2000-elf mn10300-elf spu-elf avr-elf lm32-elf moxie-elf v850-elf
>> m32c-elf pdp11-aout cris-elf m32r-elf picochip-elf xstormy16-elf
>> crx-elf m68hc11-elf ppc-elf xtensa-elf fr30-elf m68k-elf rx-elf
>> mcore-elf
>> s390-linux-gnu h8300-elf mep-elf score-elf
>>
>> bootstrapped on i686-pc-linux-gnu
>> cross-tested on i686-pc-linux-gnu for targets:
>> bfin-elf frv-elf mmix-knuth-mmixware vax-linux-gnu
>>
>> Ada testing for microblaze is currently not possible because of PR46738.
>
> This one looks like a missing include (again): the macro
> ASM_OUTPUT_IDENT is visible and defined in microblaze.h calling
> microblaze_asm_output_ident from microblaze.c which is not visible from
> microblaze.h but from microblaze-protos.h which for some reason
> end up not included from ada/gcc-interface/trans.c
>
> What are the include rules in GCC? Why would a macro in one .h do not
> include what's needed to implement it? Is it a microblaze issue
> or a trans.c issue?

In general, if you use any tm.h macro, besides tm.h, you also have to
include tm_h, and if the macro involves a type from tree.h / rtl.h, you
have to include tree.h / rtl.h between including tm.h and tm_p.h .

But frontend maintainers often get this wrong, and also there are often
ways in which type, value ranges, constantness or non-constantness of
macro definitions by particular targets cause warnings in frontends,
which causes bootstraps to fail.  The interfaces are not defined
rigerously enough to avoid such failures without testing every possible
target with every frontend first.

These are just two of the reasons why it would be better for our users if
frontends would not use target macros, and reducing the number of target
macros in frontends by replacing them with hooks also generally reduces
this instability.
Once all target macros are eliminated from a frontend file, the way to
avoid regressions is to eliminate all direct and indirect includes of
tm.h.  And once we have archived that for all frontend files, we can poison
the include guards of tm.h and its friends for frontends, i.e. TM_H,
HARD_REG_SET_H etc. .
Target macros in the rtl optimizers are a lesser concern because they get
better test coverage than the less-frequently built frontends, like ada.
Joseph Myers Dec. 1, 2010, 3:29 p.m. UTC | #3
On Wed, 1 Dec 2010, Joern Rennecke wrote:

> Once all target macros are eliminated from a frontend file, the way to
> avoid regressions is to eliminate all direct and indirect includes of
> tm.h.  And once we have archived that for all frontend files, we can poison
> the include guards of tm.h and its friends for frontends, i.e. TM_H,
> HARD_REG_SET_H etc. .

Note that sometimes the poisoning we have of certain macros/headers for 
front ends has accidentally broken some targets because of includes in 
target-specific front-end files (c_target_objs etc.).  sh-symbianelf, for 
example.  Your work on making each target architecture build cleanly with 
current GCC trunk has been very useful; it would be good to extend to it 
every target OS for every architecture (especially those with their own .c 
files, but there might be other cases of OS-specific breakage as well) and 
have an easy way to test patches don't break the build for any target (a 
standard list of all supported target variants that enable different sets 
of .c or .h files, for example - or at least an autobuilder reporting 
patches that break any target).  (i686-interix3 is another target with 
broken build that has shown up when I've done tests for lots of targets, 
though I think that breakage is unrelated to any poisoning changes.)
Joseph Myers Dec. 1, 2010, 4:12 p.m. UTC | #4
On Wed, 1 Dec 2010, Joern Rennecke wrote:

> +DEFHOOK
> +(bool_type_size,
> + "The size, in bits, of the boolean type used by most frontends that have such\

"front ends".

> +  a type.  (Java is an exception, because the language defines the type size). \

For a whole parenthetical sentence, the trailing "." should go inside the 
parentheses.
Joern Rennecke Dec. 1, 2010, 4:24 p.m. UTC | #5
Quoting "Joseph S. Myers" <joseph@codesourcery.com>:

> On Wed, 1 Dec 2010, Joern Rennecke wrote:
>
>> +DEFHOOK
>> +(bool_type_size,
>> + "The size, in bits, of the boolean type used by most frontends   
>> that have such\
>
> "front ends".
>
>> +  a type.  (Java is an exception, because the language defines the  
>>  type size). \
>
> For a whole parenthetical sentence, the trailing "." should go inside the
> parentheses.

Ok, I'll change this.
Is this a review and conditional approval of the documentation part of the
patch, or did you merely want to point out these two flaws?
Do you want me to send the amended patch?
Joseph Myers Dec. 1, 2010, 4:32 p.m. UTC | #6
On Wed, 1 Dec 2010, Joern Rennecke wrote:

> Is this a review and conditional approval of the documentation part of the
> patch, or did you merely want to point out these two flaws?

Just wanted to point out the issues I saw in reading the patch.
diff mbox

Patch

Index: doc/tm.texi
===================================================================
--- doc/tm.texi	(revision 167318)
+++ doc/tm.texi	(working copy)
@@ -1468,13 +1468,9 @@ 
 target machine.  If you don't define this, the default is one word.
 @end defmac
 
-@defmac ADA_LONG_TYPE_SIZE
-On some machines, the size used for the Ada equivalent of the type
-@code{long} by a native Ada compiler differs from that used by C@.  In
-that situation, define this macro to be a C expression to be used for
-the size of that type.  If you don't define this, the default is the
-value of @code{LONG_TYPE_SIZE}.
-@end defmac
+@deftypefn {Target Hook} int TARGET_ADA_LONG_TYPE_SIZE (void)
+The size, in bits, of the long type used by Ada.  By default this is the  same as for C.
+@end deftypefn
 
 @defmac LONG_LONG_TYPE_SIZE
 A C expression for the size in bits of the type @code{long long} on the
@@ -1489,11 +1485,9 @@ 
 @code{BITS_PER_UNIT}.
 @end defmac
 
-@defmac BOOL_TYPE_SIZE
-A C expression for the size in bits of the C++ type @code{bool} and
-C99 type @code{_Bool} on the target machine.  If you don't define
-this, and you probably shouldn't, the default is @code{CHAR_TYPE_SIZE}.
-@end defmac
+@deftypefn {Target Hook} int TARGET_BOOL_TYPE_SIZE (void)
+The size, in bits, of the boolean type used by most frontends that have such  a type.  (Java is an exception, because the language defines the type size).   The default is @code{CHAR_TYPE_SIZE}.
+@end deftypefn
 
 @defmac FLOAT_TYPE_SIZE
 A C expression for the size in bits of the type @code{float} on the
Index: doc/tm.texi.in
===================================================================
--- doc/tm.texi.in	(revision 167318)
+++ doc/tm.texi.in	(working copy)
@@ -1458,13 +1458,7 @@ 
 target machine.  If you don't define this, the default is one word.
 @end defmac
 
-@defmac ADA_LONG_TYPE_SIZE
-On some machines, the size used for the Ada equivalent of the type
-@code{long} by a native Ada compiler differs from that used by C@.  In
-that situation, define this macro to be a C expression to be used for
-the size of that type.  If you don't define this, the default is the
-value of @code{LONG_TYPE_SIZE}.
-@end defmac
+@hook TARGET_ADA_LONG_TYPE_SIZE
 
 @defmac LONG_LONG_TYPE_SIZE
 A C expression for the size in bits of the type @code{long long} on the
@@ -1479,11 +1473,7 @@ 
 @code{BITS_PER_UNIT}.
 @end defmac
 
-@defmac BOOL_TYPE_SIZE
-A C expression for the size in bits of the C++ type @code{bool} and
-C99 type @code{_Bool} on the target machine.  If you don't define
-this, and you probably shouldn't, the default is @code{CHAR_TYPE_SIZE}.
-@end defmac
+@hook TARGET_BOOL_TYPE_SIZE
 
 @defmac FLOAT_TYPE_SIZE
 A C expression for the size in bits of the type @code{float} on the
Index: targhooks.c
===================================================================
--- targhooks.c	(revision 167318)
+++ targhooks.c	(working copy)
@@ -437,6 +437,19 @@ 
   return !!FLOAT_WORDS_BIG_ENDIAN;
 }
 
+/* `bool' has size and alignment `1', on almost all platforms.  */
+int
+default_bool_type_size (void)
+{
+  return CHAR_TYPE_SIZE;
+}
+
+int
+default_ada_long_type_size (void)
+{
+  return LONG_TYPE_SIZE;
+}
+
 /* True if the target supports decimal floating point.  */
 
 bool
Index: targhooks.h
===================================================================
--- targhooks.h	(revision 167318)
+++ targhooks.h	(working copy)
@@ -71,6 +71,8 @@ 
 extern bool targhook_words_big_endian (void);
 extern bool targhook_float_words_big_endian (void);
 extern bool default_decimal_float_supported_p (void);
+extern int default_bool_type_size (void);
+extern int default_ada_long_type_size (void);
 extern bool default_fixed_point_supported_p (void);
 
 extern const char * default_invalid_within_doloop (const_rtx);
Index: hooks.c
===================================================================
--- hooks.c	(revision 167318)
+++ hooks.c	(working copy)
@@ -375,3 +375,10 @@ 
 hook_void_gcc_optionsp (struct gcc_options *opts ATTRIBUTE_UNUSED)
 {
 }
+
+/* Generic hook that returns 64.  */
+int
+hook_int_void_64 (void)
+{
+  return 64;
+}
Index: hooks.h
===================================================================
--- hooks.h	(revision 167318)
+++ hooks.h	(working copy)
@@ -90,4 +90,5 @@ 
 extern const char *hook_constcharptr_const_tree_const_tree_null (const_tree, const_tree);
 extern const char *hook_constcharptr_int_const_tree_null (int, const_tree);
 extern const char *hook_constcharptr_int_const_tree_const_tree_null (int, const_tree, const_tree);
+extern int hook_int_void_64 (void);
 #endif
Index: target.def
===================================================================
--- target.def	(revision 167318)
+++ target.def	(working copy)
@@ -1178,6 +1178,21 @@ 
  bool, (void),
  targhook_float_words_big_endian)
 
+DEFHOOK
+(bool_type_size,
+ "The size, in bits, of the boolean type used by most frontends that have such\
+  a type.  (Java is an exception, because the language defines the type size). \
+  The default is @code{CHAR_TYPE_SIZE}.",
+ int, (void),
+ default_bool_type_size)
+
+DEFHOOK
+(ada_long_type_size,
+ "The size, in bits, of the long type used by Ada.  By default this is the\
+  same as for C.",
+ int, (void),
+ default_ada_long_type_size)
+
 /* True if the target supports decimal floating point.  */
 DEFHOOK
 (decimal_float_supported_p,
Index: defaults.h
===================================================================
--- defaults.h	(revision 167318)
+++ defaults.h	(working copy)
@@ -431,11 +431,6 @@ 
 #define CHAR_TYPE_SIZE BITS_PER_UNIT
 #endif
 
-#ifndef BOOL_TYPE_SIZE
-/* `bool' has size and alignment `1', on almost all platforms.  */
-#define BOOL_TYPE_SIZE CHAR_TYPE_SIZE
-#endif
-
 #ifndef SHORT_TYPE_SIZE
 #define SHORT_TYPE_SIZE (BITS_PER_UNIT * MIN ((UNITS_PER_WORD + 1) / 2, 2))
 #endif
Index: tree.c
===================================================================
--- tree.c	(revision 167318)
+++ tree.c	(working copy)
@@ -5087,11 +5087,11 @@ 
   fileptr_type_node = ptr_type_node;
   if (TREE_CODE (boolean_type_node) != BOOLEAN_TYPE
       || (TYPE_MODE (boolean_type_node)
-	  != mode_for_size (BOOL_TYPE_SIZE, MODE_INT, 0))
+	  != mode_for_size (targetm.bool_type_size (), MODE_INT, 0))
       || TYPE_PRECISION (boolean_type_node) != 1
       || !TYPE_UNSIGNED (boolean_type_node))
     {
-      boolean_type_node = make_unsigned_type (BOOL_TYPE_SIZE);
+      boolean_type_node = make_unsigned_type (targetm.bool_type_size ());
       TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE);
       TYPE_MAX_VALUE (boolean_type_node) = build_int_cst (boolean_type_node, 1);
       TYPE_PRECISION (boolean_type_node) = 1;
@@ -9014,10 +9014,11 @@ 
       }
 #endif
   /* Define a boolean type.  This type only represents boolean values but
-     may be larger than char depending on the value of BOOL_TYPE_SIZE.
+     may be larger than char depending on the value of
+     targetm.bool_type_size ().
      Front ends which want to override this size (i.e. Java) can redefine
      boolean_type_node before calling build_common_tree_nodes_2.  */
-  boolean_type_node = make_unsigned_type (BOOL_TYPE_SIZE);
+  boolean_type_node = make_unsigned_type (targetm.bool_type_size ());
   TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE);
   TYPE_MAX_VALUE (boolean_type_node) = build_int_cst (boolean_type_node, 1);
   TYPE_PRECISION (boolean_type_node) = 1;
Index: ada/gcc-interface/targtyps.c
===================================================================
--- ada/gcc-interface/targtyps.c	(revision 167318)
+++ ada/gcc-interface/targtyps.c	(working copy)
@@ -31,6 +31,7 @@ 
 #include "tree.h"
 #include "tm.h"
 #include "tm_p.h"
+#include "target.h"
 
 #include "ada.h"
 #include "types.h"
@@ -48,12 +49,6 @@ 
 #include "ada-tree.h"
 #include "gigi.h"
 
-/* If we don't have a specific size for Ada's equivalent of `long', use that
-   of C.  */
-#ifndef ADA_LONG_TYPE_SIZE
-#define ADA_LONG_TYPE_SIZE LONG_TYPE_SIZE
-#endif
-
 #ifndef WIDEST_HARDWARE_FP_SIZE
 #define WIDEST_HARDWARE_FP_SIZE LONG_DOUBLE_TYPE_SIZE
 #endif
@@ -101,7 +96,7 @@ 
 Pos
 get_target_long_size (void)
 {
-  return ADA_LONG_TYPE_SIZE;
+  return targetm.ada_long_type_size ();
 }
 
 Pos
Index: fortran/iso-c-binding.def
===================================================================
--- fortran/iso-c-binding.def	(revision 167318)
+++ fortran/iso-c-binding.def	(working copy)
@@ -116,7 +116,7 @@ 
                get_real_kind_from_node (long_double_type_node))
 
 NAMED_LOGCST (ISOCBINDING_BOOL, "c_bool", \
-              get_int_kind_from_width (BOOL_TYPE_SIZE))
+              get_int_kind_from_width (targetm.bool_type_size ()))
 
 NAMED_CHARKNDCST (ISOCBINDING_CHAR, "c_char", gfc_default_character_kind)
 
Index: fortran/trans-types.c
===================================================================
--- fortran/trans-types.c	(revision 167318)
+++ fortran/trans-types.c	(working copy)
@@ -771,7 +771,7 @@ 
   int bit_size = info->bit_size;
   tree new_type;
 
-  if (bit_size == BOOL_TYPE_SIZE)
+  if (bit_size == targetm.bool_type_size ())
     {
       info->c_bool = 1;
       return boolean_type_node;
Index: fortran/types.def
===================================================================
--- fortran/types.def	(revision 167318)
+++ fortran/types.def	(working copy)
@@ -51,7 +51,8 @@ 
 
 DEF_PRIMITIVE_TYPE (BT_VOID, void_type_node)
 DEF_PRIMITIVE_TYPE (BT_BOOL,
-		    (*lang_hooks.types.type_for_size) (BOOL_TYPE_SIZE, 1))
+		    (*lang_hooks.types.type_for_size)
+		     (targetm.bool_type_size (), 1))
 DEF_PRIMITIVE_TYPE (BT_INT, integer_type_node)
 DEF_PRIMITIVE_TYPE (BT_UINT, unsigned_type_node)
 DEF_PRIMITIVE_TYPE (BT_LONG, long_integer_type_node)
Index: system.h
===================================================================
--- system.h	(revision 167318)
+++ system.h	(working copy)
@@ -759,7 +759,7 @@ 
 	LABEL_ALIGN_MAX_SKIP LOOP_ALIGN_MAX_SKIP			\
 	LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP JUMP_ALIGN_MAX_SKIP 		\
 	CAN_DEBUG_WITHOUT_FP UNLIKELY_EXECUTED_TEXT_SECTION_NAME	\
-	HOT_TEXT_SECTION_NAME
+	HOT_TEXT_SECTION_NAME BOOL_TYPE_SIZE ADA_LONG_TYPE_SIZE
 
 /* Other obsolete target macros, or macros that used to be in target
    headers and were not used, and may be obsolete or may never have
Index: config/alpha/vms.h
===================================================================
--- config/alpha/vms.h	(revision 167318)
+++ config/alpha/vms.h	(working copy)
@@ -62,7 +62,7 @@ 
 /* "long" is 32 bits, but 64 bits for Ada.  */
 #undef LONG_TYPE_SIZE
 #define LONG_TYPE_SIZE 32
-#define ADA_LONG_TYPE_SIZE 64
+#define TARGET_ADA_LONG_TYPE_SIZE hook_int_void_64
 
 /* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended.  */
 #undef POINTER_SIZE
Index: config/ia64/vms.h
===================================================================
--- config/ia64/vms.h	(revision 167318)
+++ config/ia64/vms.h	(working copy)
@@ -52,7 +52,7 @@ 
 /* "long" is 32 bits, but 64 bits for Ada.  */
 #undef LONG_TYPE_SIZE
 #define LONG_TYPE_SIZE 32
-#define ADA_LONG_TYPE_SIZE 64
+#define TARGET_ADA_LONG_TYPE_SIZE hook_int_void_64
 
 /* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended.  */
 #undef POINTER_SIZE
Index: config/rs6000/darwin.h
===================================================================
--- config/rs6000/darwin.h	(revision 167318)
+++ config/rs6000/darwin.h	(working copy)
@@ -369,7 +369,8 @@ 
 /* For binary compatibility with 2.95; Darwin C APIs use bool from
    stdbool.h, which was an int-sized enum in 2.95.  Users can explicitly
    choose to have sizeof(bool)==1 with the -mone-byte-bool switch. */
-#define BOOL_TYPE_SIZE (darwin_one_byte_bool ? CHAR_TYPE_SIZE : INT_TYPE_SIZE)
+extern int darwin_bool_type_size (void);
+#define TARGET_BOOL_TYPE_SIZE darwin_bool_type_size
 
 #undef REGISTER_TARGET_PRAGMAS
 #define REGISTER_TARGET_PRAGMAS() \
Index: config/darwin.c
===================================================================
--- config/darwin.c	(revision 167318)
+++ config/darwin.c	(working copy)
@@ -2998,4 +2998,10 @@ 
     }
 }
 
+int
+darwin_bool_type_size (void)
+{
+  return darwin_one_byte_bool ? CHAR_TYPE_SIZE : INT_TYPE_SIZE;
+}
+
 #include "gt-darwin.h"
Index: ada/gcc-interface/Make-lang.in
===================================================================
--- ada/gcc-interface/Make-lang.in	(revision 167318)
+++ ada/gcc-interface/Make-lang.in	(working copy)
@@ -1242,7 +1242,7 @@ 
    coretypes.h $(TM_H) $(TM_P_H) $(TREE_H) ada/gcc-interface/ada.h \
    ada/types.h ada/atree.h ada/elists.h ada/namet.h ada/nlists.h \
    ada/snames.h ada/stringt.h ada/uintp.h ada/urealp.h ada/fe.h ada/sinfo.h \
-   ada/einfo.h $(ADA_TREE_H) ada/gcc-interface/gigi.h
+   ada/einfo.h $(ADA_TREE_H) ada/gcc-interface/gigi.h $(TARGET_H)
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@
 
 ada/trans.o : ada/gcc-interface/trans.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \