summaryrefslogtreecommitdiffstats
path: root/arch/x86/purgatory
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2014-08-29 15:18:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-29 16:28:16 -0700
commit4df4185a596c7301be0d8e1fdf691ec03e57cd23 (patch)
tree2bdda51aba0e29fe601d263d613c6eccba67cc26 /arch/x86/purgatory
parentb7d5b9a9686674eedffe5b8745c85265f3fe3367 (diff)
downloadlinux-4df4185a596c7301be0d8e1fdf691ec03e57cd23.tar.gz
linux-4df4185a596c7301be0d8e1fdf691ec03e57cd23.tar.bz2
linux-4df4185a596c7301be0d8e1fdf691ec03e57cd23.zip
x86/purgatory: use approprate -m64/-32 build flag for arch/x86/purgatory
Thomas reported that build of x86_64 kernel was failing for him. He is using 32bit tool chain. Problem is that while compiling purgatory, I have not specified -m64 flag. And 32bit tool chain must be assuming -m32 by default. Following is error message. (mini) [~/work/linux-2.6] make scripts/kconfig/conf --silentoldconfig Kconfig CHK include/config/kernel.release UPD include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h UPD include/generated/utsrelease.h CC arch/x86/purgatory/purgatory.o arch/x86/purgatory/purgatory.c:1:0: error: code model 'large' not supported in the 32 bit mode Fix it by explicitly passing appropriate -m64/-m32 build flag for purgatory. Reported-by: Thomas Glanzmann <thomas@glanzmann.de> Tested-by: Thomas Glanzmann <thomas@glanzmann.de> Suggested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/purgatory')
-rw-r--r--arch/x86/purgatory/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index c4ae06e4ae74..899dd2454256 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -11,6 +11,7 @@ targets += purgatory.ro
# sure how to relocate those. Like kexec-tools, use custom flags.
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large
+KBUILD_CFLAGS += -m$(BITS)
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
$(call if_changed,ld)