Kaveh R. GHAZI - [PATCH]: include GMP/MPFR version info in "gcc -v" output (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: "Kaveh R. GHAZI"
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 17 Feb 2007 14:06:08 -0500 (EST)
- Subject: [PATCH]: include GMP/MPFR version info in "gcc -v" output
I've come across situations where we need to determine the versions of GMP and/or MPFR that got used in GCC. This can be especially problematic in cases where multiple versions are installed on the system in question and/or shared libraries are involved. Also when receiving bug reports related to these libraries we'll need this info. For example, see: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30816#c16
Tested via "make" and "gcc -v" on a .c file to view the output.
Okay for mainline?
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 file is version <%d.%d.%d>, library is version <%s>\n");
- static const char fmt4[] =
- N_("MPFR: header file is version <%d.%d.%d>, library is 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
- Follow-Ups:
- Re: [PATCH]: include GMP/MPFR version info in "gcc -v" output
* From: Gerald Pfeifer
- Re: [PATCH]: include GMP/MPFR version info in "gcc -v" output
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |