From 6543becf26fff612cdadeed7250ccc8d49f67f27 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 20 Jan 2013 17:58:47 +0100 Subject: mod/file2alias: make modalias generation safe for cross compiling Use the target compiler to compute the offsets for the fields of the device_id structures, so that it won't be broken by different alignments between the host and target ABIs. This also fixes missing endian corrections for some modaliases. Signed-off-by: Andreas Schwab Signed-off-by: Michal Marek --- Makefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 275b9567382..5812ec9a56b 100644 --- a/Makefile +++ b/Makefile @@ -191,7 +191,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ # "make" in the configured kernel build directory always uses that. # Default value for CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile -export KBUILD_BUILDHOST := $(SUBARCH) ARCH ?= $(SUBARCH) CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) -- cgit v1.2.3 From 8937e897181a411f73faf4da83c452c7b0732929 Mon Sep 17 00:00:00 2001 From: James Hogan Date: Wed, 6 Feb 2013 12:56:59 +0000 Subject: depmod: pass -P $CONFIG_SYMBOL_PREFIX On architectures which have symbol prefixes, depmod emits lots of warnings like this: WARNING: $module.ko needs unknown symbol $symbol This is because depmod isn't being passed the -P arguments to specify the symbol prefix to ignore. This option is included since the 3.13 release of module-init-tools. Update scripts/depmod.sh to take extra arguments for the symbol prefix (required but may be empty), and update the main Makefile to always pass "$(CONFIG_SYMBOL_PREFIX)" to scripts/depmod.sh. If the provided symbol prefix is non-empty, scripts/depmod.sh checks if depmod --version reports module-init-tools with a version number < 3.13 otherwise it appends -P $SYMBOL_PREFIX to the depmod command line. Signed-off-by: James Hogan Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Cc: Mike Frysinger Cc: Yoshinori Sato Cc: uclinux-dist-devel@blackfin.uclinux.org Signed-off-by: Michal Marek --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5812ec9a56b..d4dd2e4a045 100644 --- a/Makefile +++ b/Makefile @@ -1396,7 +1396,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) # Run depmod only if we have System.map and depmod is executable quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \ - $(KERNELRELEASE) + $(KERNELRELEASE) "$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX))" # Create temporary dir for module support files # clean it up only when building all modules -- cgit v1.2.3 From e82c4bb8b457926e13d4dd3aacbb8e573daede23 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 7 Feb 2013 13:58:40 -0800 Subject: Kbuild: Disable var tracking with CONFIG_DEBUG_INFO_REDUCED Newer gcc enables the var-tracking pass with -g to keep track which registers contain which variables. This is one of the slower passes in gcc. With reduced debug info (aimed at objdump -S, but not using a full debugger) we don't need this fine grained tracking. But it was still enabled because -g was enabled. Disable it explicitely for DEBUG_INFO_REDUCED. On my 8T workstation this gives me about a 12 second gain in building a reasonable kernel config (2min16 vs 2min28) with DEBUG_INFO_REDUCED. With full DEBUG_INFO it takes 2min46 The actual improvement in user time taken by the compiler is much higher (all CPU combined user time 15min5s vs 16m30 before) but the usual amdahl bottleneck on the linker prevents more speedup. It still saves some more energy and keeps cycles for other things. Signed-off-by: Andi Kleen Signed-off-by: Michal Marek --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d4dd2e4a045..ece96fc01b3 100644 --- a/Makefile +++ b/Makefile @@ -618,7 +618,8 @@ KBUILD_AFLAGS += -gdwarf-2 endif ifdef CONFIG_DEBUG_INFO_REDUCED -KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) +KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ + $(call cc-option,-fno-var-tracking) endif ifdef CONFIG_FUNCTION_TRACER -- cgit v1.2.3