aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2017-08-22 15:37:31 -0700
committerKevin Hilman <khilman@baylibre.com>2017-08-22 15:37:31 -0700
commit4db26f83a7a1f8b844e4543cd82a87bee1d224e2 (patch)
tree260f68e5671b902344f8b568a45bd6df645b5bcb /include/linux/compiler-gcc.h
parentARM64: dts: meson-gx: Add AO CEC nodes (diff)
parentLinux 4.13-rc4 (diff)
downloadwireguard-linux-4db26f83a7a1f8b844e4543cd82a87bee1d224e2.tar.xz
wireguard-linux-4db26f83a7a1f8b844e4543cd82a87bee1d224e2.zip
Merge tag 'v4.13-rc4' into v4.14/dt64
Linux 4.13-rc4
Diffstat (limited to '')
-rw-r--r--include/linux/compiler-gcc.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index cd4bbe8242bd..bdb80c4aef6e 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -235,6 +235,7 @@
#endif /* GCC_VERSION >= 40500 */
#if GCC_VERSION >= 40600
+
/*
* When used with Link Time Optimization, gcc can optimize away C functions or
* variables which are referenced only from assembly code. __visible tells the
@@ -242,7 +243,17 @@
* this.
*/
#define __visible __attribute__((externally_visible))
-#endif
+
+/*
+ * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only
+ * possible since GCC 4.6. To provide as much build testing coverage
+ * as possible, this is used for all GCC 4.6+ builds, and not just on
+ * RANDSTRUCT_PLUGIN builds.
+ */
+#define randomized_struct_fields_start struct {
+#define randomized_struct_fields_end } __randomize_layout;
+
+#endif /* GCC_VERSION >= 40600 */
#if GCC_VERSION >= 40900 && !defined(__CHECKER__)