Commit fda66343 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: Less intrusive LANG override, fixes menuconfig

The locale override caused problems for some people with locale setiings
different from 'C'. make menuconfig was looking bad / unuseable.
This patch limit the override of locales to the part where we actually descend the kernel
doing the full build of the kernel.
The speed improvement is the same.

make menuconfig should now be useable for all locale settings again.
Thanks to Marcel Sebek <sebek64@post.cz> for pointing out this problem and being
paitent in testing.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 02c55796
...@@ -130,16 +130,6 @@ else ...@@ -130,16 +130,6 @@ else
_all: modules _all: modules
endif endif
# Make sure we're not wasting cpu-cycles doing locale handling, yet do make
# sure error messages appear in the user-desired language
ifdef LC_ALL
LANG := $(LC_ALL)
LC_ALL :=
endif
LC_COLLATE := C
LC_CTYPE := C
export LANG LC_ALL LC_COLLATE LC_CTYPE
srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
TOPDIR := $(srctree) TOPDIR := $(srctree)
# FIXME - TOPDIR is obsolete, use srctree/objtree # FIXME - TOPDIR is obsolete, use srctree/objtree
...@@ -621,11 +611,20 @@ vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE ...@@ -621,11 +611,20 @@ vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ; $(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
# Handle descending into subdirectories listed in $(vmlinux-dirs) # Handle descending into subdirectories listed in $(vmlinux-dirs)
# Preset locale variables to speed up the build process. Limit locale
# tweaks to this spot to avoid wrong language settings when running
# make menuconfig etc.
# Error messages still appears in the original language
.PHONY: $(vmlinux-dirs) .PHONY: $(vmlinux-dirs)
$(vmlinux-dirs): prepare-all scripts $(vmlinux-dirs): prepare-all scripts
$(Q)$(MAKE) $(build)=$@ $(Q)if [ ! -z $$LC_ALL ]; then \
export LANG=$$LC_ALL; \
export LC_ALL= ; \
fi; \
export LC_COLLATE=C; export LC_CTYPE=C; \
$(MAKE) $(build)=$@
# Things we need to do before we recursively start building the kernel # Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare-all". # or the modules are listed in "prepare-all".
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment