- New upstream 2.1

- Drop soname patch, parallel make patch, and GCC 4.3 patch
This commit is contained in:
Petr Machata 2008-06-13 12:55:48 +00:00
parent a645b4b899
commit 68bb783d0d
6 changed files with 38 additions and 466 deletions

View File

@ -1,5 +1,4 @@
301111_301111.pdf
301114_301114.pdf
301132_301132.pdf
312687_312687.pdf
tbb20_20070927oss_src.tar.gz
tbb21_20080605oss_src.tgz
Getting_Started.pdf
Reference_Manual.pdf
Tutorial.pdf

View File

@ -1,5 +1,4 @@
af809ce2b1e33d3fdb2ca2a756a08ace 301111_301111.pdf
e5a46b0638e0337cb7ebee0c1d832f7d 301114_301114.pdf
1eb7ef6b85b5a7580b300e8e76a3029e 301132_301132.pdf
0faf9fcb09fd53cfd6059ee554671d7d 312687_312687.pdf
22de880c793d5013235fb8c3010e8f67 tbb20_20070927oss_src.tar.gz
6accb7e86dff355cd8cfbc9de1225c8d tbb21_20080605oss_src.tgz
270b7c6bf8962e1a84296e709150f152 Getting_Started.pdf
a63542fb8f9335f5e1c22c5b7a95d23b Reference_Manual.pdf
dfd58635ecd01f68c2c13f46760afa26 Tutorial.pdf

View File

@ -1,312 +0,0 @@
diff -urp tbb20_20070927oss_src/src/test/harness_memory.h tbb20_20070927oss_src.pm3/src/test/harness_memory.h
--- tbb20_20070927oss_src/src/test/harness_memory.h 2007-09-28 22:13:25.000000000 +0200
+++ tbb20_20070927oss_src.pm3/src/test/harness_memory.h 2007-12-19 20:00:49.000000000 +0100
@@ -59,7 +59,7 @@ static size_t GetMemoryUsage() {
size_t pagesize = getpagesize();
ASSERT( statsfile, NULL );
long total_mem;
- fscanf(statsfile,"%lu",&total_mem);
+ ASSERT( fscanf(statsfile,"%lu",&total_mem) == 1, NULL );
fclose(statsfile);
return total_mem*pagesize;
#elif __APPLE__
diff -urp tbb20_20070927oss_src.orig/src/test/test_concurrent_hash_map.cpp tbb20_20070927oss_src/src/test/test_concurrent_hash_map.cpp
--- tbb20_20070927oss_src.orig/src/test/test_concurrent_hash_map.cpp 2008-01-31 16:03:16.000000000 +0100
+++ tbb20_20070927oss_src/src/test/test_concurrent_hash_map.cpp 2008-01-31 16:04:29.000000000 +0100
@@ -177,7 +177,7 @@ public:
};
template<typename Op>
-void DoConcurrentOperations( MyTable& table, int n, char* what, int nthread ) {
+void DoConcurrentOperations( MyTable& table, int n, char const* what, int nthread ) {
if( Verbose )
printf("testing %s with %d threads\n",what,nthread);
tbb::tick_count t0 = tbb::tick_count::now();
diff -urp tbb20_20070927oss_src/include/tbb/concurrent_hash_map.h tbb20_20070927oss_src.ORIG/include/tbb/concurrent_hash_map.h
--- tbb20_20070927oss_src.orig/include/tbb/concurrent_hash_map.h 2008-02-08 17:17:13.000000000 +0100
+++ tbb20_20070927oss_src/include/tbb/concurrent_hash_map.h 2008-02-08 19:04:49.000000000 +0100
@@ -584,7 +584,7 @@ bool concurrent_hash_map<Key,T,HashCompa
__TBB_ASSERT( op!=op_insert, NULL );
goto done;
}
+ __TBB_ASSERT( (s.my_physical_size&(s.my_physical_size-1))==0, NULL );
- __TBB_ASSERT( (s.my_physical_size&s.my_physical_size-1)==0, NULL );
chain& c = s.get_chain(h,n_segment_bits);
chain_mutex_t::scoped_lock chain_lock( c.mutex, /*write=*/false );
b = search_list(key,c);
diff -urp tbb20_20070927oss_src.orig/src/test/test_model_plugin.cpp tbb20_20070927oss_src/src/test/test_model_plugin.cpp
--- tbb20_20070927oss_src.orig/src/test/test_model_plugin.cpp 2008-01-31 16:03:16.000000000 +0100
+++ tbb20_20070927oss_src/src/test/test_model_plugin.cpp 2008-01-31 16:18:43.000000000 +0100
@@ -97,7 +97,7 @@ void plugin_call(int maxthread)
extern "C" void plugin_call(int);
-void report_error_in(char* function_name)
+void report_error_in(char const* function_name)
{
#if _WIN32 || _WIN64
char* message;
@@ -141,9 +141,9 @@ int main(int argc, char* argv[])
}
#else
#if __APPLE__
- char *dllname = "test_model_plugin.dylib";
+ char const*dllname = "test_model_plugin.dylib";
#else
- char *dllname = "test_model_plugin.so";
+ char const*dllname = "test_model_plugin.so";
#endif
void* hLib = dlopen( dllname, RTLD_LAZY );
if (hLib==NULL){
diff -urp tbb20_20070927oss_src.orig/src/test/test_yield.cpp tbb20_20070927oss_src/src/test/test_yield.cpp
--- tbb20_20070927oss_src.orig/src/test/test_yield.cpp 2008-01-31 17:01:07.000000000 +0100
+++ tbb20_20070927oss_src/src/test/test_yield.cpp 2008-01-31 17:01:13.000000000 +0100
@@ -63,7 +63,7 @@ struct RoundRobin {
}
};
-int main( long argc, char* argv[] ) {
+int main( int argc, char* argv[] ) {
// Set defaults
MaxThread = MinThread = 3;
ParseCommandLine( argc, argv );
diff -urp tbb20_20070927oss_src.orig/src/test/test_parallel_scan.cpp tbb20_20070927oss_src/src/test/test_parallel_scan.cpp
--- tbb20_20070927oss_src.orig/src/test/test_parallel_scan.cpp 2008-01-31 16:33:43.000000000 +0100
+++ tbb20_20070927oss_src/src/test/test_parallel_scan.cpp 2008-01-31 16:43:05.000000000 +0100
@@ -128,7 +128,7 @@ public:
else
printf("%d computing %s [%ld..%ld) [%ld..%ld)\n",id,tag.is_final_scan()?"final":"lookahead",my_range.begin(),my_range.end(),r.begin(),r.end());
#endif /* PRINT_DEBUG */
- ASSERT( !tag.is_final_scan() || my_range.begin()==0 && my_range.end()==r.begin() || my_range.empty() && r.begin()==0, NULL );
+ ASSERT( !tag.is_final_scan() || (my_range.begin()==0 && my_range.end()==r.begin()) || (my_range.empty() && r.begin()==0), NULL );
for( long i=r.begin(); i<r.end(); ++i ) {
my_total += my_array[i];
if( tag.is_final_scan() ) {
diff -urp tbb20_20070927oss_src.orig/src/tbbmalloc/MemoryAllocator.cpp tbb20_20070927oss_src/src/tbbmalloc/MemoryAllocator.cpp
--- tbb20_20070927oss_src.orig/src/tbbmalloc/MemoryAllocator.cpp 2008-01-31 13:47:01.000000000 +0100
+++ tbb20_20070927oss_src/src/tbbmalloc/MemoryAllocator.cpp 2008-01-31 13:49:32.000000000 +0100
@@ -179,13 +179,11 @@ static void* getMemory (size_t bytes)
static void returnMemory(void *area, size_t bytes)
{
- int retcode = UnmapMemory(area, bytes);
+ if (UnmapMemory(area, bytes)) {
#ifdef MALLOC_TRACE
- if (retcode) {
TRACEF("ScalableMalloc trace - returnMemory unsuccess for %p; perhaps it has already been freed or was never allocated.\n", area);
- }
#endif
- return;
+ }
}
/********* End memory acquisition code ********************************/
diff -urp tbb20_20070927oss_src.orig/src/tbbmalloc/MemoryAllocator.cpp tbb20_20070927oss_src/src/tbbmalloc/MemoryAllocator.cpp
--- tbb20_20070927oss_src.orig/src/tbbmalloc/MemoryAllocator.cpp 2008-01-31 14:07:33.000000000 +0100
+++ tbb20_20070927oss_src/src/tbbmalloc/MemoryAllocator.cpp 2008-01-31 14:10:03.000000000 +0100
@@ -32,7 +32,7 @@
#ifdef MALLOC_TRACE
#define TRACEF printf
#else
-static inline int TRACEF(char *arg, ...)
+static inline int TRACEF(char const* arg, ...)
{
return 0;
}
@@ -683,12 +683,11 @@ static void outofTLSBin (Bin* bin, Block
static Bin* initMallocTLS (void)
{
Bin* tls;
- int i;
MALLOC_ASSERT( tlsSize >= sizeof(Bin) * numBlockBins, ASSERT_TEXT );
tls = (Bin*) bootStrapMalloc(tlsSize);
/* the block contains zeroes after bootStrapMalloc, so bins are initialized */
#ifdef MALLOC_DEBUG
- for (i = 0; i < numBlockBinLimit; i++) {
+ for (int i = 0; i < numBlockBinLimit; i++) {
MALLOC_ASSERT( tls[i].activeBlk == 0, ASSERT_TEXT );
MALLOC_ASSERT( tls[i].mailbox == 0, ASSERT_TEXT );
}
diff -urp tbb20_20070927oss_src.orig/src/tbb/concurrent_vector.cpp tbb20_20070927oss_src/src/tbb/concurrent_vector.cpp
--- tbb20_20070927oss_src.orig/src/tbb/concurrent_vector.cpp 2008-01-31 14:07:33.000000000 +0100
+++ tbb20_20070927oss_src/src/tbb/concurrent_vector.cpp 2008-01-31 14:21:46.000000000 +0100
@@ -31,6 +31,7 @@
#include <stdexcept>
#include "itt_notify.h"
#include "tbb/task.h"
+#include <string.h>
namespace tbb {
diff -urp tbb20_20070927oss_src.orig/include/tbb/concurrent_vector.h tbb20_20070927oss_src/include/tbb/concurrent_vector.h
--- tbb20_20070927oss_src.orig/include/tbb/concurrent_vector.h 2008-01-31 15:39:02.000000000 +0100
+++ tbb20_20070927oss_src/include/tbb/concurrent_vector.h 2008-01-31 15:48:04.000000000 +0100
@@ -280,7 +280,7 @@ public: // workaround for MSVC
size_t k = ++my_index;
if( my_item ) {
// Following test uses 2's-complement wizardry
- if( (k& k-2)==0 ) {
+ if( (k& (k-2))==0 ) {
// k is a power of two that is at least k-2
my_item= NULL;
} else {
@@ -296,7 +296,7 @@ public: // workaround for MSVC
size_t k = my_index--;
if( my_item ) {
// Following test uses 2's-complement wizardry
- if( (k& k-2)==0 ) {
+ if( (k& (k-2))==0 ) {
// k is a power of two that is at least k-2
my_item= NULL;
} else {
diff -urp tbb20_20070927oss_src.orig/src/tbbmalloc/Statistics.h tbb20_20070927oss_src/src/tbbmalloc/Statistics.h
--- tbb20_20070927oss_src.orig/src/tbbmalloc/Statistics.h 2008-01-31 14:07:33.000000000 +0100
+++ tbb20_20070927oss_src/src/tbbmalloc/Statistics.h 2008-01-31 14:16:12.000000000 +0100
@@ -66,7 +66,7 @@ static inline int STAT_increment(int thr
return ++(statistic[thread][bin].counter[ctr]);
}
#else
-#define STAT_increment(a,b,c) ((int)0)
+#define STAT_increment(a,b,c) ((void)0)
#endif
static inline void STAT_print(int thread)
diff -urp tbb20_20070927oss_src.orig/src/tbb/task.cpp tbb20_20070927oss_src/src/tbb/task.cpp
--- tbb20_20070927oss_src.orig/src/tbb/task.cpp 2008-01-31 15:22:32.000000000 +0100
+++ tbb20_20070927oss_src/src/tbb/task.cpp 2008-01-31 15:28:11.000000000 +0100
@@ -393,7 +393,7 @@ static inline bool IsGenuineIntel() {
bool result = true;
#if defined(__TBB_cpuid)
char info[16];
- char *genuine_string = "GenuntelineI";
+ static char const genuine_string[] = "GenuntelineI";
__TBB_x86_cpuid( reinterpret_cast<int *>(info), 0 );
// The multibyte chars below spell "GenuineIntel".
//if( info[1]=='uneG' && info[3]=='Ieni' && info[2]=='letn' ) {
diff -urp tbb20_20070927oss_src.orig/src/tbb/pipeline.cpp tbb20_20070927oss_src/src/tbb/pipeline.cpp
--- tbb20_20070927oss_src.orig/src/tbb/pipeline.cpp 2008-01-31 15:08:02.000000000 +0100
+++ tbb20_20070927oss_src/src/tbb/pipeline.cpp 2008-01-31 15:14:19.000000000 +0100
@@ -62,6 +62,10 @@ class ordered_buffer {
//! Initial size for "array"
/** Must be a power of 2 */
static const size_type initial_buffer_size = 4;
+
+ static inline size_type getindex(size_type token, size_type size) {
+ return token & (size - 1);
+ }
public:
//! Construct empty buffer.
ordered_buffer() : array(NULL), array_size(0), low_token(0) {
@@ -92,7 +96,7 @@ public:
if( token-low_token>=array_size )
grow( token-low_token+1 );
ITT_NOTIFY( sync_releasing, this );
- array[token&array_size-1] = &putter;
+ array[getindex(token, array_size)] = &putter;
}
}
return result;
@@ -106,7 +110,7 @@ public:
spin_mutex::scoped_lock lock( array_mutex );
if( token==low_token ) {
// Wake the next task
- task*& item = array[++low_token & array_size-1];
+ task*& item = array[getindex(++low_token, array_size)];
ITT_NOTIFY( sync_acquired, this );
wakee = item;
item = NULL;
@@ -129,7 +133,7 @@ void ordered_buffer::grow( size_type min
new_array[i] = NULL;
long t=low_token;
for( size_type i=0; i<old_size; ++i, ++t )
- new_array[t&new_size-1] = old_array[t&old_size-1];
+ new_array[getindex(t, new_size)] = old_array[getindex(t, old_size)];
array = new_array;
array_size = new_size;
if( old_array )
diff -urp tbb20_20070927oss_src/src/tbb/concurrent_queue.cpp tbb20_20070927oss_src.pm/src/tbb/concurrent_queue.cpp
--- tbb20_20070927oss_src/src/tbb/concurrent_queue.cpp 2007-09-28 22:13:24.000000000 +0200
+++ tbb20_20070927oss_src.pm/src/tbb/concurrent_queue.cpp 2008-01-31 14:59:23.000000000 +0100
@@ -135,6 +135,10 @@ public:
//! Value for effective_capacity that denotes unbounded queue.
static const ptrdiff_t infinite_capacity = ptrdiff_t(~size_t(0)/2);
+
+ static inline size_t getindex(ticket k, concurrent_queue_base const& base) {
+ return ((k/concurrent_queue_rep::n_queue) & (base.items_per_page-1));
+ }
};
#if _MSC_VER && !defined(__INTEL_COMPILER)
@@ -149,7 +153,7 @@ public:
void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base ) {
k &= -concurrent_queue_rep::n_queue;
page* p = NULL;
- size_t index = (k/concurrent_queue_rep::n_queue & base.items_per_page-1);
+ size_t index = concurrent_queue_rep::getindex(k, base);
if( !index ) {
size_t n = sizeof(page) + base.items_per_page*base.item_size;
p = static_cast<page*>(operator new( n ));
@@ -181,7 +185,7 @@ bool micro_queue::pop( void* dst, ticket
SpinwaitWhileEq( tail_counter, k );
page& p = *head_page;
__TBB_ASSERT( &p, NULL );
- size_t index = (k/concurrent_queue_rep::n_queue & base.items_per_page-1);
+ size_t index = concurrent_queue_rep::getindex(k, base);
bool success = false;
{
pop_finalizer finalizer( *this, k+concurrent_queue_rep::n_queue, index==base.items_per_page-1 ? &p : NULL );
@@ -319,7 +323,7 @@ public:
else {
concurrent_queue_base::page* p = array[concurrent_queue_rep::index(k)];
__TBB_ASSERT(p,NULL);
- size_t i = k/concurrent_queue_rep::n_queue & my_queue.items_per_page-1;
+ size_t i = concurrent_queue_rep::getindex(k, my_queue);
return static_cast<unsigned char*>(static_cast<void*>(p+1)) + my_queue.item_size*i;
}
}
@@ -351,7 +355,7 @@ void concurrent_queue_iterator_base::adv
size_t k = my_rep->head_counter;
const concurrent_queue_base& queue = my_rep->my_queue;
__TBB_ASSERT( my_item==my_rep->choose(k), NULL );
- size_t i = k/concurrent_queue_rep::n_queue & queue.items_per_page-1;
+ size_t i = concurrent_queue_rep::getindex(k, queue);
if( i==queue.items_per_page-1 ) {
concurrent_queue_base::page*& root = my_rep->array[concurrent_queue_rep::index(k)];
root = root->next;
diff -urp tbb20_20070927oss_src.orig/include/tbb/concurrent_hash_map.h tbb20_20070927oss_src/include/tbb/concurrent_hash_map.h
--- tbb20_20070927oss_src.orig/include/tbb/concurrent_hash_map.h 2008-01-31 16:03:16.000000000 +0100
+++ tbb20_20070927oss_src/include/tbb/concurrent_hash_map.h 2008-01-31 16:10:02.000000000 +0100
@@ -328,7 +328,7 @@ private:
};
segment& get_segment( hashcode_t hashcode ) {
- return my_segment[hashcode&n_segment-1];
+ return my_segment[hashcode&(n_segment-1)];
}
HashCompare my_hash_compare;
diff -urp tbb20_20070927oss_src.orig/include/tbb/parallel_scan.h tbb20_20070927oss_src/include/tbb/parallel_scan.h
--- tbb20_20070927oss_src.orig/include/tbb/parallel_scan.h 2008-01-31 16:19:28.000000000 +0100
+++ tbb20_20070927oss_src/include/tbb/parallel_scan.h 2008-01-31 16:30:17.000000000 +0100
@@ -232,7 +232,7 @@ namespace internal {
is_final = false;
}
task* next_task = NULL;
- if( is_right_child && !treat_as_stolen || partitioner.should_execute_range(range, *this) ) {
+ if( (is_right_child && !treat_as_stolen) || partitioner.should_execute_range(range, *this) ) {
if( is_final )
(body->body)( range, final_scan_tag() );
else if( sum )
diff -urp tbb20_20070927oss_src/src/tbb/cache_aligned_allocator.cpp tbb20_20070927oss_src.pm/src/tbb/cache_aligned_allocator.cpp
--- tbb20_20070927oss_src/src/tbb/cache_aligned_allocator.cpp 2007-09-28 22:13:24.000000000 +0200
+++ tbb20_20070927oss_src.pm/src/tbb/cache_aligned_allocator.cpp 2008-02-08 12:51:36.000000000 +0100
@@ -129,7 +129,7 @@ void* NFS_Allocate( size_t n, size_t ele
using namespace internal;
size_t m = NFS_LineSize;
__TBB_ASSERT( m<=NFS_MaxLineSize, "illegal value for NFS_LineSize" );
- __TBB_ASSERT( (m & m-1)==0, "must be power of two" );
+ __TBB_ASSERT( (m & (m-1))==0, "must be power of two" );
size_t bytes = n*element_size;
unsigned char* base;
if( bytes<n || bytes+m<bytes || !(base=(unsigned char*)(bytes>=BigSize?malloc(m+bytes):(*MallocHandler)(m+bytes))) ) {

View File

@ -1,57 +0,0 @@
diff -urp tbb20_20070927oss_src/Makefile tbb20_20070927oss_src.pm2/Makefile
--- tbb20_20070927oss_src/Makefile 2007-09-28 22:13:21.000000000 +0200
+++ tbb20_20070927oss_src.pm2/Makefile 2007-12-19 19:46:26.000000000 +0100
@@ -25,6 +25,7 @@
# the GNU General Public License.
tbb_root?=.
+orig_tbb_root:=$(tbb_root)
include $(tbb_root)/build/common.inc
.PHONY: all tbb tbbmalloc test debug examples clean
@@ -47,6 +48,9 @@ examples: tbb tbbmalloc examples_debug c
clean: clean_release clean_debug clean_examples
@echo clean done
+# Introduce explicit dependencies to aid parallel make.
+test_release: tbb_release
+tbbmalloc_test_release: tbbmalloc_release
.PHONY: tbb_release tbb_debug test_release test_debug
@@ -57,11 +60,15 @@ tbb_release: mkdir_release
tbb_debug: mkdir_debug
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug tbb_root=$(tbb_root)
-test_release: mkdir_release tbb_release test_release_no_depends
+test_release: mkdir_release tbb_release
+ $(MAKE) cfg=release tbb_root=$(orig_tbb_root) test_release_no_depends
+
test_release_no_depends:
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root)
-test_debug: tbb_debug mkdir_debug test_debug_no_depends
+test_debug: tbb_debug mkdir_debug
+ $(MAKE) cfg=release tbb_root=$(orig_tbb_root) test_debug_no_depends
+
test_debug_no_depends:
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root)
@@ -73,11 +80,15 @@ tbbmalloc_release: mkdir_release
tbbmalloc_debug: mkdir_debug
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc tbb_root=$(tbb_root)
-tbbmalloc_test_release: tbb_release tbbmalloc_release mkdir_release tbbmalloc_test_release_no_depends
+tbbmalloc_test_release: tbb_release tbbmalloc_release mkdir_release
+ $(MAKE) cfg=release tbb_root=$(orig_tbb_root) tbbmalloc_test_release_no_depends
+
tbbmalloc_test_release_no_depends:
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=$(tbb_root)
-tbbmalloc_test_debug: tbb_debug tbbmalloc_debug mkdir_debug tbbmalloc_test_debug_no_depends
+tbbmalloc_test_debug: tbb_debug tbbmalloc_debug mkdir_debug
+ $(MAKE) cfg=release tbb_root=$(orig_tbb_root) tbbmalloc_test_debug_no_depends
+
tbbmalloc_test_debug_no_depends:
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root)

View File

@ -1,52 +0,0 @@
diff -ur tbb-2.0r014/build/Makefile.tbb tbb-2.0r014.test/build/Makefile.tbb
--- tbb-2.0r014/build/Makefile.tbb 2007-09-21 21:16:34.000000000 -0400
+++ tbb-2.0r014.test/build/Makefile.tbb 2007-12-15 17:28:09.000000000 -0500
@@ -74,9 +74,12 @@
# Object files that gmake up TBB (TBB_ASM.OBJ is platform-specific)
TBB.OBJ = $(TBB_CPLUS.OBJ) $(TBB_ASM.OBJ)
+LIB_LINK_FLAGS += -Wl,-soname=$(TBB.DLL).$(SONAME_SUFFIX)
$(TBB.DLL): $(TBB.OBJ) $(TBB.DEF) $(TBB.RES) tbbvars
- $(CPLUS) $(TBB.OBJ) $(TBB.RES) $(LIBS) $(PIC_KEY) $(OUTPUT_KEY)$(TBB.DLL) $(LIB_LINK_FLAGS)
+ $(CPLUS) $(TBB.OBJ) $(TBB.RES) $(LIBS) $(PIC_KEY) $(OUTPUT_KEY)$(TBB.DLL).$(VERSION) $(LIB_LINK_FLAGS)
+ ln -s $(TBB.DLL).$(VERSION) $(TBB.DLL).$(SONAME_SUFFIX)
+ ln -s $(TBB.DLL).$(VERSION) $(TBB.DLL)
#clean:
diff -ur tbb-2.0r014/build/Makefile.tbbmalloc tbb-2.0r014.test/build/Makefile.tbbmalloc
--- tbb-2.0r014/build/Makefile.tbbmalloc 2007-09-21 21:16:34.000000000 -0400
+++ tbb-2.0r014.test/build/Makefile.tbbmalloc 2007-12-15 17:28:32.000000000 -0500
@@ -58,6 +58,7 @@
# MALLOC_CPLUS.OBJ is built in two steps due to Intel Compiler Tracker # C69574
MALLOC.OBJ := $(MALLOC_CPLUS.OBJ) $(MALLOC_ASM.OBJ) $(MALLOC_CUSTOM.OBJ) MemoryAllocator.$(OBJ)
MALLOC_CPLUS.OBJ += MemoryAllocator.$(OBJ)
+LIB_LINK_FLAGS += -Wl,-soname=$(MALLOC.DLL).$(SONAME_SUFFIX)
M_CPLUS_FLAGS := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS))
$(MALLOC_CPLUS.OBJ): %.$(OBJ): %.cpp
@@ -69,7 +70,9 @@
$(MALLOC.DLL): TBB.DEF=$(MALLOC.DEF)
$(MALLOC.DLL): $(MALLOC.OBJ) $(MALLOC.DEF) $(TBBMALLOC.RES)
- $(CPLUS) $(MALLOC.OBJ) $(TBBMALLOC.RES) $(LIBS) $(PIC_KEY) $(OUTPUT_KEY)$(MALLOC.DLL) $(LIB_LINK_FLAGS)
+ $(CPLUS) $(MALLOC.OBJ) $(TBBMALLOC.RES) $(LIBS) $(PIC_KEY) $(OUTPUT_KEY)$(MALLOC.DLL).$(VERSION) $(LIB_LINK_FLAGS)
+ ln -s $(MALLOC.DLL).$(VERSION) $(MALLOC.DLL).$(SONAME_SUFFIX)
+ ln -s $(MALLOC.DLL).$(VERSION) $(MALLOC.DLL)
malloc: $(MALLOC.DLL)
diff -ur tbb-2.0r014/build/common.inc tbb-2.0r014.test/build/common.inc
--- tbb-2.0r014/build/common.inc 2007-09-21 21:16:34.000000000 -0400
+++ tbb-2.0r014.test/build/common.inc 2007-12-15 16:43:10.000000000 -0500
@@ -24,6 +24,9 @@
# invalidate any other reasons why the executable file might be covered by
# the GNU General Public License.
+VERSION=2.0.014
+SONAME_SUFFIX=2
+
ifndef tbb_os
ifeq ($(OS), Windows_NT)
export tbb_os=windows

View File

@ -1,23 +1,26 @@
%define releasedate 20070927
%define sourcebasename tbb20_%{releasedate}oss_src
%define sourcefilename %{sourcebasename}.tar.gz
%define releasedate 20080605
%define major 2
%define minor 1
%define sourcebasename tbb%{major}%{minor}_%{releasedate}oss
%define sourcefilename %{sourcebasename}_src.tgz
Summary: The Threading Building Blocks library abstracts low-level threading details
Name: tbb
Version: 2.0
Release: 4.%{releasedate}%{?dist}
Version: %{major}.%{minor}
Release: 1.%{releasedate}%{?dist}
License: GPLv2 with exceptions
Group: Development/Tools
URL: http://threadingbuildingblocks.org/
Source: http://threadingbuildingblocks.org/uploads/77/84/2.0/%{sourcefilename}
Source2: http://cache-www.intel.com/cd/00/00/30/11/301111_301111.pdf
Source3: http://cache-www.intel.com/cd/00/00/30/11/301114_301114.pdf
Source4: http://cache-www.intel.com/cd/00/00/30/11/301132_301132.pdf
Source5: http://cache-www.intel.com/cd/00/00/31/26/312687_312687.pdf
Patch0: tbb-2.0-20070927-soname.patch
# RPM can't handle spaces in specs, so rename official files. Get rid
# of "(Open Source)" suffix while at it.
# http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/Getting Started (Open Source).pdf
Source2: Getting_Started.pdf
# http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/Reference Manual (Open Source).pdf
Source3: Reference_Manual.pdf
# http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/Tutorial (Open Source).pdf
Source4: Tutorial.pdf
Patch1: tbb-2.0-20070927-cxxflags.patch
Patch2: tbb-2.0-20070927-parallel-make.patch
Patch3: tbb-2.0-20070927-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libstdc++-devel
# We need "arch" and "hostname" binaries:
@ -57,33 +60,22 @@ C++ library.
%prep
%setup -q -n %{sourcebasename}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
# Currently we build TBB in debug mode. This overrides some of the
# CXXFLAGS passed in, namely turns off optimizations. Either GCC 4.3
# or TBB have a bug that prevents TBB to compile correctly on anything
# above -O0. As soon as upstream has this situation resolved, release
# builds can be reintroduced.
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" DEBUG_SUFFIX= tbb_build_prefix=obj debug
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
ln -s `basename %{SOURCE2}` getting_started_guide.pdf
ln -s `basename %{SOURCE3}` reference_manual.pdf
ln -s `basename %{SOURCE4}` tutorial.pdf
ln -s `basename %{SOURCE5}` release_notes.pdf
cp -p "%{SOURCE2}" "%{SOURCE3}" "%{SOURCE4}" .
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/%{_includedir}
pushd build/obj_debug
pushd build/obj_release
for file in libtbb{,malloc}; do
install -p -D -m 755 ${file}.so $RPM_BUILD_ROOT/%{_libdir}/$file.so.2.0
ln -s $file.so.2.0 $RPM_BUILD_ROOT/%{_libdir}/$file.so.2
ln -s $file.so.2.0 $RPM_BUILD_ROOT/%{_libdir}/$file.so
install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir}
ln -s $file.so.2 $RPM_BUILD_ROOT/%{_libdir}/$file.so
done
popd
@ -103,7 +95,7 @@ rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/*.so.2.0
%doc doc/Release_Notes.txt
%{_libdir}/*.so.2
%files devel
@ -113,12 +105,15 @@ rm -rf ${RPM_BUILD_ROOT}
%files doc
%defattr(-,root,root,-)
%doc 301111_301111.pdf getting_started_guide.pdf
%doc 301114_301114.pdf reference_manual.pdf
%doc 301132_301132.pdf tutorial.pdf
%doc 312687_312687.pdf release_notes.pdf
%doc Getting_Started.pdf
%doc Reference_Manual.pdf
%doc Tutorial.pdf
%changelog
* Fri Jun 13 2008 Petr Machata <pmachata@redhat.com> - 2.1-1.20080605
- New upstream 2.1
- Drop soname patch, parallel make patch, and GCC 4.3 patch
* Wed Feb 13 2008 Petr Machata <pmachata@redhat.com> - 2.0-4.20070927
- Review fixes
- Use updated URL