CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/patch/misc/compiler.patch
Views: 3959
1
--- a/arch/arm/kernel/asm-offsets.c
2
+++ b/arch/arm/kernel/asm-offsets.c
3
@@ -10,6 +10,7 @@
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation.
6
*/
7
+#include <linux/compiler.h>
8
#include <linux/sched.h>
9
#include <linux/mm.h>
10
#include <linux/dma-mapping.h>
11
@@ -39,10 +40,19 @@
12
* GCC 3.2.x: miscompiles NEW_AUX_ENT in fs/binfmt_elf.c
13
* (http://gcc.gnu.org/PR8896) and incorrect structure
14
* initialisation in fs/jffs2/erase.c
15
+ * GCC 4.8.0-4.8.2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
16
+ * miscompiles find_get_entry(), and can result in EXT3 and EXT4
17
+ * filesystem corruption (possibly other FS too).
18
*/
19
+#ifdef __GNUC__
20
#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
21
#error Your compiler is too buggy; it is known to miscompile kernels.
22
-#error Known good compilers: 3.3
23
+#error Known good compilers: 3.3, 4.x
24
+#endif
25
+#if GCC_VERSION >= 40800 && GCC_VERSION < 40803
26
+#error Your compiler is too buggy; it is known to miscompile kernels
27
+#error and result in filesystem corruption and oopses.
28
+#endif
29
#endif
30
31
int main(void)
32
33