Merge pull request #800 from eschnett/eschnett/qthreads

Add some qthreads patches
This commit is contained in:
Todd Gamblin 2016-05-05 00:49:32 -07:00
commit 053e687e79
4 changed files with 40 additions and 1 deletions

View file

@ -0,0 +1,11 @@
--- a/configure
+++ b/configure
@@ -40456,7 +40456,7 @@
hwloc_saved_LDFLAGS="$LDFLAGS"
if test "x$with_hwloc" != x; then
CPPFLAGS="-I$with_hwloc/include $CPPFLAGS"
- LDFLAGS="-L$with_hwloc/lib $CPPFLAGS"
+ LDFLAGS="-L$with_hwloc/lib $LDFLAGS"
fi

View file

@ -16,7 +16,12 @@ class Qthreads(Package):
version('1.10', '5af8c8bbe88c2a6d45361643780d1671')
patch("ldflags.patch")
patch("restrict.patch")
patch("trap.patch")
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
configure("--prefix=%s" % prefix,
"--enable-guard-pages")
make()
make("install")

View file

@ -0,0 +1,12 @@
--- a/include/qthread/common.h.in
+++ b/include/qthread/common.h.in
@@ -84,7 +84,9 @@
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
+#ifndef restrict
#undef restrict
+#endif
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the

View file

@ -0,0 +1,11 @@
--- a/include/qthread/qthread.hpp
+++ b/include/qthread/qthread.hpp
@@ -236,7 +236,7 @@
return qthread_incr64((uint64_t *)operand, incr);
default:
- *(int *)(0) = 0;
+ __builtin_trap();
}
return T(0); // never hit - keep compiler happy
}