2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-19 17:59:58 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class BdwGc < Formula
|
2012-02-06 20:42:44 +00:00
|
|
|
# upstream recommends using 7.2alpha6 over 7.1
|
2009-11-21 06:52:02 +00:00
|
|
|
homepage 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/'
|
2012-02-06 20:42:44 +00:00
|
|
|
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha6.tar.gz'
|
|
|
|
md5 '319d0b18cc4eb735c8038ece9df055e4'
|
|
|
|
version '7.2alpha6'
|
2009-09-19 17:59:58 +00:00
|
|
|
|
2011-10-30 02:59:34 +00:00
|
|
|
def patches
|
2012-02-15 15:32:24 +00:00
|
|
|
# fix inline ASM issues with LLVM
|
|
|
|
# fix Makefile double-install
|
|
|
|
# both fixes already upstream
|
|
|
|
DATA
|
2011-10-30 02:59:34 +00:00
|
|
|
end
|
2010-06-16 18:50:36 +00:00
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2011-11-15 22:33:48 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2012-01-27 19:02:30 +00:00
|
|
|
"--prefix=#{prefix}",
|
2011-11-15 22:33:48 +00:00
|
|
|
"--enable-cplusplus"
|
2011-10-30 02:59:34 +00:00
|
|
|
system "make"
|
|
|
|
system "make check"
|
2009-09-19 17:59:58 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2011-11-15 22:33:48 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h b/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h
|
|
|
|
index 5e6d7fa..c0845ba 100644
|
|
|
|
--- a/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h
|
|
|
|
+++ b/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86.h
|
|
|
|
@@ -113,7 +113,7 @@ AO_test_and_set_full(volatile AO_TS_t *addr)
|
|
|
|
/* 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;
|
|
|
|
}
|
|
|
|
#define AO_HAVE_test_and_set_full
|
|
|
|
diff --git a/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h b/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
|
|
|
|
index 0f68c1e..b3b57f9 100644
|
|
|
|
--- a/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
|
|
|
|
+++ b/libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h
|
|
|
|
@@ -110,7 +110,7 @@ AO_test_and_set_full(volatile AO_TS_t *addr)
|
|
|
|
/* 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;
|
|
|
|
}
|
|
|
|
#define AO_HAVE_test_and_set_full
|
2012-02-15 15:32:24 +00:00
|
|
|
|
|
|
|
diff --git a/Makefile.in b/Makefile.in
|
|
|
|
index 09dea13..1f4356e 100644
|
|
|
|
--- a/Makefile.in
|
|
|
|
+++ b/Makefile.in
|
|
|
|
@@ -108,7 +108,6 @@ check_PROGRAMS = gctest$(EXEEXT) leaktest$(EXEEXT) middletest$(EXEEXT) \
|
|
|
|
# C++ Interface
|
|
|
|
# -------------
|
|
|
|
@CPLUSPLUS_TRUE@am__append_5 = libgccpp.la
|
|
|
|
-@CPLUSPLUS_TRUE@am__append_6 = include/gc_cpp.h include/gc_allocator.h
|
|
|
|
DIST_COMMON = $(am__configure_deps) $(am__pkginclude_HEADERS_DIST) \
|
|
|
|
$(dist_noinst_HEADERS) $(dist_noinst_SCRIPTS) \
|
|
|
|
$(dist_pkgdata_DATA) $(include_HEADERS) $(srcdir)/Makefile.am \
|
|
|
|
@@ -579,7 +578,7 @@ include_HEADERS = include/extra/gc.h include/extra/gc_cpp.h
|
|
|
|
|
|
|
|
# installed headers
|
|
|
|
#
|
|
|
|
-pkginclude_HEADERS = $(am__append_6) include/gc.h include/gc_typed.h \
|
|
|
|
+pkginclude_HEADERS = include/gc.h include/gc_typed.h \
|
|
|
|
include/gc_inline.h include/gc_mark.h include/gc_cpp.h \
|
|
|
|
include/weakpointer.h include/new_gc_alloc.h \
|
|
|
|
include/gc_allocator.h include/gc_backptr.h include/gc_gcj.h \
|