From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 14 Jul 2005 07:33:38 +0000 (-0700) Subject: [PATCH] uml: gcc 2.95 fix and Makefile cleanup X-Git-Tag: v2.6.13-rc4~110 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=1c30385ae479ec4774bdc1048726aeb15cde0d21 [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: Paolo 'Blaisorblade' Giarrusso Cc: Raphael Bossek Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/Makefile b/arch/um/Makefile index 4a375bbac109..dfcc9eaafaa7 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -116,13 +116,14 @@ CONFIG_KERNEL_STACK_ORDER ?= 2 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) ifndef START - START = $$(($(TOP_ADDR) - $(SIZE))) + START = $(shell echo $$[ $(TOP_ADDR) - $(SIZE) ] ) endif -CPPFLAGS_vmlinux.lds = $(shell echo -U$(SUBARCH) \ +CPPFLAGS_vmlinux.lds = -U$(SUBARCH) \ -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ - -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE-y) \ - -DKERNEL_STACK_SIZE=$(STACK_SIZE) -DSUBARCH=$(SUBARCH)) + -DELF_FORMAT="$(ELF_FORMAT)" $(CPP_MODE-y) \ + -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. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index 163476a8cb1b..b03326d391c9 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S @@ -16,8 +16,8 @@ SECTIONS __binary_start = .; #ifdef MODE_TT - .remap_data : { arch/um/sys-SUBARCH/unmap_fin.o (.data .bss) } - .remap : { arch/um/sys-SUBARCH/unmap_fin.o (.text) } + .remap_data : { UNMAP_PATH (.data .bss) } + .remap : { UNMAP_PATH (.text) } . = ALIGN(4096); /* Init code and data */ #endif