Add some qthreads patches
This commit is contained in:
		
							
								
								
									
										11
									
								
								var/spack/repos/builtin/packages/qthreads/ldflags.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								var/spack/repos/builtin/packages/qthreads/ldflags.patch
									
									
									
									
									
										Normal 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
 | 
			
		||||
   
 | 
			
		||||
   
 | 
			
		||||
@@ -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")
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								var/spack/repos/builtin/packages/qthreads/restrict.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								var/spack/repos/builtin/packages/qthreads/restrict.patch
									
									
									
									
									
										Normal 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
 | 
			
		||||
							
								
								
									
										11
									
								
								var/spack/repos/builtin/packages/qthreads/trap.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								var/spack/repos/builtin/packages/qthreads/trap.patch
									
									
									
									
									
										Normal 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
 | 
			
		||||
 }
 | 
			
		||||
		Reference in New Issue
	
	Block a user