diff options
author | dholland <dholland> | 2008-08-17 22:40:26 +0000 |
---|---|---|
committer | dholland <dholland> | 2008-08-17 22:40:26 +0000 |
commit | 6dd56f2fe6ea02f629257de12f5e696ce6ad07b1 (patch) | |
tree | 5ac406dc921f65995b8e94aac1ff58b0f204ace9 /net | |
parent | 7b0102e2437ed09788fd2f0bf0edb3feaad60023 (diff) | |
download | pkgsrc-6dd56f2fe6ea02f629257de12f5e696ce6ad07b1.tar.gz |
Add assembler bits for locking on amd64. Fixes broken build, because one
of the modules doesn't compile against the portable locking code. Doesn't
affect other platforms, so no revision bump.
Diffstat (limited to 'net')
-rw-r--r-- | net/ser/distinfo | 5 | ||||
-rw-r--r-- | net/ser/patches/patch-aa | 21 | ||||
-rw-r--r-- | net/ser/patches/patch-ac | 30 |
3 files changed, 49 insertions, 7 deletions
diff --git a/net/ser/distinfo b/net/ser/distinfo index 102d66bc0e5..79a19b7d670 100644 --- a/net/ser/distinfo +++ b/net/ser/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.3 2007/06/01 00:26:36 wiz Exp $ +$NetBSD: distinfo,v 1.4 2008/08/17 22:40:26 dholland Exp $ SHA1 (ser-0.8.14_src.tar.gz) = 91553951247506850d66da25819333b61b150d1d RMD160 (ser-0.8.14_src.tar.gz) = 72c3a0793f3dd88584ee65b3751ccf8a3776f840 Size (ser-0.8.14_src.tar.gz) = 1551881 bytes -SHA1 (patch-aa) = 25ee2488f106859ce1208923d5e5ae762dbe65f1 +SHA1 (patch-aa) = bbf309fef1a0b130d544127f123fedd374235135 SHA1 (patch-ab) = 871de5c826853381eb5b6889d8e3d8b2f310dc6b +SHA1 (patch-ac) = ece24eec7175c1396d76e2b85ff69a4b995e541e SHA1 (patch-ad) = aa7a962546fbfcbecde79d68c0765ae34c2916da diff --git a/net/ser/patches/patch-aa b/net/ser/patches/patch-aa index 5f75f6921d1..6aaac6feb23 100644 --- a/net/ser/patches/patch-aa +++ b/net/ser/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.2 2007/05/31 04:22:10 rillig Exp $ +$NetBSD: patch-aa,v 1.3 2008/08/17 22:40:26 dholland Exp $ ---- Makefile.defs.orig 2004-07-27 13:38:33.000000000 +0200 -+++ Makefile.defs 2007-05-31 06:17:16.000000000 +0200 +--- Makefile.defs.orig 2004-07-27 07:38:33.000000000 -0400 ++++ Makefile.defs 2008-08-17 18:34:04.000000000 -0400 @@ -77,7 +77,7 @@ prefix = $(PREFIX) BASEDIR ?= basedir = $(BASEDIR) @@ -66,7 +66,18 @@ $NetBSD: patch-aa,v 1.2 2007/05/31 04:22:10 rillig Exp $ #set some vars from the environment (and not make builtins) CC := $(shell echo "$${CC}") -@@ -639,6 +650,7 @@ ifeq ($(CC_NAME), suncc) +@@ -384,6 +395,10 @@ ifeq ($(ARCH), i386) + use_fast_lock=yes + endif + ++ifeq ($(ARCH), amd64) ++ use_fast_lock=yes ++endif ++ + ifeq ($(ARCH), sparc64) + ifeq ($(CC_NAME), gcc) + use_fast_lock=yes +@@ -639,6 +654,7 @@ ifeq ($(CC_NAME), suncc) endif endif #mode=release @@ -74,7 +85,7 @@ $NetBSD: patch-aa,v 1.2 2007/05/31 04:22:10 rillig Exp $ #*FLAGS used for compiling the modules -@@ -743,6 +755,19 @@ ifeq ($(OS), netbsd) +@@ -743,6 +759,19 @@ ifeq ($(OS), netbsd) LIBS= -lfl endif diff --git a/net/ser/patches/patch-ac b/net/ser/patches/patch-ac new file mode 100644 index 00000000000..98919ca3d0f --- /dev/null +++ b/net/ser/patches/patch-ac @@ -0,0 +1,30 @@ +$NetBSD: patch-ac,v 1.1 2008/08/17 22:40:26 dholland Exp $ + +--- fastlock.h.orig 2008-08-17 18:36:52.000000000 -0400 ++++ fastlock.h 2008-08-17 18:36:55.000000000 -0400 +@@ -77,6 +77,11 @@ inline static int tsl(fl_lock_t* lock) + " xchg %b1, %0" : "=q" (val), "=m" (*lock) : "0" (val) : "memory" + ); + #endif /*NOSMP*/ ++#elif defined __CPU_amd64 ++ val=1; ++ asm volatile( ++ " xchg %b1, %0" : "=q" (val), "=m" (*lock) : "0" (val) : "memory" ++ ); + #elif defined __CPU_sparc64 + asm volatile( + "ldstub [%1], %0 \n\t" +@@ -142,6 +147,13 @@ inline static void release_lock(fl_lock_ + " movb $0, (%0)" : /*no output*/ : "r"(lock): "memory" + /*" xchg %b0, %1" : "=q" (val), "=m" (*lock) : "0" (val) : "memory"*/ + ); ++#elif defined __CPU_amd64 ++ char val; ++ val=0; ++ asm volatile( ++ " movb $0, (%0)" : /*no output*/ : "r"(lock): "memory" ++ /*" xchg %b0, %1" : "=q" (val), "=m" (*lock) : "0" (val) : "memory"*/ ++ ); + #elif defined __CPU_sparc64 + asm volatile( + #ifndef NOSMP |