From: Andreas Gruenbacher <agruen@suse.de>

Icecream preprocesses c sources locally, and sends the result off to a remote
host for compiling.  It does not recognize includes at assembler level.  The
fix is to put the assemberincludes an a separate .s file, which will always be
assembled locally.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 arch/x86_64/ia32/Makefile            |    4 ++--
 arch/x86_64/ia32/syscall32.c         |   10 ----------
 arch/x86_64/ia32/syscall32_syscall.S |   17 +++++++++++++++++
 3 files changed, 19 insertions(+), 12 deletions(-)

diff -puN arch/x86_64/ia32/Makefile~x86_64-icecream-has-no-way-of-detecting-assembler-level arch/x86_64/ia32/Makefile
--- devel/arch/x86_64/ia32/Makefile~x86_64-icecream-has-no-way-of-detecting-assembler-level	2005-07-27 12:36:42.000000000 -0700
+++ devel-akpm/arch/x86_64/ia32/Makefile	2005-07-27 12:36:42.000000000 -0700
@@ -4,14 +4,14 @@
 
 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
 	ia32_signal.o tls32.o \
-	ia32_binfmt.o fpu32.o ptrace32.o syscall32.o
+	ia32_binfmt.o fpu32.o ptrace32.o syscall32.o syscall32_syscall.o
 
 sysv-$(CONFIG_SYSVIPC) := ipc32.o
 obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
 
 obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
 
-$(obj)/syscall32.o: $(src)/syscall32.c \
+$(obj)/syscall32_syscall.o: \
 	$(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so)
 
 # Teach kbuild about targets
diff -puN arch/x86_64/ia32/syscall32.c~x86_64-icecream-has-no-way-of-detecting-assembler-level arch/x86_64/ia32/syscall32.c
--- devel/arch/x86_64/ia32/syscall32.c~x86_64-icecream-has-no-way-of-detecting-assembler-level	2005-07-27 12:36:42.000000000 -0700
+++ devel-akpm/arch/x86_64/ia32/syscall32.c	2005-07-27 12:36:42.000000000 -0700
@@ -14,16 +14,6 @@
 #include <asm/tlbflush.h>
 #include <asm/ia32_unistd.h>
 
-/* 32bit VDSOs mapped into user space. */ 
-asm(".section \".init.data\",\"aw\"\n"
-    "syscall32_syscall:\n"
-    ".incbin \"arch/x86_64/ia32/vsyscall-syscall.so\"\n"
-    "syscall32_syscall_end:\n"
-    "syscall32_sysenter:\n"
-    ".incbin \"arch/x86_64/ia32/vsyscall-sysenter.so\"\n"
-    "syscall32_sysenter_end:\n"
-    ".previous");
-
 extern unsigned char syscall32_syscall[], syscall32_syscall_end[];
 extern unsigned char syscall32_sysenter[], syscall32_sysenter_end[];
 extern int sysctl_vsyscall32;
diff -puN /dev/null arch/x86_64/ia32/syscall32_syscall.S
--- /dev/null	2003-09-15 06:40:47.000000000 -0700
+++ devel-akpm/arch/x86_64/ia32/syscall32_syscall.S	2005-07-27 12:36:42.000000000 -0700
@@ -0,0 +1,17 @@
+/* 32bit VDSOs mapped into user space. */
+
+	.section ".init.data","aw"
+
+	.globl syscall32_syscall
+	.globl syscall32_syscall_end
+
+syscall32_syscall:
+	.incbin "arch/x86_64/ia32/vsyscall-syscall.so"
+syscall32_syscall_end:
+
+	.globl syscall32_sysenter
+	.globl syscall32_sysenter_end
+
+syscall32_sysenter:
+	.incbin "arch/x86_64/ia32/vsyscall-sysenter.so"
+syscall32_sysenter_end:
_