linux/debian/patches/debian/kernelvariables.patch

79 lines
1.5 KiB
Diff

--- a/Makefile
+++ b/Makefile
@@ -192,38 +192,6 @@
CROSS_COMPILE ?=
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
-# Architecture as present in compile.h
-UTS_MACHINE := $(ARCH)
-SRCARCH := $(ARCH)
-
-# Additional ARCH settings for x86
-ifeq ($(ARCH),i386)
- SRCARCH := x86
-endif
-ifeq ($(ARCH),x86_64)
- SRCARCH := x86
-endif
-
-# Additional ARCH settings for sparc
-ifeq ($(ARCH),sparc32)
- SRCARCH := sparc
-endif
-ifeq ($(ARCH),sparc64)
- SRCARCH := sparc
-endif
-
-# Additional ARCH settings for sh
-ifeq ($(ARCH),sh64)
- SRCARCH := sh
-endif
-
-# Where to locate arch specific headers
-hdr-arch := $(SRCARCH)
-
-ifeq ($(ARCH),m68knommu)
- hdr-arch := m68k
-endif
-
KCONFIG_CONFIG ?= .config
# SHELL used by kbuild
@@ -340,6 +311,36 @@ LDFLAGS_MODULE =
AFLAGS_KERNEL =
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
+-include $(obj)/.kernelvariables
+
+# Architecture as present in compile.h
+UTS_MACHINE := $(ARCH)
+SRCARCH := $(ARCH)
+
+# Additional ARCH settings for x86
+ifeq ($(ARCH),i386)
+ SRCARCH := x86
+endif
+ifeq ($(ARCH),x86_64)
+ SRCARCH := x86
+endif
+
+# Additional ARCH settings for sparc
+ifeq ($(ARCH),sparc64)
+ SRCARCH := sparc
+endif
+
+# Additional ARCH settings for sh
+ifeq ($(ARCH),sh64)
+ SRCARCH := sh
+endif
+
+# Where to locate arch specific headers
+hdr-arch := $(SRCARCH)
+
+ifeq ($(ARCH),m68knommu)
+ hdr-arch := m68k
+endif
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option