]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ansidecl.h (EXPORTED_CONST): Define.
authorIan Lance Taylor <iant@google.com>
Wed, 3 Jun 2009 20:19:55 +0000 (20:19 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 3 Jun 2009 20:19:55 +0000 (20:19 +0000)
include/:
* ansidecl.h (EXPORTED_CONST): Define.
gcc/:
* dummy-checksum.c (executable_checksum): Use EXPORTED_CONST.
* genattrtab.c (write_length_unit_log): Likewise.
* genchecksum.c (dosum): Likewise.
* gengtype.c (write_rtx_next): Likewise.
(finish_root_table, write_roots): Likewise.
* gimple.c (gimple_ops_offset_): Likewise.
* tree-nomudflap.c (gt_ggc_r_gt_tree_mudflap_h): Likewise.
* config/arc/arc.c (arc_attribute_table): Likewise.
* config/arm/arm.c (arm_attribute_table): Likewise.
* config/avr/avr.c (avr_attribute_table): Likewise.
* config/crx/crx.c (crx_attribute_table): Likewise.
* config/m32r/m32r.c (m32r_attribute_table): Likewise.
* config/m68hc11/m68hc11.c (m68hc11_attribute_table): Likewise.
* config/mcore/mcore.c (mcore_attribute_table): Likewise.
* config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
* config/sh/sh.c (sh_attribute_table): Likewise.
* config/sparc/sparc.c (sparc_attribute_table): Likewise.
* config/spu/spu.c (spu_attribute_table): Likewise.
* config/v850/v850.c (v850_attribute_table): Likewise.

* config/alpha/alpha.c (vms_attribute_table): Make static.
* config/bfin/bfin.c (bfin_attribute_table): Likewise.
* config/h8300/h8300.c (h8300_attribute_table): Likewise.
* config/mips/mips.c (mips_attribute_table): Likewise.

* Makefile.in (dummy-checksum.o): Depend upon $(CONFIG_H) and
$(SYSTEM_H).
(cc1-checksum.o): Likewise.
gcc/cp/:
* Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
$(SYSTEM_H).
gcc/objc/:
* Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
$(SYSTEM_H).
gcc/objcp/:
* Make-lang.in (cc1objplus-checksum.o): Depend upon $(CONFIG_H)
and $(SYSTEM_H).

From-SVN: r148146

32 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/config/alpha/alpha.c
gcc/config/arc/arc.c
gcc/config/arm/arm.c
gcc/config/avr/avr.c
gcc/config/bfin/bfin.c
gcc/config/crx/crx.c
gcc/config/h8300/h8300.c
gcc/config/m32r/m32r.c
gcc/config/m68hc11/m68hc11.c
gcc/config/mcore/mcore.c
gcc/config/mips/mips.c
gcc/config/rs6000/rs6000.c
gcc/config/sh/sh.c
gcc/config/sparc/sparc.c
gcc/config/spu/spu.c
gcc/config/v850/v850.c
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/dummy-checksum.c
gcc/genattrtab.c
gcc/genchecksum.c
gcc/gengtype.c
gcc/gimple.c
gcc/objc/ChangeLog
gcc/objc/Make-lang.in
gcc/objcp/ChangeLog
gcc/objcp/Make-lang.in
gcc/tree-nomudflap.c
include/ChangeLog
include/ansidecl.h

index 9dc89ff8736f06709ec7ae996b5ba45c3e3a868c..c2cac32adff2c9366dab70ab1d09d618a0f2d476 100644 (file)
@@ -1,3 +1,34 @@
+2009-06-03  Ian Lance Taylor  <iant@google.com>
+
+       * dummy-checksum.c (executable_checksum): Use EXPORTED_CONST.
+       * genattrtab.c (write_length_unit_log): Likewise.
+       * genchecksum.c (dosum): Likewise.
+       * gengtype.c (write_rtx_next): Likewise.
+       (finish_root_table, write_roots): Likewise.
+       * gimple.c (gimple_ops_offset_): Likewise.
+       * tree-nomudflap.c (gt_ggc_r_gt_tree_mudflap_h): Likewise.
+       * config/arc/arc.c (arc_attribute_table): Likewise.
+       * config/arm/arm.c (arm_attribute_table): Likewise.
+       * config/avr/avr.c (avr_attribute_table): Likewise.
+       * config/crx/crx.c (crx_attribute_table): Likewise.
+       * config/m32r/m32r.c (m32r_attribute_table): Likewise.
+       * config/m68hc11/m68hc11.c (m68hc11_attribute_table): Likewise.
+       * config/mcore/mcore.c (mcore_attribute_table): Likewise.
+       * config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
+       * config/sh/sh.c (sh_attribute_table): Likewise.
+       * config/sparc/sparc.c (sparc_attribute_table): Likewise.
+       * config/spu/spu.c (spu_attribute_table): Likewise.
+       * config/v850/v850.c (v850_attribute_table): Likewise.
+
+       * config/alpha/alpha.c (vms_attribute_table): Make static.
+       * config/bfin/bfin.c (bfin_attribute_table): Likewise.
+       * config/h8300/h8300.c (h8300_attribute_table): Likewise.
+       * config/mips/mips.c (mips_attribute_table): Likewise.
+
+       * Makefile.in (dummy-checksum.o): Depend upon $(CONFIG_H) and
+       $(SYSTEM_H).
+       (cc1-checksum.o): Likewise.
+
 2009-06-03  Steve Ellcey  <sje@cup.hp.com>
 
        * config/ia64/vect.md (*movv2sf_internal): Handle big endian case.
index 381c189960c5107c08c6ee23b94ac347244afa0a..814b90d31a4bfba75c9e164433e459e80074495d 100644 (file)
@@ -1671,7 +1671,7 @@ $(SPECS): xgcc$(exeext)
 gcc-cross$(exeext): xgcc$(exeext)
        cp xgcc$(exeext) gcc-cross$(exeext)
 
-dummy-checksum.o : dummy-checksum.c
+dummy-checksum.o : dummy-checksum.c $(CONFIG_H) $(SYSTEM_H)
 
 cc1-dummy$(exeext): $(C_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
        $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
@@ -1680,7 +1680,7 @@ cc1-dummy$(exeext): $(C_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
 cc1-checksum.c : cc1-dummy$(exeext) build/genchecksum$(build_exeext)
        build/genchecksum$(build_exeext) cc1-dummy$(exeext) > $@
 
-cc1-checksum.o : cc1-checksum.c
+cc1-checksum.o : cc1-checksum.c $(CONFIG_H) $(SYSTEM_H)
 
 cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
        $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
index 368ef507995d91f3885414c3066960dc424be3ec..1803627c1f45efb19397e42e014dc0d0d4f3d7c4 100644 (file)
@@ -7334,7 +7334,7 @@ alpha_using_fp (void)
 
 #if TARGET_ABI_OPEN_VMS
 
-const struct attribute_spec vms_attribute_table[] =
+static const struct attribute_spec vms_attribute_table[] =
 {
   /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
   { "overlaid",   0, 0, true,  false, false, NULL },
index 1f456b63cd7e38f5c7ed983a3dfcd144cc0d2f7b..221dea1ceac8fe3c15e74f5d4743fc4a31142930 100644 (file)
@@ -78,7 +78,7 @@ static bool arc_handle_option (size_t, const char *, int);
 static void record_cc_ref (rtx);
 static void arc_init_reg_tables (void);
 static int get_arc_condition_code (rtx);
-const struct attribute_spec arc_attribute_table[];
+EXPORTED_CONST struct attribute_spec arc_attribute_table[];
 static tree arc_handle_interrupt_attribute (tree *, tree, tree, int, bool *);
 static bool arc_assemble_integer (rtx, unsigned int, int);
 static void arc_output_function_prologue (FILE *, HOST_WIDE_INT);
index cf3ef2323c0fa2c7a14e54cbd3b60a8a29d750ff..141a4b846a61ead0b71a9b421e4ad4b8013e83eb 100644 (file)
@@ -58,7 +58,7 @@
 typedef struct minipool_node    Mnode;
 typedef struct minipool_fixup   Mfix;
 
-const struct attribute_spec arm_attribute_table[];
+EXPORTED_CONST struct attribute_spec arm_attribute_table[];
 
 void (*arm_lang_output_object_attributes_hook)(void);
 
index 26ba216b4e1787cdbafde52eaa25a1da85b634ae..1e79644fc2e05f593bc21b10b76496a45939d990 100644 (file)
@@ -67,7 +67,7 @@ static int compare_sign_p (rtx insn);
 static tree avr_handle_progmem_attribute (tree *, tree, tree, int, bool *);
 static tree avr_handle_fndecl_attribute (tree *, tree, tree, int, bool *);
 static tree avr_handle_fntype_attribute (tree *, tree, tree, int, bool *);
-const struct attribute_spec avr_attribute_table[];
+EXPORTED_CONST struct attribute_spec avr_attribute_table[];
 static bool avr_assemble_integer (rtx, unsigned int, int);
 static void avr_file_start (void);
 static void avr_file_end (void);
index f4a8c4dc3d45607a73ee2cb5c7a54cd0d1a3a6e5..715ec818cf501d316cec4c19c3479f5a5e1baf91 100644 (file)
@@ -5446,7 +5446,7 @@ bfin_handle_l1_data_attribute (tree *node, tree name, tree ARG_UNUSED (args),
 }
 
 /* Table of valid machine attributes.  */
-const struct attribute_spec bfin_attribute_table[] =
+static const struct attribute_spec bfin_attribute_table[] =
 {
   /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
   { "interrupt_handler", 0, 0, false, true,  true, handle_int_attribute },
index 0ea5fbca7a1a9249f1ad391943973b13c26e958e..28446259044d2b11b7e4795f569d1c48adb9e603 100644 (file)
@@ -1,6 +1,7 @@
 /* Output routines for GCC for CRX.
    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -122,7 +123,7 @@ static enum machine_mode output_memory_reference_mode;
 /*****************************************************************************/
 
 /* Table of machine attributes.  */
-const struct attribute_spec crx_attribute_table[];
+EXPORTED_CONST struct attribute_spec crx_attribute_table[];
 
 /*****************************************************************************/
 /* TARGETM FUNCTION PROTOTYPES                                              */
@@ -1435,4 +1436,3 @@ crx_expand_epilogue (void)
   else
     emit_jump_insn (gen_pop_and_popret_return (GEN_INT (sum_regs)));
 }
-
index 8630823ca85b092b7118f1e2dee80bb17f7a0bf7..c3dd29723fe0fb4563684f752daee25b4248652e 100644 (file)
@@ -5263,7 +5263,7 @@ h8300_insert_attributes (tree node, tree *attributes)
    tiny_data: This variable lives in the tiny data area and can be
    referenced with 16-bit absolute memory references.  */
 
-const struct attribute_spec h8300_attribute_table[] =
+static const struct attribute_spec h8300_attribute_table[] =
 {
   /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
   { "interrupt_handler", 0, 0, true,  false, false, h8300_handle_fndecl_attribute },
index b8721c27e539eaa7e203475b95444fc99f12dba1..3ee6b6bb5fc1931cd746bb9cced754758943e161 100644 (file)
@@ -1,6 +1,6 @@
 /* Subroutines used for code generation on the Renesas M32R cpu.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -65,7 +65,7 @@ static bool  m32r_handle_option (size_t, const char *, int);
 static void  init_reg_tables (void);
 static void  block_move_call (rtx, rtx, rtx);
 static int   m32r_is_insn (rtx);
-const struct attribute_spec m32r_attribute_table[];
+EXPORTED_CONST struct attribute_spec m32r_attribute_table[];
 static rtx   m32r_legitimize_address (rtx, rtx, enum machine_mode);
 static tree  m32r_handle_model_attribute (tree *, tree, tree, int, bool *);
 static void  m32r_output_function_prologue (FILE *, HOST_WIDE_INT);
index ae4f7057c76b6eef8b3a1fea9ff74f7a6953b45d..a8a8db8ac3e4dfc41ac19fe0d76490b2a4348c1f 100644 (file)
@@ -73,7 +73,7 @@ static int m68hc11_shift_cost (enum machine_mode, rtx, int);
 static int m68hc11_rtx_costs_1 (rtx, enum rtx_code, enum rtx_code);
 static bool m68hc11_rtx_costs (rtx, int, int, int *, bool);
 static tree m68hc11_handle_fntype_attribute (tree *, tree, tree, int, bool *);
-const struct attribute_spec m68hc11_attribute_table[];
+EXPORTED_CONST struct attribute_spec m68hc11_attribute_table[];
 
 void create_regs_rtx (void);
 
index 472bb75562a6d991ecae7fd2917fbe88f318133c..d03a28391797a5846fb7971d41e74b52caf4aa7d 100644 (file)
@@ -127,7 +127,7 @@ static void       mcore_mark_dllexport          (tree);
 static void       mcore_mark_dllimport          (tree);
 static int        mcore_dllexport_p             (tree);
 static int        mcore_dllimport_p             (tree);
-const struct attribute_spec mcore_attribute_table[];
+EXPORTED_CONST struct attribute_spec mcore_attribute_table[];
 static tree       mcore_handle_naked_attribute  (tree *, tree, tree, int, bool *);
 #ifdef OBJECT_FORMAT_ELF
 static void      mcore_asm_named_section       (const char *,
index 50a47e9bd5e2a710dfa1cf6c286e816c69e960f6..9e3d20be25b855dabac062bb18688216f1274a13 100644 (file)
@@ -565,7 +565,7 @@ const enum reg_class mips_regno_to_class[FIRST_PSEUDO_REGISTER] = {
 };
 
 /* The value of TARGET_ATTRIBUTE_TABLE.  */
-const struct attribute_spec mips_attribute_table[] = {
+static const struct attribute_spec mips_attribute_table[] = {
   /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
   { "long_call",   0, 0, false, true,  true,  NULL },
   { "far",                0, 0, false, true,  true,  NULL },
index 579d22485abecb5cd7ad2e6738349e0bd39faa8e..04ff6b54242c3cd7ae0f76f87bcea4af9aba0e3a 100644 (file)
@@ -775,7 +775,7 @@ static bool rs6000_ms_bitfield_layout_p (const_tree);
 static tree rs6000_handle_struct_attribute (tree *, tree, tree, int, bool *);
 static void rs6000_eliminate_indexed_memrefs (rtx operands[2]);
 static const char *rs6000_mangle_type (const_tree);
-extern const struct attribute_spec rs6000_attribute_table[];
+EXPORTED_CONST struct attribute_spec rs6000_attribute_table[];
 static void rs6000_set_default_type_attributes (tree);
 static rtx rs6000_savres_routine_sym (rs6000_stack_t *, bool, bool, bool);
 static rtx rs6000_emit_stack_reset (rs6000_stack_t *, rtx, rtx, int, bool);
index 06d10710a3fd1cfba0a8a631a7d6eee7c65d3030..fdb38d718150ab375f5b02c5972e321c0915ba0a 100644 (file)
@@ -184,7 +184,7 @@ static void push_regs (HARD_REG_SET *, int);
 static int calc_live_regs (HARD_REG_SET *);
 static HOST_WIDE_INT rounded_frame_size (int);
 static rtx mark_constant_pool_use (rtx);
-const struct attribute_spec sh_attribute_table[];
+EXPORTED_CONST struct attribute_spec sh_attribute_table[];
 static tree sh_handle_interrupt_handler_attribute (tree *, tree, tree, int, bool *);
 static tree sh_handle_resbank_handler_attribute (tree *, tree,
                                                 tree, int, bool *);
index d6467bdc2dd7281561422d46aef11e179dcd667a..2d9431804ab78d0c74e7e770d20382fcef21f221 100644 (file)
@@ -421,7 +421,7 @@ static void sparc_file_end (void);
 static const char *sparc_mangle_type (const_tree);
 #endif
 #ifdef SUBTARGET_ATTRIBUTE_TABLE
-const struct attribute_spec sparc_attribute_table[];
+EXPORTED_CONST struct attribute_spec sparc_attribute_table[];
 #endif
 \f
 /* Option handling.  */
index 5ee18e53a7e9d26d70efae87ccff4557ff18a3d4..a97bf24941f8db90c1582759565a71319c082a96 100644 (file)
@@ -316,7 +316,7 @@ spu_libgcc_shift_count_mode (void);
 #undef TARGET_SCHED_ADJUST_COST
 #define TARGET_SCHED_ADJUST_COST spu_sched_adjust_cost
 
-const struct attribute_spec spu_attribute_table[];
+EXPORTED_CONST struct attribute_spec spu_attribute_table[];
 #undef  TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE spu_attribute_table
 
index f9e8a7dd8b03c56407effd7f8d31659bc7a0d6a7..0af2451341a97888688d202c6e4d8f3e8f880e66 100644 (file)
@@ -58,7 +58,7 @@ static void substitute_ep_register   (rtx, rtx, int, int, rtx *, rtx *);
 static void v850_reorg              (void);
 static int  ep_memory_offset         (enum machine_mode, int);
 static void v850_set_data_area       (tree, v850_data_area);
-const struct attribute_spec v850_attribute_table[];
+EXPORTED_CONST struct attribute_spec v850_attribute_table[];
 static tree v850_handle_interrupt_attribute (tree *, tree, tree, int, bool *);
 static tree v850_handle_data_area_attribute (tree *, tree, tree, int, bool *);
 static void v850_insert_attributes   (tree, tree *);
index 8472f0ce7b14d01609c49e533ca368341af37c5b..bfd468b71b0ff2b5c621e3d066799a485cdc09ce 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-03  Ian Lance Taylor  <iant@google.com>
+
+       * Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
+       $(SYSTEM_H).
+
 2009-06-02  Mark Mitchell  <mark@codesourcery.com>
 
        * decl.c (maybe_deduce_size_from_array_init): Use relayout_decl.
index 1396eb9ced2bbf6f11a28fa96698f17274628041..4c25122d65a543314424a6495edd262bcc8b6011 100644 (file)
@@ -98,7 +98,7 @@ cc1plus-dummy$(exeext): $(CXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
 cc1plus-checksum.c : cc1plus-dummy$(exeext) build/genchecksum$(build_exeext)
        build/genchecksum$(build_exeext) cc1plus-dummy$(exeext) > $@
 
-cc1plus-checksum.o : cc1plus-checksum.c
+cc1plus-checksum.o : cc1plus-checksum.c $(CONFIG_H) $(SYSTEM_H)
 
 cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS)
        $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
index 81190a6ca156145565a3b4f1fb7ffaa317208b12..c90f1ca934012a0ea263894d0c497e2f3c819b9d 100644 (file)
@@ -1 +1,3 @@
-const unsigned char executable_checksum[16] = { 0 };
+#include "config.h"
+#include "system.h"
+EXPORTED_CONST unsigned char executable_checksum[16] = { 0 };
index 794a8db1bb10fa158edee56889355d844d837a53..def9a694a0e87d19c4ab7d5630d7069da95b6177 100644 (file)
@@ -1,6 +1,7 @@
 /* Generate code from machine description to compute values of attributes.
    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Free Software Foundation, Inc.
    Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
 
 This file is part of GCC.
@@ -1637,7 +1638,7 @@ write_length_unit_log (void)
       for (length_unit_log = 0; length_or & 1; length_or >>= 1)
        length_unit_log++;
     }
-  printf ("const int length_unit_log = %u;\n", length_unit_log);
+  printf ("EXPORTED_CONST int length_unit_log = %u;\n", length_unit_log);
 }
 
 /* Take a COND expression and see if any of the conditions in it can be
index ebcd34a29d3b919f64816d98c4ba39691e628990..fa00d0e3225b04daeae86554a4c271a6a9956c1c 100644 (file)
@@ -1,5 +1,5 @@
 /* Generate checksums of executables for PCH validation
-   Copyright (C) 2005, 2007
+   Copyright (C) 2005, 2007, 2009
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -56,7 +56,9 @@ dosum (const char *file)
       exit (1);
     }
 
-  fputs ("const unsigned char executable_checksum[16] = { ", stdout);
+  puts ("#include \"config.h\"");
+  puts ("#include \"system.h\"");
+  fputs ("EXPORTED_CONST unsigned char executable_checksum[16] = { ", stdout);
   for (i = 0; i < 16; i++)
     printf ("%#02x%s", result[i], i == 15 ? " };\n" : ", ");
 }
index c7d59fd0019635558b834b487edff7e56eb5ca08..2ec09dc880a98c6c0cbfb1b513625b46b89bdc48 100644 (file)
@@ -1,5 +1,5 @@
 /* Process source files and output type information.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
    This file is part of GCC.
@@ -964,7 +964,7 @@ write_rtx_next (void)
   int i;
 
   oprintf (f, "\n/* Used to implement the RTX_NEXT macro.  */\n");
-  oprintf (f, "const unsigned char rtx_next[NUM_RTX_CODE] = {\n");
+  oprintf (f, "EXPORTED_CONST unsigned char rtx_next[NUM_RTX_CODE] = {\n");
   for (i = 0; i < NUM_RTX_CODE; i++)
     if (rtx_next_new[i] == -1)
       oprintf (f, "  0,\n");
@@ -3028,7 +3028,7 @@ finish_root_table (struct flist *flp, const char *pfx, const char *lastname,
     size_t fnum;
     for (fnum = 0; fnum < num_lang_dirs; fnum++)
       oprintf (base_files [fnum],
-              "const struct %s * const %s[] = {\n",
+              "EXPORTED_CONST struct %s * const %s[] = {\n",
               tname, name);
   }
 
@@ -3359,7 +3359,7 @@ write_roots (pair_p variables)
        {
          fli->started_p = 1;
 
-         oprintf (f, "const struct ggc_root_tab gt_ggc_r_");
+         oprintf (f, "EXPORTED_CONST struct ggc_root_tab gt_ggc_r_");
          put_mangled_filename (f, v->line.file);
          oprintf (f, "[] = {\n");
        }
@@ -3393,7 +3393,7 @@ write_roots (pair_p variables)
        {
          fli->started_p = 1;
 
-         oprintf (f, "const struct ggc_root_tab gt_ggc_rd_");
+         oprintf (f, "EXPORTED_CONST struct ggc_root_tab gt_ggc_rd_");
          put_mangled_filename (f, v->line.file);
          oprintf (f, "[] = {\n");
        }
@@ -3437,7 +3437,7 @@ write_roots (pair_p variables)
        {
          fli->started_p = 1;
 
-         oprintf (f, "const struct ggc_cache_tab gt_ggc_rc_");
+         oprintf (f, "EXPORTED_CONST struct ggc_cache_tab gt_ggc_rc_");
          put_mangled_filename (f, v->line.file);
          oprintf (f, "[] = {\n");
        }
@@ -3473,7 +3473,7 @@ write_roots (pair_p variables)
        {
          fli->started_p = 1;
 
-         oprintf (f, "const struct ggc_root_tab gt_pch_rc_");
+         oprintf (f, "EXPORTED_CONST struct ggc_root_tab gt_pch_rc_");
          put_mangled_filename (f, v->line.file);
          oprintf (f, "[] = {\n");
        }
@@ -3509,7 +3509,7 @@ write_roots (pair_p variables)
        {
          fli->started_p = 1;
 
-         oprintf (f, "const struct ggc_root_tab gt_pch_rs_");
+         oprintf (f, "EXPORTED_CONST struct ggc_root_tab gt_pch_rs_");
          put_mangled_filename (f, v->line.file);
          oprintf (f, "[] = {\n");
        }
index 703236691f7d0d51ff144e4acb17616ec57fae6b..d3578da28dacc3ef7d871a2fe143385e29f5b315 100644 (file)
@@ -45,7 +45,7 @@ const char *const gimple_code_name[] = {
    operands vector the size of the structure minus the size of the 1
    element tree array at the end (see gimple_ops).  */
 #define DEFGSCODE(SYM, NAME, STRUCT)   (sizeof (STRUCT) - sizeof (tree)),
-const size_t gimple_ops_offset_[] = {
+EXPORTED_CONST size_t gimple_ops_offset_[] = {
 #include "gimple.def"
 };
 #undef DEFGSCODE
index a7db6bc0ab9276eef4ea2e923cf110eea5c4183f..afe61caba085e9676c88abfa3526ce3e69d56ace 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-03  Ian Lance Taylor  <iant@google.com>
+
+       * Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
+       $(SYSTEM_H).
+
 2009-05-27  Ian Lance Taylor  <iant@google.com>
 
        * Make-lang.in (cc1obj-dummy$(exeext)): Change $(COMPILER) to
index 56419eea8bb3879b0d0bd98b6fdfc0e7b81b76cd..bfe8a849091adb56906051d24abb24b985d73835 100644 (file)
@@ -59,7 +59,7 @@ cc1obj-dummy$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) dummy-checksum.o $(BACKEN
 cc1obj-checksum.c : cc1obj-dummy$(exeext) build/genchecksum$(build_exeext)
        build/genchecksum$(build_exeext) cc1obj-dummy$(exeext) > $@
 
-cc1obj-checksum.o : cc1obj-checksum.c
+cc1obj-checksum.o : cc1obj-checksum.c $(CONFIG_H) $(SYSTEM_H)
 
 cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) $(LIBDEPS)
        $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
index e2f003de069c6f34712e1df7002d8b368b2ba245..12b93aac710729eb0a5d67ede1576a3b1171c555 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-03  Ian Lance Taylor  <iant@google.com>
+
+       * Make-lang.in (cc1objplus-checksum.o): Depend upon $(CONFIG_H)
+       and $(SYSTEM_H).
+
 2009-05-27  Ian Lance Taylor  <iant@google.com>
 
        * Make-lang.in (cc1objplus-dummy$(exeext)): Change $(COMPILER) to
index 76f86e52fcba890e1b56304203561c571e86990f..2b1b80984296908888364d9efc340b1aa823f9ff 100644 (file)
@@ -61,7 +61,7 @@ cc1objplus-dummy$(exeext): $(OBJCXX_OBJS) dummy-checksum.o $(BACKEND) \
 cc1objplus-checksum.c : cc1objplus-dummy$(exeext) build/genchecksum$(build_exeext)
        build/genchecksum$(build_exeext) cc1objplus-dummy$(exeext) > $@
 
-cc1objplus-checksum.o : cc1objplus-checksum.c
+cc1objplus-checksum.o : cc1objplus-checksum.c $(CONFIG_H) $(SYSTEM_H)
 
 cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBDEPS)
        $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
index 1021b31757ac0b8784520e9f0c1ca21a707d0197..96b58f37c5ad67d9e78a34e5394099a512ff0394 100644 (file)
@@ -132,6 +132,6 @@ struct gimple_opt_pass pass_mudflap_2 =
 We prepare a little dummy struct here.
 */
 
-const struct ggc_root_tab gt_ggc_r_gt_tree_mudflap_h[] = {
+EXPORTED_CONST struct ggc_root_tab gt_ggc_r_gt_tree_mudflap_h[] = {
   LAST_GGC_ROOT_TAB
 };
index 273b59c2a18a8e51733c2809de3387290ea44530..4693ff9a5984f108efda7cf7fb1adcb39d7e7ad6 100644 (file)
@@ -1,3 +1,7 @@
+2009-06-02  Ian Lance Taylor  <iant@google.com>
+
+       * ansidecl.h (EXPORTED_CONST): Define.
+
 2009-05-31  Ian Lance Taylor  <iant@google.com>
 
        * ansidecl.h: Add extern "C" when compiling with C++.  Treat C++
index c83b8c039d9982c72604c38a7939d586885ea182..f9864cd386424ece83ec45dda3d2a2d27ae51bf2 100644 (file)
@@ -395,6 +395,18 @@ So instead we use the macro below and test it against specific values.  */
 #define __extension__
 #endif
 
+/* This is used to declare a const variable which should be visible
+   outside of the current compilation unit.  Use it as
+     EXPORTED_CONST int i = 1;
+   This is because the semantics of const are different in C and C++.
+   "extern const" is permitted in C but it looks strange, and gcc
+   warns about it when -Wc++-compat is not used.  */
+#ifdef __cplusplus
+#define EXPORTED_CONST extern const
+#else
+#define EXPORTED_CONST const
+#endif
+
 #ifdef __cplusplus
 }
 #endif