diff --git a/include/ircd/info.h b/include/ircd/info.h index fd118c214..310b6c48b 100644 --- a/include/ircd/info.h +++ b/include/ircd/info.h @@ -41,6 +41,7 @@ namespace ircd::info extern const time_t configured_time; extern const string_view configured; extern const string_view compiled; + extern const string_view compiler; // Toolchain and library information extern const versions gnuc_version; @@ -83,6 +84,8 @@ namespace ircd::info namespace ircd::info::hardware { + extern const string_view arch; + extern const string_view endian; extern const size_t max_align; extern const size_t hardware_concurrency; extern const size_t destructive_interference; diff --git a/ircd/info.cc b/ircd/info.cc index da93e5f99..636f7545f 100644 --- a/ircd/info.cc +++ b/ircd/info.cc @@ -515,6 +515,30 @@ noexcept // Generic / Standard // +decltype(ircd::info::hardware::arch) +ircd::info::hardware::arch +{ + #if defined(__x86_64__) + "x86_64" + #elif defined(__aarch64__) + "aarch64" + #else + "undefined" + #endif +}; + +decltype(ircd::info::hardware::endian) +ircd::info::hardware::endian +{ + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + "big" + #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + "little" + #else + "undefined" + #endif +}; + decltype(ircd::info::hardware::max_align) ircd::info::hardware::max_align { @@ -1047,7 +1071,7 @@ ircd::info::dump_lib_info() log::info { log::star, "%s SD-6 %s. glibcxx %s. glibc %s. boost %s. RocksDB %s. sodium %s. %s. magic %ld.", - string_view{RB_CXX}, + string_view{compiler}, string_view{sd6_version}, string_view{glibcxx_version_api}, string_view{glibc_version_api}, @@ -1071,6 +1095,12 @@ ircd::info::dump_lib_info() }; } +decltype(ircd::info::compiler) +ircd::info::compiler +{ + split(RB_CXX, ' ').first +}; + // // gnuc //