Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dd34b48 authored by Russell King's avatar Russell King Committed by Sam Ravnborg
Browse files

[PATCH] kbuild: permanently fix kernel configuration include mess



Include autoconf.h into every kernel compilation via the gcc command line
using -imacros.  This ensures that we have the kernel configuration
included from the start, rather than relying on each file having #include
<linux/config.h> as appropriate.  History has shown that this is something
which is difficult to get right.

Since we now include the kernel configuration automatically, make
configcheck becomes meaningless, so remove it.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent f912696a
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -346,7 +346,8 @@ AFLAGS_KERNEL =
# Use LINUXINCLUDE when you must reference the include/ directory.
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
# Needed to be compatible with the O= option
LINUXINCLUDE    := -Iinclude \
LINUXINCLUDE    := -Iinclude \
                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)
                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
		   -imacros include/linux/autoconf.h


CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)


@@ -1249,11 +1250,6 @@ tags: FORCE
# Scripts to check various things for consistency
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------
# ---------------------------------------------------------------------------


configcheck:
	find * $(RCS_FIND_IGNORE) \
		-name '*.[hcS]' -type f -print | sort \
		| xargs $(PERL) -w scripts/checkconfig.pl

includecheck:
includecheck:
	find * $(RCS_FIND_IGNORE) \
	find * $(RCS_FIND_IGNORE) \
		-name '*.[hcS]' -type f -print | sort \
		-name '*.[hcS]' -type f -print | sort \
+3 −1
Original line number Original line Diff line number Diff line
#ifndef _LINUX_CONFIG_H
#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H
#define _LINUX_CONFIG_H

/* This file is no longer in use and kept only for backward compatibility.
 * autoconf.h is now included via -imacros on the commandline
 */
#include <linux/autoconf.h>
#include <linux/autoconf.h>


#endif
#endif