[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 01/02: Fix build with gcc 7
From: |
Samuel Thibault |
Subject: |
[hurd] 01/02: Fix build with gcc 7 |
Date: |
Mon, 11 Sep 2017 07:09:54 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde-upstream
in repository hurd.
commit 5018bd32c87250ed3fd4249d050b772750827db0
Author: Samuel Thibault <address@hidden>
Date: Mon Aug 28 02:01:39 2017 +0200
Fix build with gcc 7
* libdde_linux26/contrib/include/linux/compiler-gcc7.h: New
file, copy of compiler-gcc6.h.
---
.../contrib/include/linux/compiler-gcc7.h | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc7.h
b/libdde_linux26/contrib/include/linux/compiler-gcc7.h
new file mode 100644
index 0000000..125834e
--- /dev/null
+++ b/libdde_linux26/contrib/include/linux/compiler-gcc7.h
@@ -0,0 +1,25 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc7.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