[79740] trunk/dports/devel/boehmgc

jeremyhu at macports.org jeremyhu at macports.org
Fri Jun 24 10:10:57 PDT 2011


Revision: 79740
          http://trac.macports.org/changeset/79740
Author:   jeremyhu at macports.org
Date:     2011-06-24 10:10:57 -0700 (Fri, 24 Jun 2011)
Log Message:
-----------
boehmgc: Fix inline asm bugs

Modified Paths:
--------------
    trunk/dports/devel/boehmgc/Portfile

Added Paths:
-----------
    trunk/dports/devel/boehmgc/files/
    trunk/dports/devel/boehmgc/files/asm.patch

Modified: trunk/dports/devel/boehmgc/Portfile
===================================================================
--- trunk/dports/devel/boehmgc/Portfile	2011-06-24 17:08:20 UTC (rev 79739)
+++ trunk/dports/devel/boehmgc/Portfile	2011-06-24 17:10:57 UTC (rev 79740)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name		boehmgc
 version		7.1
+revision        1
 categories	devel
 maintainers	waqar openmaintainer
 description	Boehm-Demers-Weiser conservative garbage collector
@@ -21,27 +22,16 @@
 configure.args  --with-threads=posix \
 		--enable-cplusplus
 
+configure.cppflags-append -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE
+
 variant redirect {
 	configure.args-append  --enable-redirect-malloc
 }
 
-platform darwin 9 {
-	configure.cflags-append -D_NONSTD_SOURCE
-}
+# Note that this was "fixed" differently in upstream's svn.
+# Their "fix" is wrong, and this one is correct.
+patchfiles asm.patch
 
-platform darwin 10 {
-	configure.cflags-append -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE
-}
-
-platform darwin 11 {
-	configure.cflags-append -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE
-
-	# BUILD FIX TODO:
-	# llvm-gcc-4.2 and clang fail to build os_dep.c as of 2011.06.15
-	# This is an error in the package.
-	configure.compiler gcc-4.2
-}
-
 test.run	yes
 test.target	check
 

Added: trunk/dports/devel/boehmgc/files/asm.patch
===================================================================
--- trunk/dports/devel/boehmgc/files/asm.patch	                        (rev 0)
+++ trunk/dports/devel/boehmgc/files/asm.patch	2011-06-24 17:10:57 UTC (rev 79740)
@@ -0,0 +1,24 @@
+diff -Naurp gc-7.1.orig/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h gc-7.1/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h
+--- libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h	2008-02-01 11:57:17.000000000 -0800
++++ libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86.h	2011-06-24 10:01:50.000000000 -0700
+@@ -113,7 +113,7 @@ AO_test_and_set_full(volatile AO_TS_t *a
+   /* Note: the "xchg" instruction does not need a "lock" prefix */
+   __asm__ __volatile__("xchgb %0, %1"
+ 		: "=q"(oldval), "=m"(*addr)
+-		: "0"(0xff), "m"(*addr) : "memory");
++		: "0"((unsigned char)0xff), "m"(*addr) : "memory");
+   return (AO_TS_VAL_t)oldval;
+ }
+ 
+diff -Naurp gc-7.1.orig/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h gc-7.1/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h
+--- libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h	2008-01-05 19:34:51.000000000 -0800
++++ libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h	2011-06-24 10:01:59.000000000 -0700
+@@ -126,7 +126,7 @@ AO_test_and_set_full(volatile AO_TS_t *a
+   /* Note: the "xchg" instruction does not need a "lock" prefix */
+   __asm__ __volatile__("xchgb %0, %1"
+ 		: "=q"(oldval), "=m"(*addr)
+-		: "0"(0xff), "m"(*addr) : "memory");
++		: "0"((unsigned char)0xff), "m"(*addr) : "memory");
+   return (AO_TS_VAL_t)oldval;
+ }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110624/23570c4e/attachment.html>


More information about the macports-changes mailing list