git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Char: riscom8, remove wakeup and hangup bottomhalves
[pandora-kernel.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
9c9c4bf
..
89f2d8b
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,7
+1,7
@@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 24
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 24
-EXTRAVERSION =
-rc2
+EXTRAVERSION =
NAME = Arr Matey! A Hairy Bilge Rat!
# *DOCUMENTATION*
NAME = Arr Matey! A Hairy Bilge Rat!
# *DOCUMENTATION*
@@
-12,7
+12,7
@@
NAME = Arr Matey! A Hairy Bilge Rat!
# Do not:
# o use make's built-in rules and variables
# Do not:
# o use make's built-in rules and variables
-# (this increases performance and avoid
hard-to-debug behav
our);
+# (this increases performance and avoid
s hard-to-debug behavi
our);
# o print "Entering directory ...";
MAKEFLAGS += -rR --no-print-directory
# o print "Entering directory ...";
MAKEFLAGS += -rR --no-print-directory
@@
-108,6
+108,9
@@
endif
PHONY := _all
_all:
PHONY := _all
_all:
+# Cancel implicit rules on top Makefile
+$(CURDIR)/Makefile Makefile: ;
+
ifneq ($(KBUILD_OUTPUT),)
# Invoke a second make in the output directory, passing relevant variables
# check that the output directory actually exists
ifneq ($(KBUILD_OUTPUT),)
# Invoke a second make in the output directory, passing relevant variables
# check that the output directory actually exists
@@
-115,13
+118,10
@@
saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
-# Check that OUTPUT directory is not the same as where we have kernel src
-$(if $(filter-out $(KBUILD_OUTPUT),$(shell /bin/pwd)),, \
- $(error Output directory (O=...) specifies kernel src dir))
PHONY += $(MAKECMDGOALS) sub-make
PHONY += $(MAKECMDGOALS) sub-make
-$(filter-out _all sub-make
,
$(MAKECMDGOALS)) _all: sub-make
+$(filter-out _all sub-make
$(CURDIR)/Makefile,
$(MAKECMDGOALS)) _all: sub-make
$(Q)@:
sub-make: FORCE
$(Q)@:
sub-make: FORCE
@@
-169,7
+169,7
@@
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
- -e s/sh
[234]
.*/sh/ )
+ -e s/sh.*/sh/ )
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
@@
-200,11
+200,9
@@
SRCARCH := $(ARCH)
# Additional ARCH settings for x86
ifeq ($(ARCH),i386)
SRCARCH := x86
# Additional ARCH settings for x86
ifeq ($(ARCH),i386)
SRCARCH := x86
- K64BIT := n
endif
ifeq ($(ARCH),x86_64)
SRCARCH := x86
endif
ifeq ($(ARCH),x86_64)
SRCARCH := x86
- K64BIT := y
endif
KCONFIG_CONFIG ?= .config
endif
KCONFIG_CONFIG ?= .config
@@
-293,7
+291,8
@@
export quiet Q KBUILD_VERBOSE
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
-# We need some generic definitions.
+# We need some generic definitions (do not try to remake the file).
+$(srctree)/scripts/Kbuild.include: ;
include $(srctree)/scripts/Kbuild.include
# Make variables (CC, etc...)
include $(srctree)/scripts/Kbuild.include
# Make variables (CC, etc...)
@@
-341,7
+340,7
@@
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
-export ARCH SRCARCH
K64BIT
CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
+export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
@@
-521,6
+520,11
@@
KBUILD_CFLAGS += -g
KBUILD_AFLAGS += -gdwarf-2
endif
KBUILD_AFLAGS += -gdwarf-2
endif
+# We trigger additional mismatches with less inlining
+ifdef CONFIG_DEBUG_SECTION_MISMATCH
+KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
+endif
+
# Force gcc to behave correct even for buggy distributions
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
# Force gcc to behave correct even for buggy distributions
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
@@
-794,7
+798,7
@@
define rule_vmlinux-modpost
endef
# vmlinux image - including updated kernel symbols
endef
# vmlinux image - including updated kernel symbols
-vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main)
$(kallsyms.o) vmlinux.o
FORCE
+vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main)
vmlinux.o $(kallsyms.o)
FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
@@
-805,7
+809,9
@@
endif
$(call if_changed_rule,vmlinux__)
$(Q)rm -f .old_version
$(call if_changed_rule,vmlinux__)
$(Q)rm -f .old_version
-vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
+# build vmlinux.o first to catch section mismatch errors early
+$(kallsyms.o): vmlinux.o
+vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE
$(call if_changed_rule,vmlinux-modpost)
# The actual objects are generated when descending,
$(call if_changed_rule,vmlinux-modpost)
# The actual objects are generated when descending,
@@
-1022,9
+1028,14
@@
ifdef CONFIG_MODULES
all: modules
# Build modules
all: modules
# Build modules
+#
+# A module can be listed more than once in obj-m resulting in
+# duplicate lines in modules.order files. Those are removed
+# using awk while concatenating to the final file.
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
+ $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
@echo ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@echo ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@
-1052,6
+1063,7
@@
_modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(objtree) $(MODLIB)/build ; \
fi
rm -f $(MODLIB)/build ; \
ln -s $(objtree) $(MODLIB)/build ; \
fi
+ @cp -f $(objtree)/modules.order $(MODLIB)/
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
# This depmod is only for convenience to give the initial
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
# This depmod is only for convenience to give the initial
@@
-1111,7
+1123,7
@@
clean: archclean $(clean-dirs)
@find . $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
@find . $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
- -o -name '*.symtypes' \) \
+ -o -name '*.symtypes'
-o -name 'modules.order'
\) \
-type f -print | xargs rm -f
# mrproper - Delete all generated files, including .config
-type f -print | xargs rm -f
# mrproper - Delete all generated files, including .config
@@
-1176,7
+1188,7
@@
help:
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ko - Build module including final link'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ko - Build module including final link'
- @echo '
rpm - Build a kernel as an RPM package
'
+ @echo '
prepare - Set up for building external modules
'
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@echo ' kernelrelease - Output the release version string'
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@echo ' kernelrelease - Output the release version string'
@@
-1189,6
+1201,8
@@
help:
@echo 'Static analysers'
@echo ' checkstack - Generate a list of stack hogs'
@echo ' namespacecheck - Name space analysis on compiled kernel'
@echo 'Static analysers'
@echo ' checkstack - Generate a list of stack hogs'
@echo ' namespacecheck - Name space analysis on compiled kernel'
+ @echo ' versioncheck - Sanity check on version.h usage'
+ @echo ' includecheck - Check for duplicate included header files'
@echo ' export_report - List the usages of all exported symbols'
@if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
echo ' headers_check - Sanity check on exported headers'; \
@echo ' export_report - List the usages of all exported symbols'
@if [ -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \
echo ' headers_check - Sanity check on exported headers'; \
@@
-1330,16
+1344,11
@@
else
ALLINCLUDE_ARCHS := $(SRCARCH)
endif
else
ALLINCLUDE_ARCHS := $(SRCARCH)
endif
else
-#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behavour.
+#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behav
i
our.
ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
endif
ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
endif
-# Take care of arch/x86
-ifeq ($(ARCH), $(SRCARCH))
-ALLSOURCE_ARCHS := $(ARCH)
-else
-ALLSOURCE_ARCHS := $(ARCH) $(SRCARCH)
-endif
+ALLSOURCE_ARCHS := $(SRCARCH)
define find-sources
( for arch in $(ALLSOURCE_ARCHS) ; do \
define find-sources
( for arch in $(ALLSOURCE_ARCHS) ; do \
@@
-1377,6
+1386,7
@@
define xtags
if $1 --version 2>&1 | grep -iq exuberant; then \
$(all-sources) | xargs $1 -a \
-I __initdata,__exitdata,__acquires,__releases \
if $1 --version 2>&1 | grep -iq exuberant; then \
$(all-sources) | xargs $1 -a \
-I __initdata,__exitdata,__acquires,__releases \
+ -I __read_mostly,____cacheline_aligned,____cacheline_aligned_in_smp,____cacheline_internodealigned_in_smp \
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
--extra=+f --c-kinds=+px \
--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'; \
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
--extra=+f --c-kinds=+px \
--regex-asm='/^ENTRY\(([^)]*)\).*/\1/'; \
@@
-1434,12
+1444,12
@@
tags: FORCE
includecheck:
find * $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
includecheck:
find * $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
- | xargs $(PERL) -w scripts/checkincludes.pl
+ | xargs $(PERL) -w
$(srctree)/
scripts/checkincludes.pl
versioncheck:
find * $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
versioncheck:
find * $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
- | xargs $(PERL) -w scripts/checkversion.pl
+ | xargs $(PERL) -w
$(srctree)/
scripts/checkversion.pl
namespacecheck:
$(PERL) $(srctree)/scripts/namespace.pl
namespacecheck:
$(PERL) $(srctree)/scripts/namespace.pl
@@
-1474,7
+1484,7
@@
kernelversion:
# Single targets
# ---------------------------------------------------------------------------
# Single targets are compatible with:
# Single targets
# ---------------------------------------------------------------------------
# Single targets are compatible with:
-# - build w
h
ith mixed source and output
+# - build with mixed source and output
# - build with separate output dir 'make O=...'
# - external modules
#
# - build with separate output dir 'make O=...'
# - external modules
#
@@
-1567,9
+1577,6
@@
endif # skip-makefile
PHONY += FORCE
FORCE:
PHONY += FORCE
FORCE:
-# Cancel implicit rules on top Makefile, `-rR' will apply to sub-makes.
-Makefile: ;
-
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable se we can use it in if_changed and friends.
.PHONY: $(PHONY)
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable se we can use it in if_changed and friends.
.PHONY: $(PHONY)