aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-09-12 10:51:35 +0000
committerNathan Sidwell <nathan@codesourcery.com>2006-09-12 10:51:35 +0000
commit666c074b3543680e00ff62c6fefc24b2258f4aa6 (patch)
tree7e95dfee454f131d6b069bea2d98b06156f55cda
parent1f013802d654accdc48f9d6db0b49324643cf1b4 (diff)
gcc/
* configure.ac: Replace --with-versuffix with --with-pkgversion. * version.c (version_string): Remove VERSUFFIX. (pkgversion_string): New. * version.h (pkgversion_string): Declare. * Makefile.in (VERSUFFIX_s): Replace with ... (PKGVERSION_s): ... this. (version.o): Adjust. * configure: Rebuilt. * gcc.c (process_command, main): Check for pkgversion_string. * gcov.c (print_version): Likewise. * gcov-dump.c (print_version): Likewise. * mips-tdump.c (main): Likewise. * mips-tfile.c (main): Likewise. * toplev.c (compile_file, print_version): Likewise. * protoize.c (main): Likewise. gcc/java/ * jv-scan.c (version): Check pkgversion_string. * jcf-dump.c (version): Likewise. * gjavah.c (version): Likewise. gcc/fortran/ (lang_specific_driver): Check pkgversion_string. gcc/treelang/ * tree1.c (treelanf_handle_option): Check pkgversion_string. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@116887 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.csl31
-rw-r--r--gcc/Makefile.in4
-rwxr-xr-xgcc/configure28
-rw-r--r--gcc/configure.ac20
-rw-r--r--gcc/fortran/gfortranspec.c21
-rw-r--r--gcc/gcc.c13
-rw-r--r--gcc/gcov-dump.c6
-rw-r--r--gcc/gcov.c6
-rw-r--r--gcc/java/gjavah.c6
-rw-r--r--gcc/java/jcf-dump.c6
-rw-r--r--gcc/java/jv-scan.c6
-rw-r--r--gcc/mips-tdump.c6
-rw-r--r--gcc/mips-tfile.c6
-rw-r--r--gcc/protoize.c3
-rw-r--r--gcc/toplev.c17
-rw-r--r--gcc/treelang/tree1.c2
-rw-r--r--gcc/version.c5
-rw-r--r--gcc/version.h1
18 files changed, 133 insertions, 54 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 28062c8f8a6..1225313a69e 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,34 @@
+2006-09-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ gcc/
+ * configure.ac: Replace --with-versuffix with --with-pkgversion.
+ * version.c (version_string): Remove VERSUFFIX.
+ (pkgversion_string): New.
+ * version.h (pkgversion_string): Declare.
+ * Makefile.in (VERSUFFIX_s): Replace with ...
+ (PKGVERSION_s): ... this.
+ (version.o): Adjust.
+ * configure: Rebuilt.
+
+ * gcc.c (process_command, main): Check for pkgversion_string.
+ * gcov.c (print_version): Likewise.
+ * gcov-dump.c (print_version): Likewise.
+ * mips-tdump.c (main): Likewise.
+ * mips-tfile.c (main): Likewise.
+ * toplev.c (compile_file, print_version): Likewise.
+ * protoize.c (main): Likewise.
+
+ gcc/java/
+ * jv-scan.c (version): Check pkgversion_string.
+ * jcf-dump.c (version): Likewise.
+ * gjavah.c (version): Likewise.
+
+ gcc/fortran/
+ (lang_specific_driver): Check pkgversion_string.
+
+ gcc/treelang/
+ * tree1.c (treelanf_handle_option): Check pkgversion_string.
+
2006-09-11 Paul Brook <paul@codesourcery.com>
gcc/
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index fda13815696..578d3bc2eeb 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -718,7 +718,7 @@ version := $(BASEVER_c)
BASEVER_s := "\"$(BASEVER_c)\""
DEVPHASE_s := "\"$(if $(DEVPHASE_c), ($(DEVPHASE_c)))\""
DATESTAMP_s := "\"$(if $(DEVPHASE_c), $(DATESTAMP_c))\""
-VERSUFFIX_s := "\"@VERSUFFIX@\""
+PKGVERSION_s:= "\"@PKGVERSION@\""
BUGURL_s := "\"@BUGURL@\""
# Shorthand variables for dependency lists.
@@ -1686,7 +1686,7 @@ dumpvers: dumpvers.c
version.o: version.c version.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
-DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
- -DDEVPHASE=$(DEVPHASE_s) -DVERSUFFIX=$(VERSUFFIX_s) \
+ -DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
-DBUGURL=$(BUGURL_s) -c $(srcdir)/version.c $(OUTPUT_OPTION)
gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
diff --git a/gcc/configure b/gcc/configure
index 7c13649924c..2bb05cb6ab0 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep VERSUFFIX BUGURL datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION BUGURL datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump ORIGINAL_OBJDUMP_FOR_TARGET libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
ac_subst_files='language_hooks'
# Initialize some variables set by options.
@@ -927,7 +927,7 @@ Optional Packages:
--with-build-sysroot=sysroot
use sysroot as the system root during the build
--with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
- --with-versuffix=SFX Append SFX to the version string
+ --with-pkgversion=PKG Add PKG to the version string
--with-bugurl=URL Direct users to URL to report a bug
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
@@ -7021,22 +7021,20 @@ else
fi;
-# The trailing component of the string reported as the version number
-# by all components of the compiler. For an official FSF release, it
-# is empty.
+# Package version. For an official FSF release, it is empty.
-# Check whether --with-versuffix or --without-versuffix was given.
-if test "${with_versuffix+set}" = set; then
- withval="$with_versuffix"
+# Check whether --with-pkgversion or --without-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then
+ withval="$with_pkgversion"
case "$withval" in
- yes) { { echo "$as_me:$LINENO: error: version suffix not specified" >&5
-echo "$as_me: error: version suffix not specified" >&2;}
+ yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
+echo "$as_me: error: package version not specified" >&2;}
{ (exit 1); exit 1; }; } ;;
- no) VERSUFFIX=" (CodeSourcery Unofficial)" ;;
- *) VERSUFFIX=" ($withval)" ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION=" ($withval)" ;;
esac
else
- VERSUFFIX=
+ PKGVERSION=
fi;
@@ -7540,7 +7538,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
- echo "configure:7543: version of makeinfo is $ac_prog_version" >&5
+ echo "configure:7541: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)
@@ -17292,7 +17290,7 @@ s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
s,@onestep@,$onestep,;t t
-s,@VERSUFFIX@,$VERSUFFIX,;t t
+s,@PKGVERSION@,$PKGVERSION,;t t
s,@BUGURL@,$BUGURL,;t t
s,@datarootdir@,$datarootdir,;t t
s,@docdir@,$docdir,;t t
diff --git a/gcc/configure.ac b/gcc/configure.ac
index ed19b7bfa3a..dd490557089 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -746,20 +746,18 @@ esac],
[onestep=""])
AC_SUBST(onestep)
-# The trailing component of the string reported as the version number
-# by all components of the compiler. For an official FSF release, it
-# is empty.
-AC_ARG_WITH(versuffix,
- AS_HELP_STRING([--with-versuffix=SFX],
- [Append SFX to the version string]),
+# Package version. For an official FSF release, it is empty.
+AC_ARG_WITH(pkgversion,
+ AS_HELP_STRING([--with-pkgversion=PKG],
+ [Add PKG to the version string]),
[case "$withval" in
- yes) AC_MSG_ERROR([version suffix not specified]) ;;
- no) VERSUFFIX=" (CodeSourcery Unofficial)" ;;
- *) VERSUFFIX=" ($withval)" ;;
+ yes) AC_MSG_ERROR([package version not specified]) ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION=" ($withval)" ;;
esac],
- VERSUFFIX=
+ PKGVERSION=
)
-AC_SUBST(VERSUFFIX)
+AC_SUBST(PKGVERSION)
# The location to which bugs should be reported.
AC_ARG_WITH(bugurl,
diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c
index 0037f2aaf6b..8ba3f0580ed 100644
--- a/gcc/fortran/gfortranspec.c
+++ b/gcc/fortran/gfortranspec.c
@@ -346,16 +346,23 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
break;
case OPTION_version:
- printf ("GNU Fortran 95 (GCC) %s\n", version_string);
- printf ("Copyright %s 2006 Free Software Foundation, Inc.\n\n",
- _("(C)"));
- printf (_("GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\
+ {
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+
+ printf ("GNU Fortran 95%s %s\n", pkg_version, version_string);
+ printf ("Copyright %s 2006 Free Software Foundation, Inc.\n\n",
+ _("(C)"));
+ printf (_("GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\
You may redistribute copies of GNU Fortran\n\
under the terms of the GNU General Public License.\n\
For more information about these matters, see the file named COPYING\n\n"));
- exit (0);
- break;
-
+ exit (0);
+ break;
+ }
+
case OPTION_help:
/* Let gcc.c handle this, as it has a really
cool facility for handling --help and --verbose --help. */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 48d940c154a..1402338db18 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3440,8 +3440,13 @@ process_command (int argc, const char **argv)
}
else if (strcmp (argv[i], "-fversion") == 0)
{
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+
/* translate_options () has turned --version into -fversion. */
- printf (_("%s (GCC) %s\n"), programname, version_string);
+ printf (_("%s%s %s\n"), programname, pkg_version, version_string);
printf ("Copyright %s 2006 Free Software Foundation, Inc.\n",
_("(C)"));
fputs (_("This is free software; see the source for copying conditions. There is NO\n\
@@ -6431,10 +6436,10 @@ main (int argc, const char **argv)
if (! strncmp (version_string, compiler_version, n)
&& compiler_version[n] == 0)
- notice ("gcc version %s\n", version_string);
+ notice ("gcc version %s%s\n", version_string, pkgversion_string);
else
- notice ("gcc driver version %s executing gcc version %s\n",
- version_string, compiler_version);
+ notice ("gcc driver version %s%s executing gcc version %s\n",
+ version_string, pkgversion_string, compiler_version);
if (n_infiles == 0)
return (0);
diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c
index f2dbac81454..77a3ee95f95 100644
--- a/gcc/gcov-dump.c
+++ b/gcc/gcov-dump.c
@@ -120,7 +120,11 @@ print_usage (void)
static void
print_version (void)
{
- printf ("gcov-dump (GCC) %s\n", version_string);
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+ printf ("gcov-dump%s %s\n", pkg_version, version_string);
printf ("Copyright (C) 2006 Free Software Foundation, Inc.\n");
printf ("This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or \n"
diff --git a/gcc/gcov.c b/gcc/gcov.c
index ff583cc786d..eb9c3ae50f6 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -410,7 +410,11 @@ print_usage (int error_p)
static void
print_version (void)
{
- fnotice (stdout, "gcov (GCC) %s\n", version_string);
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+ fnotice (stdout, "gcov%s %s\n", pkg_version, version_string);
fprintf (stdout, "Copyright %s 2006 Free Software Foundation, Inc.\n",
_("(C)"));
fnotice (stdout,
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 35bcdea386c..40cefdf17bc 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -2402,7 +2402,11 @@ help (void)
static void
version (void)
{
- printf (TOOLNAME " (GCC) %s\n\n", version_string);
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+ printf (TOOLNAME "%s %s\n\n", pkg_version, version_string);
printf ("Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)"));
printf (_("This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"));
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index b02dfceabe2..f94f0f4c316 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -927,7 +927,11 @@ help (void)
static void
version (void)
{
- printf ("jcf-dump (GCC) %s\n\n", version_string);
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+ printf ("jcf-dump%s %s\n\n", pkg_version, version_string);
printf ("Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)"));
printf (_("This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"));
diff --git a/gcc/java/jv-scan.c b/gcc/java/jv-scan.c
index cb2baceba4a..581a3ab87d8 100644
--- a/gcc/java/jv-scan.c
+++ b/gcc/java/jv-scan.c
@@ -125,7 +125,11 @@ help (void)
static void
version (void)
{
- printf ("jv-scan (GCC) %s\n\n", version_string);
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+ printf ("jv-scan%s %s\n\n", pkg_version, version_string);
printf ("Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)"));
printf (_("This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"));
diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c
index 6cdbcfe48ba..e84d1de1a18 100644
--- a/gcc/mips-tdump.c
+++ b/gcc/mips-tdump.c
@@ -1411,7 +1411,11 @@ main (int argc, char **argv)
if (version)
{
- printf ("mips-tdump (GCC) %s\n", version_string);
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+ printf ("mips-tdump%s %s\n", pkg_version, version_string);
fputs ("Copyright (C) 2006 Free Software Foundation, Inc.\n", stdout);
fputs ("This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n",
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
index 3d998f4e571..3acbf199e8b 100644
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -4766,7 +4766,11 @@ main (int argc, char **argv)
if (version)
{
- printf (_("mips-tfile (GCC) %s\n"), version_string);
+ const char *pkg_version = " (GCC)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+ printf (_("mips-tfile%s %s\n"), pkg_version, version_string);
fputs ("Copyright (C) 2006 Free Software Foundation, Inc.\n", stdout);
fputs (_("This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"),
diff --git a/gcc/protoize.c b/gcc/protoize.c
index f67fc4de51a..acc6deda15c 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -4525,7 +4525,8 @@ main (int argc, char **const argv)
else
{
if (version_flag)
- fprintf (stderr, "%s: %s\n", pname, version_string);
+ fprintf (stderr, "%s: %s%s\n",
+ pname, version_string, pkgversion_string);
do_processing ();
}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index a09375904f8..7e2a39135c3 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1043,8 +1043,15 @@ compile_file (void)
string is patterned after the ones produced by native SVR4 compilers. */
#ifdef IDENT_ASM_OP
if (!flag_no_ident)
- fprintf (asm_out_file, "%s\"GCC: (GNU) %s\"\n",
- IDENT_ASM_OP, version_string);
+ {
+ const char *pkg_version = " (GNU)";
+
+ if (pkgversion_string[0])
+ pkg_version = pkgversion_string;
+
+ fprintf (asm_out_file, "%s\"GCC:%s %s\"\n",
+ IDENT_ASM_OP, pkg_version, version_string);
+ }
#endif
/* This must be at the end. Some target ports emit end of file directives
@@ -1112,9 +1119,9 @@ print_version (FILE *file, const char *indent)
{
static const char fmt1[] =
#ifdef __GNUC__
- N_("%s%s%s version %s (%s)\n%s\tcompiled by GNU C version %s.\n")
+ N_("%s%s%s%s version %s (%s)\n%s\tcompiled by GNU C version %s.\n")
#else
- N_("%s%s%s version %s (%s) compiled by CC.\n")
+ N_("%s%s%s%s version %s (%s) compiled by CC.\n")
#endif
;
static const char fmt2[] =
@@ -1125,7 +1132,7 @@ print_version (FILE *file, const char *indent)
fprintf (file,
file == stderr ? _(fmt1) : fmt1,
indent, *indent != 0 ? " " : "",
- lang_hooks.name, version_string, TARGET_NAME,
+ lang_hooks.name, pkgversion_string, version_string, TARGET_NAME,
indent, __VERSION__);
fprintf (file,
file == stderr ? _(fmt2) : fmt2,
diff --git a/gcc/treelang/tree1.c b/gcc/treelang/tree1.c
index cec2baf717d..b3b82f2bed1 100644
--- a/gcc/treelang/tree1.c
+++ b/gcc/treelang/tree1.c
@@ -108,6 +108,8 @@ treelang_handle_option (size_t scode, const char *arg ATTRIBUTE_UNUSED,
if (!version_done)
{
fputs (language_string, stdout);
+ if (pkgversion_string[0])
+ fputs (pkgversion_string, stdout);
fputs (version_string, stdout);
fputs ("\n", stdout);
version_done = 1;
diff --git a/gcc/version.c b/gcc/version.c
index a7979302b21..eedd21728b2 100644
--- a/gcc/version.c
+++ b/gcc/version.c
@@ -10,6 +10,7 @@
const char bug_report_url[] = BUGURL;
/* The complete version string, assembled from several pieces.
- BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */
+ BASEVER, DATESTAMP and DEVPHASE are defined by the Makefile. */
-const char version_string[] = BASEVER DATESTAMP DEVPHASE VERSUFFIX;
+const char version_string[] = BASEVER DATESTAMP DEVPHASE;
+const char pkgversion_string[] = PKGVERSION;
diff --git a/gcc/version.h b/gcc/version.h
index 8e944ccdef6..88919039d96 100644
--- a/gcc/version.h
+++ b/gcc/version.h
@@ -1,5 +1,6 @@
#ifndef GCC_VERSION_H
#define GCC_VERSION_H
extern const char version_string[];
+extern const char pkgversion_string[];
extern const char bug_report_url[];
#endif /* ! GCC_VERSION_H */