summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog39
-rw-r--r--gcc/Makefile.in18
-rw-r--r--gcc/cccp.c2
-rw-r--r--gcc/ch/ChangeLog4
-rw-r--r--gcc/ch/grant.c3
-rw-r--r--gcc/collect2.c3
-rw-r--r--gcc/config/alpha/alpha.c1
-rw-r--r--gcc/config/arm/aof.h1
-rw-r--r--gcc/config/arm/coff.h1
-rw-r--r--gcc/config/arm/elf.h1
-rw-r--r--gcc/config/arm/pe.h1
-rw-r--r--gcc/config/arm/tcoff.h1
-rw-r--r--gcc/config/arm/telf.h1
-rw-r--r--gcc/config/arm/tpe.h2
-rw-r--r--gcc/config/arm/vxarm.h1
-rw-r--r--gcc/config/convex/convex.c1
-rw-r--r--gcc/config/i386/dgux.c3
-rw-r--r--gcc/config/i386/sun386.h1
-rw-r--r--gcc/config/m88k/m88k.c1
-rw-r--r--gcc/config/mcore/mcore-pe.h1
-rw-r--r--gcc/config/mips/mips.h1
-rw-r--r--gcc/config/romp/romp.h3
-rw-r--r--gcc/config/sh/sh.c1
-rw-r--r--gcc/cpphash.c3
-rw-r--r--gcc/cppinit.c4
-rw-r--r--gcc/dwarf2out.c1
-rw-r--r--gcc/dwarfout.c1
-rw-r--r--gcc/f/ChangeLog4
-rw-r--r--gcc/f/g77spec.c2
-rw-r--r--gcc/gcc.c2
-rw-r--r--gcc/gcc.h2
-rw-r--r--gcc/java/ChangeLog12
-rw-r--r--gcc/java/Makefile.in18
-rw-r--r--gcc/java/gjavah.c2
-rw-r--r--gcc/java/jcf-dump.c2
-rw-r--r--gcc/java/jv-scan.c2
-rw-r--r--gcc/mips-tfile.c2
-rw-r--r--gcc/protoize.c3
-rw-r--r--gcc/toplev.c1
-rw-r--r--gcc/tree.h1
-rw-r--r--gcc/version.c2
-rw-r--r--gcc/version.h1
42 files changed, 92 insertions, 64 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 839b3ca7aea..814f7a8ae21 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,42 @@
+2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (TREE_H, collect2.o, gcc.h, mips-tfile.o, cccp.o,
+ cpphash.o, cppinit.o, protoize.o, unprotoize.o): Depend on version.h.
+
+ * cccp.c: Include version.h and/or don't declare `version_string'.
+ * collect2.c: Likewise.
+ * alpha.c: Likewise.
+ * arm/aof.h: Likewise.
+ * arm/coff.h: Likewise.
+ * arm/elf.h: Likewise.
+ * arm/pe.h: Likewise.
+ * arm/tcoff.h: Likewise.
+ * arm/telf.h: Likewise.
+ * arm/tpe.h: Likewise.
+ * arm/vxarm.h: Likewise.
+ * convex/convex.c: Likewise.
+ * i386/dgux.c: Likewise.
+ * i386/sun386.h: Likewise.
+ * m88k/m88k.c: Likewise.
+ * mcore/mcore-pe.h: Likewise.
+ * mips/mips.h: Likewise.
+ * romp/romp.h: Likewise.
+ * sh/sh.c: Likewise.
+ * cpphash.c: Likewise.
+ * cppinit.c: Likewise.
+ * dwarf2out.c: Likewise.
+ * dwarfout.c: Likewise.
+ * gcc.c: Likewise.
+ * gcc.h: Likewise.
+ * mips-tfile.c: Likewise.
+ * protoize.c: Likewise.
+ * toplev.c: Likewise.
+ * tree.h: Likewise.
+
+ * version.c (version_string): Constify a char*.
+
+ * version.h: New file.
+
2000-02-14 Nick Clifton <nickc@cygnus.com>
* configure.in: Add mcore-elf and mcore-pe targets.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 2447401d34f..03d19cb0bc8 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -752,7 +752,7 @@ CONFIG_H =
MACHMODE_H = machmode.h machmode.def
RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
RTL_H = $(RTL_BASE_H) genrtl.h
-TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h
+TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h
DEMANGLE_H = $(srcdir)/../include/demangle.h
RECOG_H = recog.h
@@ -1371,7 +1371,7 @@ collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(COLLECT2_OBJS) $(LIBS)
collect2.o : collect2.c $(CONFIG_H) system.h gstab.h intl.h \
- $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h
+ $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h version.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
-c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
@@ -1413,6 +1413,8 @@ c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
# Language-independent files.
+gcc.h: version.h
+
DRIVER_DEFINES = \
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
@@ -1638,7 +1640,7 @@ $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) ggc.h \
mips-tfile: mips-tfile.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
-mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h
+mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h version.h
mips-tdump: mips-tdump.o version.o $(LIBDEPS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
@@ -2017,7 +2019,7 @@ PREPROCESSOR_DEFINES = \
# We use $(libsubdir)/$(unlibsubdir) to match the
# -iprefix argument which gcc will pass if GCC_EXEC_PREFIX is used.
cccp.o: cccp.c $(CONFIG_H) intl.h pcp.h version.c config.status system.h \
- mbchar.h prefix.h Makefile.in
+ mbchar.h prefix.h Makefile.in version.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(PREPROCESSOR_DEFINES) \
-c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
@@ -2040,14 +2042,14 @@ cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h system.h
cppulp.o: cppulp.c $(CONFIG_H) system.h output.h
cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
-cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
+cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h version.h
cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h
cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h system.h
cppexp.o: cppexp.c $(CONFIG_H) cpplib.h intl.h system.h
cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h system.h
cppinit.o: cppinit.c $(CONFIG_H) cpplib.h intl.h system.h \
- cpphash.h prefix.h output.h Makefile
+ cpphash.h prefix.h output.h Makefile version.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(PREPROCESSOR_DEFINES) \
-c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'`
@@ -2066,13 +2068,13 @@ unprotoize$(exeext): unprotoize.o $(PROTO_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ unprotoize.o $(PROTO_OBJS) $(LIBS)
protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h \
- Makefile
+ Makefile version.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \
$(srcdir)/protoize.c
unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h \
- $(CONFIG_H) system.h Makefile
+ $(CONFIG_H) system.h Makefile version.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(DRIVER_DEFINES) $(PREPROCESSOR_DEFINES) \
$(srcdir)/unprotoize.c
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 7f2f58483c0..052a4ab5a06 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -32,6 +32,7 @@ typedef unsigned char U_CHAR;
#include "pcp.h"
#include "intl.h"
#include "prefix.h"
+#include "version.h"
#ifdef MULTIBYTE_CHARS
#include "mbchar.h"
@@ -95,7 +96,6 @@ static void hack_vms_include_specification ();
/* External declarations. */
-extern char *version_string;
HOST_WIDEST_INT parse_escape PARAMS ((char **, HOST_WIDEST_INT));
HOST_WIDEST_INT parse_c_expression PARAMS ((char *, int));
diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog
index d72bff28c52..269b6004ebb 100644
--- a/gcc/ch/ChangeLog
+++ b/gcc/ch/ChangeLog
@@ -1,3 +1,7 @@
+2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * grant.c: Don't declare `version_string'.
+
2000-02-11 Nathan Sidwell <nathan@acm.org>
* decl.c (init_decl_processing): Remove duplicate decl of
diff --git a/gcc/ch/grant.c b/gcc/ch/grant.c
index 4cbe7d4ce98..6d4bb60303f 100644
--- a/gcc/ch/grant.c
+++ b/gcc/ch/grant.c
@@ -57,9 +57,6 @@ int chill_at_module_level = 0;
/* mark that a SPEC MODULE was generated */
static int spec_module_generated = 0;
-/* define version strings */
-extern char *version_string;
-
/* define a faster string handling */
typedef struct
{
diff --git a/gcc/collect2.c b/gcc/collect2.c
index e9c9181c15f..f69d56a78d6 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -52,6 +52,7 @@ Boston, MA 02111-1307, USA. */
#include "demangle.h"
#include "obstack.h"
#include "intl.h"
+#include "version.h"
/* Obstack allocation and deallocation routines. */
#define obstack_chunk_alloc xmalloc
@@ -184,8 +185,6 @@ enum pass {
PASS_SECOND /* with constructors linked in */
};
-extern char *version_string;
-
int vflag; /* true if -v */
static int rflag; /* true if -r */
static int strip_flag; /* true if -s */
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 36f831d648c..f3ff40583f2 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -44,7 +44,6 @@ Boston, MA 02111-1307, USA. */
#include "tm_p.h"
/* External data. */
-extern char *version_string;
extern int rtx_equal_function_value_matters;
/* Specify which cpu to schedule for. */
diff --git a/gcc/config/arm/aof.h b/gcc/config/arm/aof.h
index 43518bc92d4..9f67fc39c9d 100644
--- a/gcc/config/arm/aof.h
+++ b/gcc/config/arm/aof.h
@@ -174,7 +174,6 @@ do { \
#define ASM_FILE_START(STREAM) \
{ \
- extern char *version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for ARM/%s\n", \
ASM_COMMENT_START, version_string, ARM_OS_NAME); \
fprintf ((STREAM), "__r0\tRN\t0\n"); \
diff --git a/gcc/config/arm/coff.h b/gcc/config/arm/coff.h
index 4029eed0b13..f98674bc36a 100644
--- a/gcc/config/arm/coff.h
+++ b/gcc/config/arm/coff.h
@@ -67,7 +67,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n", \
ASM_COMMENT_START, version_string); \
fprintf (STREAM, ASM_APP_OFF); \
diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h
index 3e068913485..71b36d2b8bf 100644
--- a/gcc/config/arm/elf.h
+++ b/gcc/config/arm/elf.h
@@ -198,7 +198,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/elf\n", \
ASM_COMMENT_START, version_string); \
output_file_directive (STREAM, main_input_filename); \
diff --git a/gcc/config/arm/pe.h b/gcc/config/arm/pe.h
index 66dfc6b2b10..41a3ceb24a1 100644
--- a/gcc/config/arm/pe.h
+++ b/gcc/config/arm/pe.h
@@ -175,7 +175,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
asm_fprintf (STREAM, "%@ Generated by gcc %s for ARM/pe\n",\
version_string); \
output_file_directive ((STREAM), main_input_filename); \
diff --git a/gcc/config/arm/tcoff.h b/gcc/config/arm/tcoff.h
index 5f14c1e3283..37870022d1e 100644
--- a/gcc/config/arm/tcoff.h
+++ b/gcc/config/arm/tcoff.h
@@ -60,7 +60,6 @@ extern int arm_structure_size_boundary;
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
- extern char *version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for Thumb/coff\n", \
ASM_COMMENT_START, version_string); \
fprintf ((STREAM), ASM_APP_OFF); \
diff --git a/gcc/config/arm/telf.h b/gcc/config/arm/telf.h
index fbf5212ff96..bb199ac8d29 100644
--- a/gcc/config/arm/telf.h
+++ b/gcc/config/arm/telf.h
@@ -67,7 +67,6 @@ extern int arm_structure_size_boundary;
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for Thumb/elf\n", \
ASM_COMMENT_START, version_string); \
fprintf ((STREAM), ASM_APP_OFF); \
diff --git a/gcc/config/arm/tpe.h b/gcc/config/arm/tpe.h
index 526cd36bb64..c7f0683d8ee 100644
--- a/gcc/config/arm/tpe.h
+++ b/gcc/config/arm/tpe.h
@@ -91,7 +91,6 @@ extern int arm_structure_size_boundary;
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
- extern char * version_string; \
fprintf ((STREAM), "%s Generated by gcc %s for Thumb/coff\n", \
ASM_COMMENT_START, version_string); \
fprintf ((STREAM), ASM_APP_OFF); \
@@ -301,7 +300,6 @@ do { \
#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/pe\n", \
ASM_COMMENT_START, version_string); \
output_file_directive ((STREAM), main_input_filename); \
diff --git a/gcc/config/arm/vxarm.h b/gcc/config/arm/vxarm.h
index b42bbbec00c..53381b937c0 100644
--- a/gcc/config/arm/vxarm.h
+++ b/gcc/config/arm/vxarm.h
@@ -67,7 +67,6 @@ Boston, MA 02111-1307, USA. */
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for ARM/VxWorks\n", \
ASM_COMMENT_START, version_string); \
} while (0)
diff --git a/gcc/config/convex/convex.c b/gcc/config/convex/convex.c
index 69e1339367b..6230478d4e0 100644
--- a/gcc/config/convex/convex.c
+++ b/gcc/config/convex/convex.c
@@ -472,7 +472,6 @@ asm_declare_function_name (file, name, decl)
const char *p;
char c;
- extern char *version_string;
static char vers[4];
int i;
diff --git a/gcc/config/i386/dgux.c b/gcc/config/i386/dgux.c
index 55ff8241c38..915719d1c5a 100644
--- a/gcc/config/i386/dgux.c
+++ b/gcc/config/i386/dgux.c
@@ -22,9 +22,6 @@ Boston, MA 02111-1307, USA. */
#include <time.h>
#include "i386/i386.c"
-
-extern char *version_string;
-
struct lang_independent_option
{
char *string;
diff --git a/gcc/config/i386/sun386.h b/gcc/config/i386/sun386.h
index 8171b8936fb..c7bd415c2c1 100644
--- a/gcc/config/i386/sun386.h
+++ b/gcc/config/i386/sun386.h
@@ -57,7 +57,6 @@ do \
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
- extern char *version_string; \
{ \
int len = strlen (main_input_filename); \
char *na = main_input_filename + len; \
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c
index 4e3ce2c94c3..6c00fac2e3c 100644
--- a/gcc/config/m88k/m88k.c
+++ b/gcc/config/m88k/m88k.c
@@ -41,7 +41,6 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h"
#include "tm_p.h"
-extern char *version_string;
extern int flag_traditional;
extern FILE *asm_out_file;
diff --git a/gcc/config/mcore/mcore-pe.h b/gcc/config/mcore/mcore-pe.h
index 89d4e6128b5..8098c8531af 100644
--- a/gcc/config/mcore/mcore-pe.h
+++ b/gcc/config/mcore/mcore-pe.h
@@ -154,7 +154,6 @@ rdata_section () \
#define ASM_FILE_START(STREAM) \
do \
{ \
- extern char * version_string; \
fprintf (STREAM, "%s Generated by gcc %s for MCore/pe\n", \
ASM_COMMENT_START, version_string); \
output_file_directive ((STREAM), main_input_filename); \
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index bc975ef20b4..437cf060b15 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -30,7 +30,6 @@ extern char call_used_regs[];
extern int may_call_alloca;
extern char **save_argv;
extern int target_flags;
-extern char *version_string;
/* MIPS external variables defined in mips.c. */
diff --git a/gcc/config/romp/romp.h b/gcc/config/romp/romp.h
index 25a6474730e..cc2914d9ab5 100644
--- a/gcc/config/romp/romp.h
+++ b/gcc/config/romp/romp.h
@@ -1360,8 +1360,7 @@ struct rt_cargs {int gregs, fregs; };
/* Output at beginning of assembler file. */
#define ASM_FILE_START(FILE) \
-{ extern char *version_string; \
- const char *p; \
+{ const char *p; \
\
fprintf (FILE, "\t.globl .oVncs\n\t.set .oVncs,0\n") ; \
fprintf (FILE, "\t.globl .oVgcc"); \
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 3f1f8b12b9f..d039650afe1 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -74,7 +74,6 @@ int current_function_anonymous_args;
/* Global variables from toplev.c and final.c that are used within, but
not declared in any header file. */
-extern char *version_string;
extern int *insn_addresses;
/* Global variables for machine-dependent things. */
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index fc2b8ff76d5..863240b4b20 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -27,6 +27,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
+#include "version.h"
#undef abort
static unsigned int hashf PARAMS ((const U_CHAR *, int));
@@ -45,8 +46,6 @@ static void special_symbol PARAMS ((HASHNODE *, cpp_reader *));
#define CPP_IS_MACRO_BUFFER(PBUF) ((PBUF)->data != NULL)
#define FORWARD(N) CPP_FORWARD (CPP_BUFFER (pfile), (N))
-extern char *version_string;
-
/* The arglist structure is built by create_definition to tell
collect_expansion where the argument names begin. That
is, for a define like "#define f(x,y,z) foo+x-bar*y", the arglist
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index d941546b1ba..b7d230197f4 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -27,9 +27,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "output.h"
#include "prefix.h"
#include "intl.h"
-
-/* XXX Should be in a header file. */
-extern char *version_string;
+#include "version.h"
/* Predefined symbols, built-in macros, and the default include path. */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index b12dc0a3803..183038de2e4 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2126,7 +2126,6 @@ limbo_die_node;
language, and compiler version. */
extern int flag_traditional;
-extern char *version_string;
/* Fixed size portion of the DWARF compilation unit header. */
#define DWARF_COMPILE_UNIT_HEADER_SIZE (2 * DWARF_OFFSET_SIZE + 3)
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index a0ac42d8c70..c6fcbe6b72c 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -106,7 +106,6 @@ extern time_t time PARAMS ((time_t *)); /* FIXME: use NEED_DECLARATION_TIME */
&& decl == TYPE_STUB_DECL (TREE_TYPE (decl))))
extern int flag_traditional;
-extern char *version_string;
/* Maximum size (in bytes) of an artificially generated label. */
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 020c7a7fe8f..68e748e6a28 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,7 @@
+Tue Feb 15 11:14:17 2000 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * g77spec.c: Don't declare `version_string'.
+
Sat Feb 5 23:27:25 2000 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* com.c (mark_tracker_head, mark_binding_level): Protoize.
diff --git a/gcc/f/g77spec.c b/gcc/f/g77spec.c
index 505bc12b0bb..26d78b45b17 100644
--- a/gcc/f/g77spec.c
+++ b/gcc/f/g77spec.c
@@ -96,8 +96,6 @@ static int g77_newargc;
static char **real_g77_newargv;
static const char **g77_newargv;
-extern char *version_string;
-
/* --- This comes from gcc.c (2.8.1) verbatim: */
/* This defines which switch letters take arguments. */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 6ad53f01c27..b8f3ddbaaf7 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -189,8 +189,6 @@ static struct obstack collect_obstack;
static struct rusage rus, prus;
#endif
-extern char *version_string;
-
/* Forward declaration for prototypes. */
struct path_prefix;
diff --git a/gcc/gcc.h b/gcc/gcc.h
index 3e870e2b590..64b954647d3 100644
--- a/gcc/gcc.h
+++ b/gcc/gcc.h
@@ -21,6 +21,8 @@ Boston, MA 02111-1307, USA. */
#ifndef __GCC_H__
#define __GCC_H__
+#include "version.h"
+
/* These are exported by gcc.c. */
extern int do_spec PARAMS ((const char *));
extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 31d62017d6b..315cf0b9182 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,15 @@
+2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
+ version.o.
+ (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
+
+ * gjavah.c: Include version.h.
+
+ * jcf-dump.c: Likewise.
+
+ * jv-scan.c: Likewise.
+
2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* except.c (check_start_handlers): Re-add prototype lost in last
diff --git a/gcc/java/Makefile.in b/gcc/java/Makefile.in
index 82a0b422cdf..07e4f22db5f 100644
--- a/gcc/java/Makefile.in
+++ b/gcc/java/Makefile.in
@@ -177,23 +177,23 @@ compiler: ../jc1$(exeext) ../jv-scan$(exeext)
../jc1$(exeext): $(P) $(JAVA_OBJS) $(OBJDEPS) $(LIBDEPS)
rm -f ../jc1$(exeext)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS) $(OBJS) $(LIBS)
-../jv-scan$(exeext): $(P) $(JAVA_OBJS_LITE) $(OBJDEPS) $(LIBDEPS)
+../jv-scan$(exeext): $(P) $(JAVA_OBJS_LITE) $(OBJDEPS) ../version.o $(LIBDEPS)
rm -f ../jv-scan$(exeext)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS_LITE) $(LIBS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JAVA_OBJS_LITE) ../version.o $(LIBS)
../jcf-dump$(exeext): jcf-dump.o jcf-io.o jcf-depend.o jcf-path.o \
- zextract.o $(LIBDEPS)
+ zextract.o ../version.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jcf-dump.o jcf-io.o \
- jcf-depend.o jcf-path.o zextract.o ../errors.o $(LIBS)
+ jcf-depend.o jcf-path.o zextract.o ../errors.o ../version.o $(LIBS)
# Dependencies here must be kept in sync with dependencies in Make-lang.in.
../jvgenmain$(exeext): jvgenmain.o mangle.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ jvgenmain.o mangle.o $(LIBS)
../gcjh$(exeext): gjavah.o jcf-io.o jcf-depend.o jcf-path.o \
- zextract.o $(LIBDEPS)
+ zextract.o ../version.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gjavah.o jcf-io.o \
- jcf-depend.o jcf-path.o zextract.o ../errors.o $(LIBS)
+ jcf-depend.o jcf-path.o zextract.o ../errors.o ../version.o $(LIBS)
Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
cd ..; $(SHELL) config.status
@@ -264,9 +264,9 @@ force:
parse.o : $(PARSE_C) jcf-reader.c $(CONFIG_H) $(srcdir)/../system.h \
$(srcdir)/../function.h $(JAVA_TREE_H)
jcf-dump.o : $(CONFIG_H) $(srcdir)/../system.h $(JAVA_TREE_H) jcf-dump.c \
- jcf-reader.c jcf.h javaop.h javaop.def
+ jcf-reader.c jcf.h javaop.h javaop.def $(srcdir)/../version.h
gjavah.o : $(CONFIG_H) $(srcdir)/../system.h $(JAVA_TREE_H) gjavah.c \
- jcf-reader.c jcf.h javaop.h
+ jcf-reader.c jcf.h javaop.h $(srcdir)/../version.h
buffer.o : buffer.c $(CONFIG_H) buffer.h $(srcdir)/../gansidecl.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h
check-init.o : check-init.c $(CONFIG_H) $(srcdir)/../gansidecl.h \
@@ -294,7 +294,7 @@ jcf-parse.o : jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(srcdir)/../flags.h \
$(srcdir)/../toplev.h $(PARSE_H)
jcf-write.o : jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(RTL_H) \
java-opcodes.h parse.h buffer.h $(srcdir)/../system.h $(srcdir)/../toplev.h
-jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h
+jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h $(srcdir)/../version.h
jvgenmain.o : jvgenmain.c $(CONFIG_H) $(srcdir)/../system.h
lang.o : lang.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../input.h \
$(srcdir)/../toplev.h $(srcdir)/../system.h $(RTL_H) $(EXPR_H)
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 7cc004f60eb..c679491dc09 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -34,8 +34,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "java-tree.h"
#include "java-opcodes.h"
-#include "version.c"
-
#include <getopt.h>
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index 28092d2d519..9d3f8297f4d 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -53,7 +53,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "tree.h"
#include "java-tree.h"
-#include "version.c"
+#include "version.h"
#include <getopt.h>
diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c
index d7c5a0ccab5..f803e2cfe6f 100644
--- a/gcc/java/jv-scan.c
+++ b/gcc/java/jv-scan.c
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "obstack.h" /* We use obstacks in lex.c */
-#include "version.c"
+#include "version.h"
#include <getopt.h>
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
index 073e7311c52..abedec870b8 100644
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -601,6 +601,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
+#include "version.h"
#ifndef __SABER__
#define saber_stop()
@@ -1697,7 +1698,6 @@ extern long strtol __proto((const char *, char **, int));
extern char *optarg;
extern int optind;
extern int opterr;
-extern char *version_string;
/* List of assembler pseudo ops and beginning sequences that need
special actions. Someday, this should be a hash table, and such,
diff --git a/gcc/protoize.c b/gcc/protoize.c
index b508a5d1979..77d71ef589a 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */
#include <unistd.h>
#endif
#undef abort
+#include "version.h"
/* Include getopt.h for the sake of getopt_long. */
#include "getopt.h"
@@ -53,8 +54,6 @@ Boston, MA 02111-1307, USA. */
#define CPLUS_FILE_SUFFIX "C"
#endif
-extern char *version_string;
-
static void usage PARAMS ((void)) ATTRIBUTE_NORETURN;
static void aux_info_corrupted PARAMS ((void)) ATTRIBUTE_NORETURN;
static void declare_source_confusing PARAMS ((const char *)) ATTRIBUTE_NORETURN;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 7a3d02b1183..4d9eb8a8e53 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -141,7 +141,6 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#ifdef NEED_DECLARATION_ENVIRON
extern char **environ;
#endif
-extern char *version_string;
/* Carry information from ASM_DECLARE_OBJECT_NAME
to ASM_FINISH_DECLARE_OBJECT. */
diff --git a/gcc/tree.h b/gcc/tree.h
index b27f0e09dbf..8ea2204408f 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -19,6 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "machmode.h"
+#include "version.h"
#ifndef RTX_CODE
struct rtx_def;
diff --git a/gcc/version.c b/gcc/version.c
index a924d0c65e6..3e1cbb59fec 100644
--- a/gcc/version.c
+++ b/gcc/version.c
@@ -1 +1 @@
-char *version_string = "2.96 20000215 (experimental)";
+const char *const version_string = "2.96 20000215 (experimental)";
diff --git a/gcc/version.h b/gcc/version.h
new file mode 100644
index 00000000000..86a5c28ed52
--- /dev/null
+++ b/gcc/version.h
@@ -0,0 +1 @@
+extern const char *const version_string;