2021-05-31 04:47:02 +03:00
|
|
|
/**
|
|
|
|
* @file kernel/sys/version.c
|
|
|
|
* @brief Kernel version macros.
|
|
|
|
*
|
|
|
|
* @copyright
|
2018-03-16 15:56:19 +03:00
|
|
|
* This file is part of ToaruOS and is released under the terms
|
|
|
|
* of the NCSA / University of Illinois License - see LICENSE.md
|
2021-05-31 04:47:02 +03:00
|
|
|
* Copyright (C) 2011-2021 K. Lange
|
2018-03-16 15:56:19 +03:00
|
|
|
*/
|
|
|
|
|
2018-03-19 05:38:11 +03:00
|
|
|
#include <kernel/version.h>
|
2018-03-16 15:56:19 +03:00
|
|
|
|
2021-05-31 04:47:02 +03:00
|
|
|
#define STR(x) #x
|
|
|
|
#define STRSTR(x) STR(x)
|
|
|
|
|
2018-03-16 15:56:19 +03:00
|
|
|
/* Kernel name. If you change this, you're not
|
|
|
|
* my friend any more. */
|
2021-09-30 04:37:46 +03:00
|
|
|
const char * __kernel_name = "Misaka";
|
2018-03-16 15:56:19 +03:00
|
|
|
|
|
|
|
/* This really shouldn't change, and if it does,
|
|
|
|
* always ensure it still has the correct arguments
|
|
|
|
* when used as a vsprintf() format. */
|
2021-05-31 04:47:02 +03:00
|
|
|
const char * __kernel_version_format = "%d.%d.%d-%s";
|
2018-03-16 15:56:19 +03:00
|
|
|
|
|
|
|
/* Version numbers X.Y.Z */
|
2021-12-06 05:32:23 +03:00
|
|
|
int __kernel_version_major = 2;
|
2022-02-02 06:56:55 +03:00
|
|
|
int __kernel_version_minor = 1;
|
|
|
|
int __kernel_version_lower = 0;
|
2018-03-16 15:56:19 +03:00
|
|
|
|
|
|
|
/* Kernel build suffix, which doesn't necessarily
|
|
|
|
* mean anything, but can be used to distinguish
|
|
|
|
* between different features included while
|
|
|
|
* building multiple kernels. */
|
|
|
|
#ifdef KERNEL_GIT_TAG
|
|
|
|
# define KERNEL_VERSION_SUFFIX STRSTR(KERNEL_GIT_TAG)
|
|
|
|
#else
|
|
|
|
# define KERNEL_VERSION_SUFFIX "r"
|
|
|
|
#endif
|
2021-05-31 04:47:02 +03:00
|
|
|
const char * __kernel_version_suffix = KERNEL_VERSION_SUFFIX;
|
2018-03-16 15:56:19 +03:00
|
|
|
|
|
|
|
/* The release codename. */
|
2022-10-22 06:02:50 +03:00
|
|
|
const char * __kernel_version_codename = "\"Sister's Noise\"";
|
2018-03-16 15:56:19 +03:00
|
|
|
|
2021-05-31 04:47:02 +03:00
|
|
|
/* Build architecture */
|
|
|
|
const char * __kernel_arch = STRSTR(KERNEL_ARCH);
|
2018-03-16 15:56:19 +03:00
|
|
|
|
|
|
|
/* Rebuild from clean to reset these. */
|
2021-05-31 04:47:02 +03:00
|
|
|
const char * __kernel_build_date = __DATE__;
|
|
|
|
const char * __kernel_build_time = __TIME__;
|
2018-03-16 15:56:19 +03:00
|
|
|
|
|
|
|
#if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__) || defined(__INTEL_COMPILER))
|
|
|
|
# define COMPILER_VERSION "gcc " __VERSION__
|
|
|
|
#elif (defined(__clang__))
|
|
|
|
# define COMPILER_VERSION "clang " __clang_version__
|
|
|
|
#else
|
|
|
|
# define COMPILER_VERSION "unknown-compiler how-did-you-do-that"
|
|
|
|
#endif
|
|
|
|
|
2021-05-31 04:47:02 +03:00
|
|
|
const char * __kernel_compiler_version = COMPILER_VERSION;
|