summaryrefslogtreecommitdiff
path: root/include/linux/vermagic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/vermagic.h')
-rw-r--r--include/linux/vermagic.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h
new file mode 100644
index 000000000000..fadc535e2925
--- /dev/null
+++ b/include/linux/vermagic.h
@@ -0,0 +1,23 @@
+#include <linux/version.h>
+#include <linux/module.h>
+
+/* Simply sanity version stamp for modules. */
+#ifdef CONFIG_SMP
+#define MODULE_VERMAGIC_SMP "SMP "
+#else
+#define MODULE_VERMAGIC_SMP ""
+#endif
+#ifdef CONFIG_PREEMPT
+#define MODULE_VERMAGIC_PREEMPT "preempt "
+#else
+#define MODULE_VERMAGIC_PREEMPT ""
+#endif
+#ifndef MODULE_ARCH_VERMAGIC
+#define MODULE_ARCH_VERMAGIC ""
+#endif
+
+#define VERMAGIC_STRING \
+ UTS_RELEASE " " \
+ MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
+ MODULE_ARCH_VERMAGIC \
+ "gcc-" __stringify(__GNUC__) "." __stringify(__GNUC_MINOR__)