---  amd64/amd64/support.S.orig
+++  amd64/amd64/support.S
@@ -671,49 +671,6 @@
 	incl	%eax
 	ret
 
-/*****************************************************************************/
-/* linux_futex support                                                       */
-/*****************************************************************************/
-
-futex_fault:
-	movq	$0,PCB_ONFAULT(%rcx)
-	movq	$-EFAULT,%rax
-	ret
-
-ENTRY(futex_xchgl)
-	movq	PCPU(CURPCB),%rcx
-	movq	$futex_fault,PCB_ONFAULT(%rcx)
-
-	movq	$VM_MAXUSER_ADDRESS-4,%rax
-	cmpq	%rax,%rsi
-	ja	futex_fault
-
-#ifdef SMP
-	lock
-#endif
-	xchgl	%edi,(%rsi)
-	movl	%edi,(%rdx)
-	xorl	%eax,%eax
-	movq	%rax,PCB_ONFAULT(%rcx)
-	ret
-
-ENTRY(futex_addl)
-	movq	PCPU(CURPCB),%rcx
-	movq	$futex_fault,PCB_ONFAULT(%rcx)
-
-	movq	$VM_MAXUSER_ADDRESS-4,%rax
-	cmpq	%rax,%rsi
-	ja	futex_fault
-
-#ifdef SMP
-	lock
-#endif
-	xaddl	%edi,(%rsi)
-	movl	%edi,(%rdx)
-	xorl	%eax,%eax
-	movq	%rax,PCB_ONFAULT(%rcx)
-	ret
-
 /*
  * Support for BB-profiling (gcc -a).  The kernbb program will extract
  * the data from the kernel.
--- /dev/null	Sat May 12 13:24:37 2007
+++ amd64/linux32/linux32_support.s	Sat May 12 13:25:33 2007
@@ -0,0 +1,128 @@
+/*-
+ * Copyright (c) 2007 The FreeBSD Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include "linux32_assym.h"		/* system definitions */
+#include <machine/asmacros.h>		/* miscellaneous asm macros */
+
+#include "assym.s"
+
+/*****************************************************************************/
+/* linux_futex support                                                       */
+/*****************************************************************************/
+
+futex_fault:
+	movq	$0,PCB_ONFAULT(%r8)
+	movl	$-EFAULT,%eax
+	ret
+
+ENTRY(futex_xchgl)
+	movq	PCPU(CURPCB),%r8
+	movq	$futex_fault,PCB_ONFAULT(%r8)
+	movq	$VM_MAXUSER_ADDRESS-4,%rax
+	cmpq	%rax,%rsi
+	ja	futex_fault
+	xchgl	%edi,(%rsi)
+	movl	%edi,(%rdx)
+	xorl	%eax,%eax
+	movq	%rax,PCB_ONFAULT(%r8)
+	ret
+
+ENTRY(futex_addl)
+	movq	PCPU(CURPCB),%r8
+	movq	$futex_fault,PCB_ONFAULT(%r8)
+	movq	$VM_MAXUSER_ADDRESS-4,%rax
+	cmpq	%rax,%rsi
+	ja	futex_fault
+#ifdef SMP
+	lock
+#endif
+	xaddl	%edi,(%rsi)
+	movl	%edi,(%rdx)
+	xorl	%eax,%eax
+	movq	%rax,PCB_ONFAULT(%r8)
+	ret
+
+ENTRY(futex_orl)
+	movq	PCPU(CURPCB),%r8
+	movq	$futex_fault,PCB_ONFAULT(%r8)
+	movq	$VM_MAXUSER_ADDRESS-4,%rax
+	cmpq	%rax,%rsi
+	ja	futex_fault
+1:	movl	(%rsi),%eax
+	movl	%eax,(%rdx)
+	movl	%eax,%ecx
+	orl	%edi,%ecx
+#ifdef SMP
+	lock
+#endif
+	cmpxchgl %ecx,(%rsi)
+	jnz	1b
+	xorl	%eax,%eax
+	movq	%rax,PCB_ONFAULT(%r8)
+	ret
+
+ENTRY(futex_andl)
+	movq	PCPU(CURPCB),%r8
+	movq	$futex_fault,PCB_ONFAULT(%r8)
+	movq	$VM_MAXUSER_ADDRESS-4,%rax
+	cmpq	%rax,%rsi
+	ja	futex_fault
+1:	movl	(%rsi),%eax
+	movl	%eax,(%rdx)
+	movl	%eax,%ecx
+	andl	%edi,%ecx
+#ifdef SMP
+	lock
+#endif
+	cmpxchgl %ecx,(%rsi)
+	jnz	1b
+	xorl	%eax,%eax
+	movq	%rax,PCB_ONFAULT(%r8)
+	ret
+
+ENTRY(futex_xorl)
+	movq	PCPU(CURPCB),%r8
+	movq	$futex_fault,PCB_ONFAULT(%r8)
+	movq	$VM_MAXUSER_ADDRESS-4,%rax
+	cmpq	%rax,%rsi
+	ja	futex_fault
+1:	movl	(%rsi),%eax
+	movl	%eax,(%rdx)
+	movl	%eax,%ecx
+	xorl	%edi,%ecx
+#ifdef SMP
+	lock
+#endif
+	cmpxchgl %ecx,(%rsi)
+	jnz	1b
+	xorl	%eax,%eax
+	movq	%rax,PCB_ONFAULT(%r8)
+	ret
--- amd64/linux32/linux32_sysvec.c.orig
+++ amd64/linux32/linux32_sysvec.c
@@ -125,6 +125,7 @@
 
 extern LIST_HEAD(futex_list, futex) futex_list;
 extern struct sx futex_sx;
+extern struct sx futex_lock;
 
 static eventhandler_tag linux_exit_tag;
 static eventhandler_tag linux_schedtail_tag;
@@ -1084,7 +1085,8 @@
 			mtx_init(&emul_lock, "emuldata lock", NULL, MTX_DEF);
 			sx_init(&emul_shared_lock, "emuldata->shared lock");
 			LIST_INIT(&futex_list);
-			sx_init(&futex_sx, "futex protection lock");
+			sx_init(&futex_sx, "futex list protection lock");
+			sx_init(&futex_lock, "futex protection lock");
 			linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit,
 			      NULL, 1000);
 			linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, linux_schedtail,
@@ -1115,6 +1117,7 @@
 			mtx_destroy(&emul_lock);
 			sx_destroy(&emul_shared_lock);
 			sx_destroy(&futex_sx);
+			sx_destroy(&futex_lock);
 			EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag);
 			EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag);
 			EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag);
--- compat/linux/linux_futex.c.orig
+++ compat/linux/linux_futex.c
@@ -75,6 +75,7 @@
 
 LIST_HEAD(futex_list, futex) futex_list;
 struct sx futex_sx;		/* this protects the LIST of futexes */
+struct sx futex_lock;
 
 #define FUTEX_LOCK sx_xlock(&futex_sx)
 #define FUTEX_UNLOCK sx_xunlock(&futex_sx)
@@ -82,21 +83,21 @@
 #define FUTEX_LOCKED	1
 #define FUTEX_UNLOCKED	0
 
-#define FUTEX_SYSTEM_LOCK mtx_lock(&Giant)
-#define FUTEX_SYSTEM_UNLOCK mtx_unlock(&Giant)
+#define FUTEX_SYSTEM_LOCK sx_xlock(&futex_lock)
+#define FUTEX_SYSTEM_UNLOCK sx_xunlock(&futex_lock)
 
 static struct futex	*futex_get(void *, int);
 static void futex_put(struct futex *);
 static int futex_sleep(struct futex *, struct thread *, unsigned long);
 static int futex_wake(struct futex *, int, struct futex *, int);
 static int futex_atomic_op(struct thread *td, int encoded_op, caddr_t uaddr);
-static int futex_orl(int oparg, caddr_t uaddr, int *oldval);
-static int futex_andl(int oparg, caddr_t uaddr, int *oldval);
-static int futex_xorl(int oparg, caddr_t uaddr, int *oldval);
 
 /* support.s */
 int futex_xchgl(int oparg, caddr_t uaddr, int *oldval);
 int futex_addl(int oparg, caddr_t uaddr, int *oldval);
+int futex_orl(int oparg, caddr_t uaddr, int *oldval);
+int futex_andl(int oparg, caddr_t uaddr, int *oldval);
+int futex_xorl(int oparg, caddr_t uaddr, int *oldval);
 
 int
 linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
@@ -114,8 +115,8 @@
 
 #ifdef	DEBUG
 	if (ldebug(sys_futex))
-		printf(ARGS(futex, "%p, %i, %i"), args->uaddr, args->op,
-		    args->val);
+		printf(ARGS(futex, "%p, %i, %i, *, %p, %i"), args->uaddr, args->op,
+		    args->val, args->uaddr2, args->val3);
 #endif
 
 	switch (args->op) {
@@ -390,7 +391,7 @@
 		printf("FUTEX --> %d tlseep timeout = %ld\n",
 		    td->td_proc->p_pid, timeout);
 #endif
-	ret = tsleep(wp, PCATCH | PZERO, "linuxfutex", timeout);
+	ret = sx_sleep(wp, &futex_lock, PCATCH | PZERO, "linuxfutex", timeout);
 #ifdef DEBUG
 	if (ldebug(sys_futex))
 		printf("FUTEX -> %d tsleep returns %d\n",
@@ -401,9 +402,12 @@
 	TAILQ_REMOVE(&f->f_waiting_proc, wp, wp_list);
 	FUTEX_UNLOCK;
 
+	/* if we got woken up in futex_wake */
 	if ((ret == 0) && (wp->wp_new_futex != NULL)) {
+		/* suspend us on the new futex */
 		ret = futex_sleep(wp->wp_new_futex, td, timeout);
-		futex_put(wp->wp_new_futex);	/* futex_get called in wakeup */
+		/* and release the old one */
+		futex_put(wp->wp_new_futex);
 	}
 
 	free(wp, M_LINUX);
@@ -509,42 +513,3 @@
 
 	return (ret);
 }
-
-static int
-futex_orl(int oparg, caddr_t uaddr, int *oldval)
-{
-	uint32_t ua, ua_old;
-
-	for (;;) {
-		ua = ua_old = fuword32(uaddr);
-		ua |= oparg;
-		if (casuword32((void *)uaddr, ua_old, ua) == ua_old)
-			return ua_old;
-	}
-}
-
-static int
-futex_andl(int oparg, caddr_t uaddr, int *oldval)
-{
-	uint32_t ua, ua_old;
-
-	for (;;) {
-		ua = ua_old = fuword32(uaddr);
-		ua &= oparg;
-		if (casuword32((void *)uaddr, ua_old, ua) == ua_old)
-			return ua_old;
-	}
-}
-
-static int
-futex_xorl(int oparg, caddr_t uaddr, int *oldval)
-{
-	uint32_t ua, ua_old;
-
-	for (;;) {
-		ua = ua_old = fuword32(uaddr);
-		ua ^= oparg;
-		if (casuword32((void *)uaddr, ua_old, ua) == ua_old)
-			return ua_old;
-	}
-}
--- conf/files.amd64.orig
+++ conf/files.amd64
@@ -231,6 +231,7 @@
 amd64/linux32/linux32_locore.s	optional	compat_linux32		\
 	dependency 	"linux32_assym.h"
 amd64/linux32/linux32_machdep.c	optional	compat_linux32
+amd64/linux32/linux32_support.s	optional	compat_linux32
 amd64/linux32/linux32_sysent.c	optional	compat_linux32
 amd64/linux32/linux32_sysvec.c	optional	compat_linux32
 compat/linux/linux_emul.c       optional	compat_linux32
--- conf/files.i386.orig
+++ conf/files.i386
@@ -345,6 +345,7 @@
 	dependency 	"linux_assym.h"
 i386/linux/linux_machdep.c	optional compat_linux
 i386/linux/linux_ptrace.c	optional compat_linux
+i386/linux/linux_support.s	optional compat_linux
 i386/linux/linux_sysent.c	optional compat_linux
 i386/linux/linux_sysvec.c	optional compat_linux
 i386/pci/pci_bus.c		optional pci
--- i386/i386/support.s.orig
+++ i386/i386/support.s
@@ -1513,51 +1513,6 @@
 	incl	%eax
 	ret
 
-/*****************************************************************************/
-/* linux_futex support                                                       */
-/*****************************************************************************/
-
-futex_fault:
-	movl	$0,PCB_ONFAULT(%ecx)
-	movl	$-EFAULT,%eax
-	ret
-
-ENTRY(futex_xchgl)
-	movl	PCPU(CURPCB),%ecx
-	movl	$futex_fault,PCB_ONFAULT(%ecx)
-	movl	4(%esp),%eax
-	movl	8(%esp),%edx
-	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
-	ja     	futex_fault
-
-#ifdef SMP
-	lock
-#endif
-	xchgl	%eax,(%edx)
-	movl	12(%esp),%edx
-	movl	%eax,(%edx)
-	xorl	%eax,%eax
-	movl	$0,PCB_ONFAULT(%ecx)
-	ret
-
-ENTRY(futex_addl)
-	movl	PCPU(CURPCB),%ecx
-	movl	$futex_fault,PCB_ONFAULT(%ecx)
-	movl	4(%esp),%eax
-	movl	8(%esp),%edx
-	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
-	ja     	futex_fault
-
-#ifdef SMP
-	lock
-#endif
-	xaddl	%eax,(%edx)
-	movl	12(%esp),%edx
-	movl	%eax,(%edx)
-	xorl	%eax,%eax
-	movl	$0,PCB_ONFAULT(%ecx)
-	ret
-
 /*
  * Support for BB-profiling (gcc -a).  The kernbb program will extract
  * the data from the kernel.
--- /dev/null	Sat May 12 13:24:37 2007
+++ i386/linux/linux_support.s	Sat May 12 13:25:35 2007
@@ -0,0 +1,131 @@
+/*-
+ * Copyright (c) 2006,2007 The FreeBSD Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include "linux_assym.h"		/* system definitions */
+#include <machine/asmacros.h>		/* miscellaneous asm macros */
+
+#include "assym.s"
+
+/*****************************************************************************/
+/* linux_futex support                                                       */
+/*****************************************************************************/
+
+futex_fault_decx:
+	movl	PCPU(CURPCB),%ecx
+futex_fault:
+	movl	$0,PCB_ONFAULT(%ecx)
+	movl	$-EFAULT,%eax
+	ret
+
+ENTRY(futex_xchgl)
+	movl	PCPU(CURPCB),%ecx
+	movl	$futex_fault,PCB_ONFAULT(%ecx)
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
+	ja     	futex_fault
+	xchgl	%eax,(%edx)
+	movl	12(%esp),%edx
+	movl	%eax,(%edx)
+	xorl	%eax,%eax
+	movl	%eax,PCB_ONFAULT(%ecx)
+	ret
+
+ENTRY(futex_addl)
+	movl	PCPU(CURPCB),%ecx
+	movl	$futex_fault,PCB_ONFAULT(%ecx)
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
+	ja     	futex_fault
+#ifdef SMP
+	lock
+#endif
+	xaddl	%eax,(%edx)
+	movl	12(%esp),%edx
+	movl	%eax,(%edx)
+	xorl	%eax,%eax
+	movl	%eax,PCB_ONFAULT(%ecx)
+	ret
+
+ENTRY(futex_orl)
+	movl	PCPU(CURPCB),%ecx
+	movl	$futex_fault_decx,PCB_ONFAULT(%ecx)
+	movl	8(%esp),%edx
+	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
+	ja     	futex_fault
+1:	movl	(%edx),%eax
+	movl	%eax,%ecx
+	orl	4(%esp),%ecx
+#ifdef SMP
+	lock
+#endif
+	cmpxchgl %ecx,(%edx)
+	jnz	1b
+futex_tail:	
+	movl	12(%esp),%edx
+	movl	%eax,(%edx)
+	xorl	%eax,%eax
+	movl	PCPU(CURPCB),%ecx
+	movl	%eax,PCB_ONFAULT(%ecx)
+	ret
+
+ENTRY(futex_andl)
+	movl	PCPU(CURPCB),%ecx
+	movl	$futex_fault_decx,PCB_ONFAULT(%ecx)
+	movl	8(%esp),%edx
+	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
+	ja     	futex_fault
+1:	movl	(%edx),%eax
+	movl	%eax,%ecx
+	andl	4(%esp),%ecx
+#ifdef SMP
+	lock
+#endif
+	cmpxchgl %ecx,(%edx)
+	jnz	1b
+	jmp	futex_tail
+
+ENTRY(futex_xorl)
+	movl	PCPU(CURPCB),%ecx
+	movl	$futex_fault_decx,PCB_ONFAULT(%ecx)
+	movl	8(%esp),%edx
+	cmpl    $VM_MAXUSER_ADDRESS-4,%edx
+	ja     	futex_fault
+1:	movl	(%edx),%eax
+	movl	%eax,%ecx
+	xorl	4(%esp),%ecx
+#ifdef SMP
+	lock
+#endif
+	cmpxchgl %ecx,(%edx)
+	jnz	1b
+	jmp	futex_tail
--- i386/linux/linux_sysvec.c.orig
+++ i386/linux/linux_sysvec.c
@@ -109,6 +109,7 @@
 
 extern LIST_HEAD(futex_list, futex) futex_list;
 extern struct sx futex_sx;
+extern struct sx futex_lock;
 
 static eventhandler_tag linux_exit_tag;
 static eventhandler_tag linux_schedtail_tag;
@@ -920,7 +921,8 @@
 			mtx_init(&emul_lock, "emuldata lock", NULL, MTX_DEF);
 			sx_init(&emul_shared_lock, "emuldata->shared lock");
 			LIST_INIT(&futex_list);
-			sx_init(&futex_sx, "futex protection lock");
+			sx_init(&futex_sx, "futex list protection lock");
+			sx_init(&futex_lock, "futex protection lock");
 			linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit,
 			      NULL, 1000);
 			linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, linux_schedtail,
@@ -951,6 +953,7 @@
 			mtx_destroy(&emul_lock);
 			sx_destroy(&emul_shared_lock);
 			sx_destroy(&futex_sx);
+			sx_destroy(&futex_lock);
 			EVENTHANDLER_DEREGISTER(process_exit, linux_exit_tag);
 			EVENTHANDLER_DEREGISTER(schedtail, linux_schedtail_tag);
 			EVENTHANDLER_DEREGISTER(process_exec, linux_exec_tag);
--- modules/Makefile.orig
+++ modules/Makefile
@@ -409,7 +409,6 @@
 _streams=	streams
 _wi=		wi
 _xe=		xe
-.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
 _zfs=		zfs
 .endif
 .if ${MACHINE} == "i386"
@@ -458,7 +457,6 @@
 _pmc=		pmc
 _snc=		snc
 .endif
-.endif
 
 .if ${MACHINE_ARCH} == "amd64"
 _aac=		aac
--- modules/linux/Makefile.orig
+++ modules/linux/Makefile
@@ -14,8 +14,12 @@
 	linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \
 	linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \
 	opt_inet6.h opt_mac.h opt_compat.h opt_posix.h vnode_if.h \
-	device_if.h bus_if.h
-OBJS=	linux${SFX}_locore.o
+	device_if.h bus_if.h assym.s
+
+# XXX: for assym.s
+SRCS+=  opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h
+
+OBJS=	linux${SFX}_locore.o linux${SFX}_support.o
 
 .if ${MACHINE_ARCH} == "i386"
 SRCS+=	linux_ptrace.c imgact_linux.c opt_cpu.h
@@ -41,6 +45,10 @@
 	${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
 	    ${.IMPSRC} -o ${.TARGET}
 
+linux${SFX}_support.o: linux${SFX}_support.s assym.s
+	${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
+	    ${.IMPSRC} -o ${.TARGET}
+
 linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine
 	${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
 
