Commit 1c30385a authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds

[PATCH] uml: gcc 2.95 fix and Makefile cleanup

1) Cleanup an ugly hyper-nested code in Makefile (now only the arith.
   expression is passed through the host bash).

2) Fix a problem with GCC 2.95: according to a report from Raphael Bossek,
   .remap_data : { arch/um/sys-SUBARCH/unmap_fin.o (.data .bss) } is expanded
   into: .remap_data : { arch/um/sys-i386 /unmap_fin.o (.data .bss) }

(because I didn't use ## to join the two tokens), thus stopping linking.  Pass
the whole path from the Makefile as a simple and nice fix.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Raphael Bossek <raphael.bossek@gmx.de>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2e5e5592
...@@ -116,13 +116,14 @@ CONFIG_KERNEL_STACK_ORDER ?= 2 ...@@ -116,13 +116,14 @@ CONFIG_KERNEL_STACK_ORDER ?= 2
STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
ifndef START ifndef START
START = $$(($(TOP_ADDR) - $(SIZE))) START = $(shell echo $$[ $(TOP_ADDR) - $(SIZE) ] )
endif endif
CPPFLAGS_vmlinux.lds = $(shell echo -U$(SUBARCH) \ CPPFLAGS_vmlinux.lds = -U$(SUBARCH) \
-DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \
-DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE-y) \ -DELF_FORMAT="$(ELF_FORMAT)" $(CPP_MODE-y) \
-DKERNEL_STACK_SIZE=$(STACK_SIZE) -DSUBARCH=$(SUBARCH)) -DKERNEL_STACK_SIZE=$(STACK_SIZE) \
-DUNMAP_PATH=arch/um/sys-$(SUBARCH)/unmap_fin.o
#The wrappers will select whether using "malloc" or the kernel allocator. #The wrappers will select whether using "malloc" or the kernel allocator.
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
......
...@@ -16,8 +16,8 @@ SECTIONS ...@@ -16,8 +16,8 @@ SECTIONS
__binary_start = .; __binary_start = .;
#ifdef MODE_TT #ifdef MODE_TT
.remap_data : { arch/um/sys-SUBARCH/unmap_fin.o (.data .bss) } .remap_data : { UNMAP_PATH (.data .bss) }
.remap : { arch/um/sys-SUBARCH/unmap_fin.o (.text) } .remap : { UNMAP_PATH (.text) }
. = ALIGN(4096); /* Init code and data */ . = ALIGN(4096); /* Init code and data */
#endif #endif
......
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