Files
linamh/sys-kernel/win4lin-kernel/files/linux-2.6.39.4-gcc15-build-fixes.patch
T
2026-06-29 14:48:02 +02:00

40 lines
1.2 KiB
Diff

diff --git a/Makefile b/Makefile
index 8b4ce78..cb7d61a 100644
--- a/Makefile
+++ b/Makefile
@@ -361,7 +361,8 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
- -fno-delete-null-pointer-checks
+ -fno-delete-null-pointer-checks \
+ -std=gnu89 -fno-stack-protector
KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS := -D__ASSEMBLY__
diff --git a/include/linux/compiler-gcc15.h b/include/linux/compiler-gcc15.h
new file mode 100644
index 0000000..ec43231
--- /dev/null
+++ b/include/linux/compiler-gcc15.h
@@ -0,0 +1,6 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc15.h> directly, include <linux/compiler.h> instead."
+#endif
+
+/* Linux 2.6.39 predates GCC 15; reuse the newest in-tree GCC definitions. */
+#include <linux/compiler-gcc4.h>
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
index eb51d76..0461236 100644
--- a/kernel/timeconst.pl
+++ b/kernel/timeconst.pl
@@ -370,7 +370,7 @@ if (@ARGV) {
}
@val = @{$canned_values{$hz}};
- if (!defined(@val)) {
+ if (!@val) {
@val = compute_values($hz);
}
output($hz, @val);