[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 01/03: Fix build with gcc 6
From: |
Samuel Thibault |
Subject: |
[hurd] 01/03: Fix build with gcc 6 |
Date: |
Wed, 10 Aug 2016 00:05:44 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit 4b8f144e507abb5e085c5aad9ddc7c4d16f13836
Author: Samuel Thibault <address@hidden>
Date: Tue Jul 5 01:16:00 2016 +0200
Fix build with gcc 6
* libdde_linux26/contrib/include/linux/compiler-gcc6.h: New file, copy of
compiler-gcc5.h.
---
.../contrib/include/linux/compiler-gcc6.h | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc6.h
b/libdde_linux26/contrib/include/linux/compiler-gcc6.h
new file mode 100644
index 0000000..e1d96fc
--- /dev/null
+++ b/libdde_linux26/contrib/include/linux/compiler-gcc6.h
@@ -0,0 +1,25 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc6.h> directly, include
<linux/compiler.h> instead."
+#endif
+
+#define __used __attribute__((__used__))
+#define __must_check __attribute__((warn_unused_result))
+#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
+#define __always_inline inline __attribute__((always_inline))
+
+/*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+#define uninitialized_var(x) x = x
+
+/* Mark functions as cold. gcc will assume any path leading to a call
+ to them will be unlikely. This means a lot of manual unlikely()s
+ are unnecessary now for any paths leading to the usual suspects
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
+ older compilers]
+
+ gcc also has a __attribute__((__hot__)) to move hot functions into
+ a special section, but I don't see any sense in this right now in
+ the kernel context */
+#define __cold __attribute__((__cold__))
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git