diff --git a/include/ircd/info.h b/include/ircd/info.h index 40ea80cca..0e946aeb6 100644 --- a/include/ircd/info.h +++ b/include/ircd/info.h @@ -57,10 +57,13 @@ namespace ircd::info extern const ::utsname utsname; #endif + // Kernel information extern const string_view kernel_name; extern const string_view kernel_release; extern const versions kernel_version; + // Toolchain and library information + extern const versions gnuc_version_api; extern const versions glibc_version_api; extern const versions glibc_version_abi; diff --git a/ircd/info.cc b/ircd/info.cc index 5362e8621..ec880f647 100644 --- a/ircd/info.cc +++ b/ircd/info.cc @@ -295,6 +295,31 @@ ircd::info::kernel_version utsname.release }; +// +// gnuc +// +#if defined(__GNUC__) && defined(__GLIBC__) + +decltype(ircd::info::gnuc_version_api) +ircd::info::gnuc_version_api +{ + "gnuc", versions::API, 0, + { + __GNUC__, + __GNUC_MINOR__, + __GNUC_PATCHLEVEL__, + }, + + // version string + #if defined(__VERSION__) + __VERSION__ + #else + "<__VERSION__ undefined>" + #endif +}; + +#endif defined(__GNUC__) && defined(__GLIBC__) + // // glibc //