This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: include GMP/MPFR version info in "gcc -v" output


On Sat, 17 Feb 2007, Gerald Pfeifer wrote:

> On Sat, 17 Feb 2007, Kaveh R. GHAZI wrote:
>
> Excellent idea!
>
> I recommend omitting "is" in the messages aboves, perhaps also just
> write "header" instead of "header file"?
> Gerald

Thanks, I'll change it.  BTW the output looks like this:

	GNU C version 4.3.0 20070216 (experimental) (sparc-sun-solaris2.10)
	        compiled by GNU C version 3.4.6.
	GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
	GMP: header version <4.2.1>, library version <4.2.1>
	MPFR: header version <2.2.1>, library version <2.2.1>
	Compiler executable checksum: bbb8bed422408ce44673da918f10e261

Ok?

		Thanks,
		--Kaveh


2007-02-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* toplev.c (print_version): Output GMP/MPFR version info.

diff -rup orig/egcc-SVN20070216/gcc/toplev.c egcc-SVN20070216/gcc/toplev.c
--- orig/egcc-SVN20070216/gcc/toplev.c	2007-02-10 20:03:41.000000000 -0500
+++ egcc-SVN20070216/gcc/toplev.c	2007-02-17 14:05:13.232987283 -0500
@@ -1160,6 +1160,10 @@ print_version (FILE *file, const char *i
 #ifndef __VERSION__
 #define __VERSION__ "[?]"
 #endif
+  static const char fmt3[] =
+    N_("GMP: header version <%d.%d.%d>, library version <%s>\n");
+  static const char fmt4[] =
+    N_("MPFR: header version <%d.%d.%d>, library version <%s>\n");
   fprintf (file,
 	   file == stderr ? _(fmt1) : fmt1,
 	   indent, *indent != 0 ? " " : "",
@@ -1169,6 +1173,12 @@ print_version (FILE *file, const char *i
 	   file == stderr ? _(fmt2) : fmt2,
 	   indent, *indent != 0 ? " " : "",
 	   PARAM_VALUE (GGC_MIN_EXPAND), PARAM_VALUE (GGC_MIN_HEAPSIZE));
+  fprintf (file,
+	   file == stderr ? _(fmt3) : fmt3,
+	   __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL, gmp_version);
+  fprintf (file,
+	   file == stderr ? _(fmt4) : fmt4,
+	   MPFR_VERSION_MAJOR, MPFR_VERSION_MINOR, MPFR_VERSION_PATCHLEVEL, mpfr_get_version());
 }

 #ifdef ASM_COMMENT_START


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]