# Added a check for gcc supporting -fno-unit-at-a-time and tidied up some # whitespace in arch/um/Makefile. # Added -DUM_FASTCALL to Makefile-i386. # make clean descends into util in order to get rid of the binaries there. Index: um/arch/um/Makefile =================================================================== --- um.orig/arch/um/Makefile 2004-08-05 15:13:57.000000000 -0400 +++ um/arch/um/Makefile 2004-08-05 15:13:58.000000000 -0400 @@ -61,13 +61,17 @@ -D_LARGEFILE64_SOURCE $(ARCH_INCLUDE) -Derrno=kernel_errno \ -Dsigprocmask=kernel_sigprocmask $(MODE_INCLUDE) +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi) + +CFLAGS += $(call check_gcc,-fno-unit-at-a-time,) + LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc # These are needed for clean and mrproper, since in that case .config is not # included; the values here are meaningless CONFIG_NEST_LEVEL ?= 0 -CONFIG_KERNEL_HALF_GIGS ?= 0 +CONFIG_KERNEL_HALF_GIGS ?= 0 SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) Index: um/arch/um/Makefile-i386 =================================================================== --- um.orig/arch/um/Makefile-i386 2004-08-05 15:12:36.000000000 -0400 +++ um/arch/um/Makefile-i386 2004-08-05 15:13:58.000000000 -0400 @@ -5,6 +5,11 @@ endif CFLAGS += -U__$(SUBARCH)__ -U$(SUBARCH) + +ifneq ($(CONFIG_GPROF),y) +ARCH_CFLAGS += -DUM_FASTCALL +endif + ELF_ARCH = $(SUBARCH) ELF_FORMAT = elf32-$(SUBARCH) Index: um/arch/um/kernel/Makefile =================================================================== --- um.orig/arch/um/kernel/Makefile 2004-08-05 15:12:36.000000000 -0400 +++ um/arch/um/kernel/Makefile 2004-08-05 15:13:58.000000000 -0400 @@ -5,6 +5,11 @@ extra-y := vmlinux.lds.s +# Descend into ../util for make clean. This is here because it doesn't work +# in arch/um/Makefile. + +subdir- = ../util + obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \ helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \ physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \ Index: um/arch/um/util/Makefile =================================================================== --- um.orig/arch/um/util/Makefile 2004-08-05 15:12:36.000000000 -0400 +++ um/arch/um/util/Makefile 2004-08-05 15:13:58.000000000 -0400 @@ -6,3 +6,6 @@ HOSTCFLAGS_mk_task_kern.o := $(CFLAGS) $(CPPFLAGS) HOSTCFLAGS_mk_constants_kern.o := $(CFLAGS) $(CPPFLAGS) + +clean: + $(RM) -f $(host-progs)