patch-2.1.132 linux/arch/sparc/kernel/Makefile

Next file: linux/arch/sparc/lib/Makefile
Previous file: linux/arch/sparc/defconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/arch/sparc/kernel/Makefile linux/arch/sparc/kernel/Makefile
@@ -30,7 +30,7 @@
 O_OBJS += sun4setup.o
 endif
 
-ifdef SMP
+ifdef CONFIG_SMP
 O_OBJS += trampoline.o smp.o sun4m_smp.o sun4d_smp.o
 endif
 
@@ -50,11 +50,17 @@
 	@echo "#ifndef __ASM_OFFSETS_H__" >> asm_offsets.h
 	@echo "#define __ASM_OFFSETS_H__" >> asm_offsets.h
 	@echo "" >> asm_offsets.h
-	@echo "#ifndef __SMP__" >> asm_offsets.h
+	@echo "#include <linux/config.h>" >> asm_offsets.h
 	@echo "" >> asm_offsets.h
-	@echo "#include <linux/sched.h>" > tmp.c
+	@echo "#ifndef CONFIG_SMP" >> asm_offsets.h
+	@echo "" >> asm_offsets.h
+	@echo "#include <linux/config.h>" > tmp.c
+	@echo "#undef CONFIG_SMP" >> tmp.c
+	@echo "#include <linux/sched.h>" >> tmp.c
 	$(CC) -E tmp.c -o tmp.i
 	@echo "/* Automatically generated. Do not edit. */" > check_asm.c
+	@echo "#include <linux/config.h>" >> check_asm.c
+	@echo "#undef CONFIG_SMP" >> check_asm.c
 	@echo "#include <linux/sched.h>" >> check_asm.c
 	@echo 'struct task_struct _task;' >> check_asm.c
 	@echo 'struct mm_struct _mm;' >> check_asm.c
@@ -69,11 +75,17 @@
 	./check_asm >> asm_offsets.h
 	@rm -f check_asm check_asm.c
 	@echo "" >> asm_offsets.h
-	@echo "#else /* __SMP__ */" >> asm_offsets.h
+	@echo "#else /* CONFIG_SMP */" >> asm_offsets.h
 	@echo "" >> asm_offsets.h
-	@echo "#include <linux/sched.h>" > tmp.c
+	@echo "#include <linux/config.h>" > tmp.c
+	@echo "#undef CONFIG_SMP" >> tmp.c
+	@echo "#define CONFIG_SMP 1" >> tmp.c
+	@echo "#include <linux/sched.h>" >> tmp.c
 	$(CC) -D__SMP__ -E tmp.c -o tmp.i
 	@echo "/* Automatically generated. Do not edit. */" > check_asm.c
+	@echo "#include <linux/config.h>" >> check_asm.c
+	@echo "#undef CONFIG_SMP" >> check_asm.c
+	@echo "#define CONFIG_SMP 1" >> check_asm.c
 	@echo "#include <linux/sched.h>" >> check_asm.c
 	@echo 'struct task_struct _task;' >> check_asm.c
 	@echo 'struct mm_struct _mm;' >> check_asm.c
@@ -88,7 +100,7 @@
 	./check_asm >> asm_offsets.h
 	@rm -f check_asm check_asm.c
 	@echo "" >> asm_offsets.h
-	@echo "#endif /* __SMP__ */" >> asm_offsets.h
+	@echo "#endif /* CONFIG_SMP */" >> asm_offsets.h
 	@echo "" >> asm_offsets.h
 	@echo "#endif /* __ASM_OFFSETS_H__ */" >> asm_offsets.h
 	@if test -r $(HPATH)/asm/asm_offsets.h; then \

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov