| | @@ -65,13 +65,13 @@ |
| 65 | 65 | #endif |
| 66 | 66 | |
| 67 | 67 | /* |
| 68 | 68 | ** Utility macro to wrap an argument with double quotes. |
| 69 | 69 | */ |
| 70 | | -#if !defined(COMPILER_NAME_STRINGIFY) |
| 71 | | -# define COMPILER_NAME_STRINGIFY(x) COMPILER_NAME_STRINGIFY1(x) |
| 72 | | -# define COMPILER_NAME_STRINGIFY1(x) #x |
| 70 | +#if !defined(COMPILER_STRINGIFY) |
| 71 | +# define COMPILER_STRINGIFY(x) COMPILER_STRINGIFY1(x) |
| 72 | +# define COMPILER_STRINGIFY1(x) #x |
| 73 | 73 | #endif |
| 74 | 74 | |
| 75 | 75 | /* |
| 76 | 76 | ** Define the compiler variant, used to compile the project |
| 77 | 77 | */ |
| | @@ -83,17 +83,33 @@ |
| 83 | 83 | # define COMPILER_NAME "pellesc64" |
| 84 | 84 | # else |
| 85 | 85 | # define COMPILER_NAME "pellesc32" |
| 86 | 86 | # endif |
| 87 | 87 | # elif defined(_MSC_VER) |
| 88 | | -# define COMPILER_NAME "msc-" COMPILER_NAME_STRINGIFY(_MSC_VER) |
| 88 | +# if !defined(COMPILER_VERSION) |
| 89 | +# define COMPILER_VERSION COMPILER_STRINGIFY(_MSC_VER) |
| 90 | +# endif |
| 91 | +# define COMPILER_NAME "msc-" COMPILER_VERSION |
| 89 | 92 | # elif defined(__MINGW32__) |
| 90 | | -# define COMPILER_NAME "mingw32-" COMPILER_NAME_STRINGIFY(__MINGW32_VERSION) |
| 93 | +# if defined(__GNUC__) && defined(__VERSION__) |
| 94 | +# if !defined(COMPILER_VERSION) |
| 95 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) "-gcc-" __VERSION__ |
| 96 | +# endif |
| 97 | +# define COMPILER_NAME "mingw32-" COMPILER_VERSION |
| 98 | +# else |
| 99 | +# if !defined(COMPILER_VERSION) |
| 100 | +# define COMPILER_VERSION COMPILER_STRINGIFY(__MINGW32_VERSION) |
| 101 | +# endif |
| 102 | +# define COMPILER_NAME "mingw32-" COMPILER_VERSION |
| 103 | +# endif |
| 91 | 104 | # elif defined(_WIN32) |
| 92 | 105 | # define COMPILER_NAME "win32" |
| 93 | 106 | # elif defined(__GNUC__) |
| 94 | | -# define COMPILER_NAME "gcc-" __VERSION__ |
| 107 | +# if !defined(COMPILER_VERSION) |
| 108 | +# define COMPILER_VERSION __VERSION__ |
| 109 | +# endif |
| 110 | +# define COMPILER_NAME "gcc-" COMPILER_VERSION |
| 95 | 111 | # else |
| 96 | 112 | # define COMPILER_NAME "unknown" |
| 97 | 113 | # endif |
| 98 | 114 | #endif |
| 99 | 115 | |
| 100 | 116 | |