+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.
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) \
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) \
#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 },
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);
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);
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);
}
/* 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 },
/* 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.
/*****************************************************************************/
/* Table of machine attributes. */
-const struct attribute_spec crx_attribute_table[];
+EXPORTED_CONST struct attribute_spec crx_attribute_table[];
/*****************************************************************************/
/* TARGETM FUNCTION PROTOTYPES */
else
emit_jump_insn (gen_pop_and_popret_return (GEN_INT (sum_regs)));
}
-
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 },
/* 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.
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);
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);
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 *,
};
/* 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 },
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);
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 *);
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. */
#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
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 *);
+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.
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 $@ \
-const unsigned char executable_checksum[16] = { 0 };
+#include "config.h"
+#include "system.h"
+EXPORTED_CONST unsigned char executable_checksum[16] = { 0 };
/* 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.
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
/* 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.
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" : ", ");
}
/* 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.
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");
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);
}
{
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");
}
{
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");
}
{
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");
}
{
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");
}
{
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");
}
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
+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
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 $@ \
+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
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 $@ \
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
};
+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++
#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