summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/tbb')
-rw-r--r--dev-cpp/tbb/ChangeLog9
-rw-r--r--dev-cpp/tbb/files/tbb-3.0.174-gcc46.patch33
-rw-r--r--dev-cpp/tbb/files/tbb-4.0.297-ldflags.patch203
-rw-r--r--dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch20
-rw-r--r--dev-cpp/tbb/tbb-3.0.221.ebuild94
-rw-r--r--dev-cpp/tbb/tbb-4.0.278.ebuild95
-rw-r--r--dev-cpp/tbb/tbb-4.0.297.ebuild12
7 files changed, 240 insertions, 226 deletions
diff --git a/dev-cpp/tbb/ChangeLog b/dev-cpp/tbb/ChangeLog
index aef5eea8625c..57ed9fc867d8 100644
--- a/dev-cpp/tbb/ChangeLog
+++ b/dev-cpp/tbb/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-cpp/tbb
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-cpp/tbb/ChangeLog,v 1.18 2012/03/20 17:09:10 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-cpp/tbb/ChangeLog,v 1.19 2012/06/01 17:58:44 bicatali Exp $
+
+ 01 Jun 2012; Sébastien Fabbro <bicatali@gentoo.org>
+ -files/tbb-3.0.174-gcc46.patch, -tbb-3.0.221.ebuild, -tbb-4.0.278.ebuild,
+ tbb-4.0.297.ebuild, +files/tbb-4.0.297-ldflags.patch,
+ +files/tbb-4.0.297-underlinking.patch:
+ Respect LDFLAGS (bug #418453) and fixed underlinking at test phase (bug
+ #418447), thanks hasufell for his patches
20 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> tbb-4.0.297.ebuild:
Update fix for compiler calls
diff --git a/dev-cpp/tbb/files/tbb-3.0.174-gcc46.patch b/dev-cpp/tbb/files/tbb-3.0.174-gcc46.patch
deleted file mode 100644
index a2b0ac54c512..000000000000
--- a/dev-cpp/tbb/files/tbb-3.0.174-gcc46.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Nur tbb30_174oss.orig/src/test/test_condition_variable.h tbb30_174oss/src/test/test_condition_variable.h
---- tbb30_174oss.orig/src/test/test_condition_variable.h 2011-04-21 21:57:36.000000000 +0100
-+++ tbb30_174oss/src/test/test_condition_variable.h 2011-04-21 21:58:57.000000000 +0100
-@@ -189,7 +189,7 @@
- Counter<M> counter;
- counter.value = 0;
- Order = 0;
-- const long test_size = 100000;
-+ const size_t test_size = 100000;
- NativeParallelFor( nthread, WorkForLocks<Counter<M>, test_size>(counter) );
-
- if( counter.value!=2*test_size )
-diff -Nur tbb30_174oss.orig/src/test/test_mutex_native_threads.cpp tbb30_174oss/src/test/test_mutex_native_threads.cpp
---- tbb30_174oss.orig/src/test/test_mutex_native_threads.cpp 2011-04-21 21:57:36.000000000 +0100
-+++ tbb30_174oss/src/test/test_mutex_native_threads.cpp 2011-04-21 21:58:57.000000000 +0100
-@@ -182,7 +182,7 @@
- Counter<M> counter;
- counter.value = 0;
- Order = 0;
-- const long test_size = 100000;
-+ const size_t test_size = 100000;
- tbb::tick_count t0 = tbb::tick_count::now();
- NativeParallelFor( nthread, Work<Counter<M>, test_size>(counter) );
- tbb::tick_count t1 = tbb::tick_count::now();
-@@ -199,7 +199,7 @@
- REMARK("testing %s\n",mutex_name);
- Invariant<M,8> invariant(mutex_name);
- Order = 0;
-- static const long test_size = 1000000;
-+ static const size_t test_size = 1000000;
- tbb::tick_count t0 = tbb::tick_count::now();
- NativeParallelFor( nthread, Work<Invariant<M,8>, test_size>(invariant) );
- tbb::tick_count t1 = tbb::tick_count::now();
diff --git a/dev-cpp/tbb/files/tbb-4.0.297-ldflags.patch b/dev-cpp/tbb/files/tbb-4.0.297-ldflags.patch
new file mode 100644
index 000000000000..b42871f66880
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-4.0.297-ldflags.patch
@@ -0,0 +1,203 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu May 31 21:37:47 UTC 2012
+Subject: build system
+
+respect LDFLAGS properly
+wrt https://bugs.gentoo.org/show_bug.cgi?id=418453
+
+--- build/common_rules.inc
++++ build/common_rules.inc
+@@ -44,8 +44,6 @@
+ ifeq ($(tbb_cpf),1)
+ CPLUS_FLAGS += $(DEFINE_KEY)__TBB_CPF_BUILD=1
+ endif
+-LINK_FLAGS += $(LDFLAGS)
+-LIB_LINK_FLAGS += $(LDFLAGS)
+ CPLUS_FLAGS_NOSTRICT = $(subst -strict-ansi,-ansi,$(CPLUS_FLAGS))
+
+ LIB_LINK_CMD ?= $(CPLUS) $(PIC_KEY)
+--- build/Makefile.rml
++++ build/Makefile.rml
+@@ -103,7 +103,7 @@
+
+ $(RML.DLL): BUILDING_LIBRARY = $(RML.DLL)
+ $(RML.DLL): $(RML_TBB_DEP) $(RML_SERVER.OBJ) $(RML.RES) $(RML_NO_VERSION.DLL) $(RML_ASM.OBJ)
+- $(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(RML.DLL) $(RML_SERVER.OBJ) $(RML_TBB_DEP) $(RML_ASM.OBJ) $(RML.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
++ $(LIB_LINK_CMD) $(LDFLAGS) $(LIB_OUTPUT_KEY)$(RML.DLL) $(RML_SERVER.OBJ) $(RML_TBB_DEP) $(RML_ASM.OBJ) $(RML.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
+
+ ifneq (,$(RML_NO_VERSION.DLL))
+ $(RML_NO_VERSION.DLL):
+@@ -126,13 +126,13 @@
+ RML_TESTS = test_job_automaton.$(TEST_EXT) test_thread_monitor.$(TEST_EXT) test_rml_tbb.$(TEST_EXT) test_rml_omp.$(TEST_EXT) test_rml_mixed.$(TEST_EXT) test_rml_omp_c_linkage.$(TEST_EXT)
+
+ test_rml_tbb.$(TEST_EXT): test_rml_tbb.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(TBB_DEP_RML_TEST)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) test_rml_tbb.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(TBB_DEP_RML_TEST) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) test_rml_tbb.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(TBB_DEP_RML_TEST) $(LIBS) $(LINK_FLAGS)
+
+ test_rml_omp.$(TEST_EXT): test_rml_omp.$(OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_NON_RML_TEST)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) test_rml_omp.$(OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_NON_RML_TEST) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) test_rml_omp.$(OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_NON_RML_TEST) $(LIBS) $(LINK_FLAGS)
+
+ test_rml_mixed.$(TEST_EXT): test_rml_mixed.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_RML_TEST)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) test_rml_mixed.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_RML_TEST) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) test_rml_mixed.$(OBJ) $(RML_TBB_CLIENT.OBJ) $(RML_OMP_CLIENT.OBJ) $(TBB_DEP_RML_TEST) $(LIBS) $(LINK_FLAGS)
+
+ rml_omp_stub.$(OBJ): rml_omp_stub.cpp
+ $(CPLUS) $(COMPILE_ONLY) $(M_CPLUS_FLAGS) $(WARNING_SUPPRESS) $(T_INCLUDES) $(PIC_KEY) $<
+@@ -141,7 +141,7 @@
+ $(CONLY) $(C_FLAGS) $(OUTPUT_KEY)$@ test_rml_omp_c_linkage.$(OBJ) rml_omp_stub.$(OBJ) omp_dynamic_link.$(OBJ) $(LIBS) $(LINK_FLAGS)
+
+ test_%.$(TEST_EXT): test_%.$(OBJ) $(TBB_DEP_NON_RML_TEST)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(TBB_DEP_NON_RML_TEST) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(TBB_DEP_NON_RML_TEST) $(LIBS) $(LINK_FLAGS)
+
+ ### run_cmd is usually empty
+ rml_test: $(call cross_suffix,$(RML.DLL)) $(TEST_PREREQUISITE) $(RML_TESTS)
+--- build/Makefile.tbb
++++ build/Makefile.tbb
+@@ -115,7 +115,7 @@
+
+ $(TBB.DLL): BUILDING_LIBRARY = $(TBB.DLL)
+ $(TBB.DLL): $(TBB.OBJ) $(TBB.RES) tbbvars.sh $(TBB_NO_VERSION.DLL)
+- $(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(TBB.DLL) $(TBB.OBJ) $(TBB.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
++ $(LIB_LINK_CMD) $(LDFLAGS) $(LIB_OUTPUT_KEY)$(TBB.DLL) $(TBB.OBJ) $(TBB.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS)
+
+ ifneq (,$(TBB_NO_VERSION.DLL))
+ $(TBB_NO_VERSION.DLL):
+--- build/Makefile.tbbmalloc
++++ build/Makefile.tbbmalloc
+@@ -82,7 +82,7 @@
+
+ $(MALLOC.DLL): BUILDING_LIBRARY = $(MALLOC.DLL)
+ $(MALLOC.DLL): $(MALLOC.OBJ) $(MALLOC.RES) $(MALLOC_NO_VERSION.DLL)
+- $(subst $(CPLUS),$(CONLY),$(LIB_LINK_CMD)) $(LIB_OUTPUT_KEY)$(MALLOC.DLL) $(MALLOC.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(MALLOC_LINK_FLAGS)
++ $(subst $(CPLUS),$(CONLY),$(LIB_LINK_CMD)) $(LDFLAGS) $(LIB_OUTPUT_KEY)$(MALLOC.DLL) $(MALLOC.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(MALLOC_LINK_FLAGS)
+
+ ifneq (,$(MALLOCPROXY.DEF))
+ tbbmallocproxy.def: $(MALLOCPROXY.DEF)
+@@ -95,7 +95,7 @@
+ ifneq (,$(MALLOCPROXY.DLL))
+ $(MALLOCPROXY.DLL): BUILDING_LIBRARY = $(MALLOCPROXY.DLL)
+ $(MALLOCPROXY.DLL): $(PROXY.OBJ) $(MALLOCPROXY_NO_VERSION.DLL) $(MALLOC.DLL) $(MALLOC.RES)
+- $(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(MALLOCPROXY.DLL) $(PROXY.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(LINK_MALLOC.LIB) $(PROXY_LINK_FLAGS)
++ $(LIB_LINK_CMD) $(LDFLAGS) $(LIB_OUTPUT_KEY)$(MALLOCPROXY.DLL) $(PROXY.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(LINK_MALLOC.LIB) $(PROXY_LINK_FLAGS)
+ endif
+
+ ifneq (,$(MALLOC_NO_VERSION.DLL))
+@@ -143,32 +143,32 @@
+ endif
+
+ test_malloc_overload.$(TEST_EXT): test_malloc_overload.cpp
+- $(CPLUS) $(OUTPUT_KEY)$@ $(subst /MT,/MD,$(M_CPLUS_FLAGS)) $(M_INCLUDES) $< $(LIBDL) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(subst /MT,/MD,$(M_CPLUS_FLAGS)) $(LDFLAGS) $(M_INCLUDES) $< $(LIBDL) $(LIBS) $(LINK_FLAGS)
+ test_malloc_overload_proxy.$(TEST_EXT): test_malloc_overload.cpp $(MALLOC_PROXY_LIB)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(subst /MT,/MD,$(M_CPLUS_FLAGS)) $(M_INCLUDES) $< $(LIBDL) $(MALLOC_PROXY_LIB) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(subst /MT,/MD,$(M_CPLUS_FLAGS)) $(LDFLAGS) $(M_INCLUDES) $< $(LIBDL) $(MALLOC_PROXY_LIB) $(LIBS) $(LINK_FLAGS)
+
+ test_malloc_whitebox.$(TEST_EXT): test_malloc_whitebox.cpp $(MALLOC_ASM.OBJ) version_string.tmp
+- $(CPLUS) $(OUTPUT_KEY)$@ $(M_CPLUS_FLAGS) $(M_INCLUDES) $(INCLUDE_KEY). $< $(MALLOC_ASM.OBJ) $(LIBS) $(LIBDL) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(M_CPLUS_FLAGS) $(LDFLAGS) $(M_INCLUDES) $(INCLUDE_KEY). $< $(MALLOC_ASM.OBJ) $(LIBS) $(LIBDL) $(LINK_FLAGS)
+
+ test_malloc_lib_unload.$(TEST_EXT): test_malloc_lib_unload.cpp test_malloc_lib_unload_dll.$(DLL)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(M_CPLUS_FLAGS) $(M_INCLUDES) $< $(LIBS) test_malloc_lib_unload_dll.$(LIBEXT) $(LIBDL) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(M_CPLUS_FLAGS) $(LDFLAGS) $(M_INCLUDES) $< $(LIBS) test_malloc_lib_unload_dll.$(LIBEXT) $(LIBDL) $(LINK_FLAGS)
+
+ $(MALLOC_MAIN_TESTS): %.$(TEST_EXT): %.$(OBJ) $(MALLOC_LIB)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(MALLOC_LIB) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(MALLOC_LIB) $(LIBS) $(LINK_FLAGS)
+
+ ifeq (,$(NO_C_TESTS))
+ MALLOC_C_TESTS = test_malloc_pure_c.$(TEST_EXT)
+
+ $(MALLOC_C_TESTS): %.$(TEST_EXT): %.$(OBJ) $(MALLOC_LIB)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $^ $(LIBS) $(LINK_FLAGS)
+ endif
+
+ # Rules for generating a test DLL
+ %_dll.$(DLL): %_dll.$(OBJ)
+- $(LIB_LINK_CMD) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(PIC_KEY) $< $(LIBS) $(DYLIB_KEY) $(LIB_LINK_FLAGS)
++ $(LIB_LINK_CMD) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $(PIC_KEY) $< $(LIBS) $(DYLIB_KEY) $(LIB_LINK_FLAGS)
+
+ test_malloc_atexit.$(TEST_EXT): test_malloc_atexit.$(OBJ) test_malloc_atexit_dll.$(DLL)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(MALLOC_PROXY_LIB) $(MALLOC_LIB) test_malloc_atexit_dll.$(LIBEXT) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(MALLOC_PROXY_LIB) $(MALLOC_LIB) test_malloc_atexit_dll.$(LIBEXT) $(LIBS) $(LINK_FLAGS)
+
+ MALLOC_TESTS = $(MALLOC_MAIN_TESTS) $(MALLOC_C_TESTS) test_malloc_whitebox.$(TEST_EXT)
+ ifneq (,$(MALLOCPROXY.DLL))
+--- build/Makefile.tbbproxy
++++ build/Makefile.tbbproxy
+@@ -102,7 +102,7 @@
+
+ # Link rules.
+ $(PROXY_TESTS_EXES): %.$(TEST_EXT): %.$(OBJ) $(PROXY_LIB)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(PROXY_LIB) $(LIBS) $(LIBDL) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(PROXY_LIB) $(LIBS) $(LIBDL) $(LINK_FLAGS)
+
+ # Compilation rules.
+ $(PROXY_TESTS_OBJS): %.$(OBJ): %.cpp
+--- build/Makefile.test
++++ build/Makefile.test
+@@ -55,26 +55,26 @@
+
+ # Rule for generating executable test
+ %.$(TEST_EXT): %.$(OBJ) $(TBB.LIB) $(if $(use_proxy),$(LINK_TBB.LIB))
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(AUX_LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(AUX_LIBS) $(LINK_FLAGS)
+
+ # Rules for generating a test DLL
+ %_dll.$(DLL): %_dll.$(OBJ) $(TBB.LIB)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(PIC_KEY) $< $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS) $(DYLIB_KEY)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(PIC_KEY) $(LDFLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS) $(DYLIB_KEY)
+ .PRECIOUS: %_dll.$(OBJ) %_dll.$(DLL)
+
+ # Rules for the tests, which use TBB in a dynamically loadable library
+ test_model_plugin.$(TEST_EXT): CPLUS_FLAGS := $(CPLUS_FLAGS:$(USE_PROXY_FLAG)=)
+ test_model_plugin.$(TEST_EXT): test_model_plugin.$(OBJ) test_model_plugin_dll.$(DLL)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LIBDL) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(LIBDL) $(LIBS) $(LINK_FLAGS)
+ test_cilk_dynamic_load.$(TEST_EXT): test_cilk_dynamic_load.$(OBJ) test_cilk_dynamic_load_dll.$(DLL)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(LIBDL) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(LINK_TBB.LIB) $(LIBDL) $(LIBS) $(LINK_FLAGS)
+
+ # Workaround on cilkrts linkage known issue (see Intel(R) C++ Composer XE 2011 Release Notes)
+ # The issue reveals itself if a version of binutils is prior to 2.17
+ ifeq (linux,$(tbb_os))
+ ifeq (icc,$(compiler))
+ test_cilk_interop.$(TEST_EXT): test_cilk_interop.$(OBJ) $(TBB.LIB) $(if $(use_proxy),$(LINK_TBB.LIB))
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(AUX_LIBS) $(LINK_FLAGS) -lcilkrts
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $< $(LINK_TBB.LIB) $(LIBS) $(AUX_LIBS) $(LINK_FLAGS) -lcilkrts
+ endif
+ endif
+
+@@ -92,18 +92,18 @@
+ $(TASK_CPP_DIRECTLY_INCLUDED): WARNING_KEY += $(WARNING_SUPPRESS)
+
+ $(TASK_CPP_DIRECTLY_INCLUDED): %.$(TEST_EXT) : %.$(OBJ) $(TASK_CPP_DEPENDENCIES)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $^ $(LIBDL) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $^ $(LIBDL) $(LIBS) $(LINK_FLAGS)
+
+ test_tbb_header2.$(OBJ): test_tbb_header.cpp
+ $(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS) $(CXX_ONLY_FLAGS) $(CXX_WARN_SUPPRESS) $(INCLUDES) $(DEFINE_KEY)__TBB_TEST_SECONDARY=1 $< $(OUTPUTOBJ_KEY)$@
+
+ # Detecting "multiple definition" linker error using the test that covers the whole library
+ test_tbb_header.$(TEST_EXT): test_tbb_header.$(OBJ) test_tbb_header2.$(OBJ) $(TBB.LIB)
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) test_tbb_header.$(OBJ) test_tbb_header2.$(OBJ) $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) test_tbb_header.$(OBJ) test_tbb_header2.$(OBJ) $(LINK_TBB.LIB) $(LIBS) $(LINK_FLAGS)
+
+ # Checks that TBB atomics work correctly in position independent code
+ test_atomic_pic.$(TEST_EXT): test_atomic.cpp
+- $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(PIC_KEY) $(CXX_ONLY_FLAGS) $(CXX_WARN_SUPPRESS) $(INCLUDES) $(DEFINE_KEY)__TBB_TEST_PIC=1 $< $(LINK_TBB.LIB) $(LIBS) $(AUX_LIBS) $(LINK_FLAGS)
++ $(CPLUS) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(PIC_KEY) $(CXX_ONLY_FLAGS) $(CXX_WARN_SUPPRESS) $(LDFLAGS) $(INCLUDES) $(DEFINE_KEY)__TBB_TEST_PIC=1 $< $(LINK_TBB.LIB) $(LIBS) $(AUX_LIBS) $(LINK_FLAGS)
+
+ # The main list of TBB tests
+ TEST_TBB_PLAIN.EXE = test_assembly.$(TEST_EXT) \
+@@ -188,7 +188,7 @@
+ ifdef OPENMP_FLAG
+ TEST_TBB_PLAIN.EXE += test_tbb_openmp
+ test_openmp.$(TEST_EXT): test_openmp.cpp
+- $(CPLUS) $(OPENMP_FLAG) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(INCLUDES) $< $(LIBS) $(LINK_TBB.LIB) $(LINK_FLAGS)
++ $(CPLUS) $(OPENMP_FLAG) $(OUTPUT_KEY)$@ $(CPLUS_FLAGS) $(LDFLAGS) $(INCLUDES) $< $(LIBS) $(LINK_TBB.LIB) $(LINK_FLAGS)
+ .PHONY: test_tbb_openmp
+ test_tbb_openmp: $(TEST_PREREQUISITE) test_openmp.$(TEST_EXT)
+ $(run_cmd) ./test_openmp.$(TEST_EXT) 1:4
diff --git a/dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch b/dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch
new file mode 100644
index 000000000000..099bb39d2143
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch
@@ -0,0 +1,20 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu May 31 21:37:47 UTC 2012
+Subject: build system
+
+fix underlinking in test phase
+wrt https://bugs.gentoo.org/show_bug.cgi?id=418447
+
+--- build/Makefile.test
++++ build/Makefile.test
+@@ -48,8 +48,8 @@
+ USE_PROXY_FLAG = $(DEFINE_KEY)HARNESS_USE_PROXY
+ CPLUS_FLAGS += $(USE_PROXY_FLAG)
+ LINK_TBB.LIB = $(PROXY.LIB)
+- LIBS += $(LIBDL)
+-endif
++endif
++LIBS += $(LIBDL)
+
+ include $(tbb_root)/build/common_rules.inc
+
diff --git a/dev-cpp/tbb/tbb-3.0.221.ebuild b/dev-cpp/tbb/tbb-3.0.221.ebuild
deleted file mode 100644
index 36a20ff9e06c..000000000000
--- a/dev-cpp/tbb/tbb-3.0.221.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-cpp/tbb/tbb-3.0.221.ebuild,v 1.1 2011/08/02 17:17:30 bicatali Exp $
-
-EAPI=4
-inherit eutils versionator toolchain-funcs
-
-# those 2 below change pretty much every release
-# url number
-MYU="78/172"
-# release update
-MYR="%20update%208"
-
-PV1="$(get_version_component_range 1)"
-PV2="$(get_version_component_range 2)"
-PV3="$(get_version_component_range 3)"
-MYP="${PN}${PV1}${PV2}_${PV3}oss"
-
-DESCRIPTION="High level abstract threading library"
-HOMEPAGE="http://www.threadingbuildingblocks.org/"
-SRC_URI="http://www.threadingbuildingblocks.org/uploads/${MYU}/${PV1}.${PV2}${MYR}/${MYP}_src.tgz"
-LICENSE="GPL-2-with-exceptions"
-
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug doc examples"
-
-DEPEND="!<=dev-cpp/tbb-2.1.016"
-RDEPEND="${DEPEND}"
-S="${WORKDIR}/${MYP}"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.0.104-tests.patch
- # use fully qualified compilers. do not force pentium4 for x86 users
- local CC="$(tc-getCC)"
- sed -i \
- -e "s/-O2/${CXXFLAGS}/g" \
- -e 's/^\(CPLUS = \)g++ $/\1'"$(tc-getCXX)/" \
- -e 's/^\(CONLY = \)gcc$/\1'"${CC}/" \
- -e 's/\(shell \)gcc\( --version\)/\1'"${CC}"'\2/' \
- -e '/CPLUS_FLAGS +=/s/-march=pentium4//' \
- build/*.inc || die
- # - Strip the $(shell ... >$(NUL) 2>$(NUL)) wrapping, leaving just the
- # actual command.
- # - Force generation of version_string.tmp immediately after the directory
- # is created. This avoids a race when the user builds tbb and tbbmalloc
- # concurrently. The choice of Makefile.tbb (instead of
- # Makefile.tbbmalloc) is arbitrary.
- sed -i \
- -e 's/^\t\$(shell \(.*\) >\$(NUL) 2>\$(NUL))\s*/\t\1/' \
- -e 's!^\t@echo Created \$(work_dir)_\(debug\|release\).*$!&\n\t$(MAKE) -C "$(work_dir)_\1" -r -f $(tbb_root)/build/Makefile.tbb cfg=\1 tbb_root=$(tbb_root) version_string.tmp!' \
- src/Makefile || die
-}
-
-src_compile() {
- if [[ $(tc-getCXX) == *g++ ]]; then
- myconf="compiler=gcc"
- elif [[ $(tc-getCXX) == *ic*c ]]; then
- myconf="compiler=icc"
- fi
- local ccconf="${myconf}"
- if use debug || use examples; then
- ccconf="${ccconf} tbb_debug tbbmalloc_debug"
- fi
- emake -C src ${ccconf} tbb_release tbbmalloc_release
-}
-
-src_test() {
- local ccconf="${myconf}"
- if use debug || use examples; then
- ${ccconf}="${myconf} test_debug tbbmalloc_test_debug"
- fi
- emake -C src ${ccconf} test_release
-}
-
-src_install(){
- for l in $(find build -name lib\*.so.\*); do
- dolib.so ${l}
- local bl=$(basename ${l})
- dosym ${bl} /usr/$(get_libdir)/${bl%.*}
- done
- insinto /usr
- doins -r include
-
- dodoc README CHANGES doc/Release_Notes.txt
- use doc && dohtml -r doc/html/*
-
- if use examples ; then
- insinto /usr/share/doc/${PF}/examples/build
- doins build/*.inc
- insinto /usr/share/doc/${PF}/examples
- doins -r examples
- fi
-}
diff --git a/dev-cpp/tbb/tbb-4.0.278.ebuild b/dev-cpp/tbb/tbb-4.0.278.ebuild
deleted file mode 100644
index 26039e74f2ba..000000000000
--- a/dev-cpp/tbb/tbb-4.0.278.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-cpp/tbb/tbb-4.0.278.ebuild,v 1.2 2012/01/07 20:47:39 bicatali Exp $
-
-EAPI=4
-inherit eutils versionator toolchain-funcs
-
-# those 2 below change pretty much every release
-# url number
-MYU="78/179"
-# release update
-MYR="%20update%202"
-
-PV1="$(get_version_component_range 1)"
-PV2="$(get_version_component_range 2)"
-PV3="$(get_version_component_range 3)"
-MYP="${PN}${PV1}${PV2}_${PV3}oss"
-
-DESCRIPTION="High level abstract threading library"
-HOMEPAGE="http://www.threadingbuildingblocks.org/"
-SRC_URI="http://www.threadingbuildingblocks.org/uploads/${MYU}/${PV1}.${PV2}${MYR}/${MYP}_src.tgz"
-LICENSE="GPL-2-with-exceptions"
-
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug doc examples"
-
-DEPEND="!<=dev-cpp/tbb-2.1.016"
-RDEPEND="${DEPEND}"
-S="${WORKDIR}/${MYP}"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.0.104-tests.patch
- # use fully qualified compilers. do not force pentium4 for x86 users
- local CC="$(tc-getCC)"
- sed -i \
- -e "s/-O2/${CXXFLAGS}/g" \
- -e 's/^\(CPLUS = \)g++ $/\1'"$(tc-getCXX)/" \
- -e 's/^\(CONLY = \)gcc$/\1'"${CC}/" \
- -e 's/\(shell \)gcc\( --version\)/\1'"${CC}"'\2/' \
- -e '/CPLUS_FLAGS +=/s/-march=pentium4//' \
- build/*.inc || die
- # - Strip the $(shell ... >$(NUL) 2>$(NUL)) wrapping, leaving just the
- # actual command.
- # - Force generation of version_string.tmp immediately after the directory
- # is created. This avoids a race when the user builds tbb and tbbmalloc
- # concurrently. The choice of Makefile.tbb (instead of
- # Makefile.tbbmalloc) is arbitrary.
- sed -i \
- -e 's/^\t\$(shell \(.*\) >\$(NUL) 2>\$(NUL))\s*/\t\1/' \
- -e 's!^\t@echo Created \$(work_dir)_\(debug\|release\).*$!&\n\t$(MAKE) -C "$(work_dir)_\1" -r -f $(tbb_root)/build/Makefile.tbb cfg=\1 tbb_root=$(tbb_root) version_string.tmp!' \
- src/Makefile || die
- find include -name \*.html -delete
-}
-
-src_compile() {
- if [[ $(tc-getCXX) == *g++ ]]; then
- myconf="compiler=gcc"
- elif [[ $(tc-getCXX) == *ic*c ]]; then
- myconf="compiler=icc"
- fi
- local ccconf="${myconf}"
- if use debug || use examples; then
- ccconf="${ccconf} tbb_debug tbbmalloc_debug"
- fi
- emake -C src ${ccconf} tbb_release tbbmalloc_release
-}
-
-src_test() {
- local ccconf="${myconf}"
- if use debug || use examples; then
- ${ccconf}="${myconf} test_debug tbbmalloc_test_debug"
- fi
- emake -C src ${ccconf} test_release
-}
-
-src_install(){
- for l in $(find build -name lib\*.so.\*); do
- dolib.so ${l}
- local bl=$(basename ${l})
- dosym ${bl} /usr/$(get_libdir)/${bl%.*}
- done
- insinto /usr
- doins -r include
-
- dodoc README CHANGES doc/Release_Notes.txt
- use doc && dohtml -r doc/html/*
-
- if use examples ; then
- insinto /usr/share/doc/${PF}/examples/build
- doins build/*.inc
- insinto /usr/share/doc/${PF}/examples
- doins -r examples
- fi
-}
diff --git a/dev-cpp/tbb/tbb-4.0.297.ebuild b/dev-cpp/tbb/tbb-4.0.297.ebuild
index 11c751f8af20..08a023bf803d 100644
--- a/dev-cpp/tbb/tbb-4.0.297.ebuild
+++ b/dev-cpp/tbb/tbb-4.0.297.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-cpp/tbb/tbb-4.0.297.ebuild,v 1.3 2012/03/20 17:09:10 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-cpp/tbb/tbb-4.0.297.ebuild,v 1.4 2012/06/01 17:58:44 bicatali Exp $
EAPI=4
-inherit eutils versionator toolchain-funcs
+inherit eutils flag-o-matic versionator toolchain-funcs
# those 2 below change pretty much every release
# url number
@@ -30,7 +30,10 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${MYP}"
src_prepare() {
- epatch "${FILESDIR}"/${PN}-3.0.104-tests.patch
+ epatch \
+ "${FILESDIR}"/${PN}-3.0.104-tests.patch \
+ "${FILESDIR}"/${PN}-4.0.297-underlinking.patch \
+ "${FILESDIR}"/${PN}-4.0.297-ldflags.patch
# use fully qualified compilers. do not force pentium4 for x86 users
sed -i \
-e "s/-O2/${CXXFLAGS}/g" \
@@ -78,6 +81,9 @@ src_compile() {
}
src_test() {
+ # fix underlinking in test phase
+ append-libs dl
+
local ccconf="${myconf}"
if use debug || use examples; then
${ccconf}="${myconf} test_debug tbbmalloc_test_debug"