Skip to content

Commit 8defb3f

Browse files
committed
Update to TBB 2017.7
1 parent 47fb04d commit 8defb3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1040
-636
lines changed

src/tbb/build/AIX.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ifndef arch
2222
endif
2323

2424
ifndef runtime
25-
gcc_version:=$(shell gcc -v 2>&1 | grep 'gcc version' | sed -e 's/^gcc version //' | sed -e 's/ .*$$//')
25+
gcc_version:=$(shell gcc -dumpversion)
2626
os_version:=$(shell uname -r)
2727
os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
2828
export runtime:=cc$(gcc_version)_kernel$(os_kernel_version)

src/tbb/build/FreeBSD.clang.inc

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Copyright (c) 2005-2017 Intel Corporation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
#
16+
#
17+
#
18+
19+
COMPILE_ONLY = -c -MMD
20+
PREPROC_ONLY = -E -x c++
21+
INCLUDE_KEY = -I
22+
DEFINE_KEY = -D
23+
OUTPUT_KEY = -o #
24+
OUTPUTOBJ_KEY = -o #
25+
PIC_KEY = -fPIC
26+
WARNING_AS_ERROR_KEY = -Werror
27+
WARNING_KEY = -Wall
28+
TEST_WARNING_KEY = -Wextra -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor
29+
WARNING_SUPPRESS = -Wno-parentheses -Wno-non-virtual-dtor -Wno-dangling-else
30+
DYLIB_KEY = -shared
31+
EXPORT_KEY = -Wl,--version-script,
32+
LIBDL =
33+
34+
CPLUS = clang++
35+
CONLY = clang
36+
LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
37+
LIBS += -lpthread -lrt
38+
LINK_FLAGS = -Wl,-rpath-link=. -Wl,-rpath=. -rdynamic
39+
C_FLAGS = $(CPLUS_FLAGS)
40+
41+
ifeq ($(cfg), release)
42+
CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
43+
endif
44+
ifeq ($(cfg), debug)
45+
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
46+
endif
47+
48+
ifneq (,$(stdlib))
49+
CPLUS_FLAGS += -stdlib=$(stdlib)
50+
LIB_LINK_FLAGS += -stdlib=$(stdlib)
51+
endif
52+
53+
TBB_ASM.OBJ=
54+
MALLOC_ASM.OBJ=
55+
56+
ifeq (intel64,$(arch))
57+
ITT_NOTIFY = -DDO_ITT_NOTIFY
58+
CPLUS_FLAGS += -m64
59+
LIB_LINK_FLAGS += -m64
60+
endif
61+
62+
ifeq (ia32,$(arch))
63+
ITT_NOTIFY = -DDO_ITT_NOTIFY
64+
CPLUS_FLAGS += -m32 -march=pentium4
65+
LIB_LINK_FLAGS += -m32
66+
endif
67+
68+
ifeq (ppc64,$(arch))
69+
CPLUS_FLAGS += -m64
70+
LIB_LINK_FLAGS += -m64
71+
endif
72+
73+
ifeq (ppc32,$(arch))
74+
CPLUS_FLAGS += -m32
75+
LIB_LINK_FLAGS += -m32
76+
endif
77+
78+
ifeq (bg,$(arch))
79+
CPLUS = bgclang++
80+
CONLY = bgclang
81+
endif
82+
83+
#------------------------------------------------------------------------------
84+
# Setting assembler data.
85+
#------------------------------------------------------------------------------
86+
ASM = as
87+
ifeq (intel64,$(arch))
88+
ASM_FLAGS += --64
89+
endif
90+
ifeq (ia32,$(arch))
91+
ASM_FLAGS += --32
92+
endif
93+
ifeq ($(cfg),debug)
94+
ASM_FLAGS += -g
95+
endif
96+
97+
ASSEMBLY_SOURCE=$(arch)-gas
98+
#------------------------------------------------------------------------------
99+
# End of setting assembler data.
100+
#------------------------------------------------------------------------------
101+
102+
#------------------------------------------------------------------------------
103+
# Setting tbbmalloc data.
104+
#------------------------------------------------------------------------------
105+
106+
M_CPLUS_FLAGS = $(CPLUS_FLAGS) -fno-rtti -fno-exceptions
107+
108+
#------------------------------------------------------------------------------
109+
# End of setting tbbmalloc data.
110+
#------------------------------------------------------------------------------

src/tbb/build/FreeBSD.gcc.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,21 @@ PIC_KEY = -fPIC
2626
WARNING_AS_ERROR_KEY = -Werror
2727
WARNING_KEY = -Wall
2828
DYLIB_KEY = -shared
29+
WARNING_SUPPRESS = -Wno-parentheses
2930

3031
CPLUS = g++
3132
CONLY = gcc
3233
LIB_LINK_FLAGS = -shared
3334
LIBS = -lpthread
3435
C_FLAGS = $(CPLUS_FLAGS)
3536

37+
# gcc 6.0 and later have -flifetime-dse option that controls
38+
# elimination of stores done outside the object lifetime
39+
ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
40+
# keep pre-contruction stores for zero initialization
41+
DSE_KEY = -flifetime-dse=1
42+
endif
43+
3644
ifeq ($(cfg), release)
3745
CPLUS_FLAGS = -g -O2 -DUSE_PTHREAD
3846
endif

src/tbb/build/FreeBSD.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ ifndef arch
2929
endif
3030

3131
ifndef runtime
32-
gcc_version:=$(shell gcc -v 2>&1 | grep 'gcc version' | sed -e 's/^gcc version //' | sed -e 's/ .*$$//')
32+
clang_version:=$(shell clang -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/")
3333
os_version:=$(shell uname -r)
3434
os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
35-
export runtime:=cc$(gcc_version)_kernel$(os_kernel_version)
35+
export runtime:=cc$(clang_version)_kernel$(os_kernel_version)
3636
endif
3737

38-
native_compiler := gcc
39-
export compiler ?= gcc
38+
native_compiler := clang
39+
export compiler ?= clang
4040
debugger ?= gdb
4141

4242
CMD=$(SHELL) -c

src/tbb/build/Makefile.rml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#
1717
#
1818

19+
# TODO: investigate why version_string.ver is not complete when $(RML_SERVER.OBJ) is being compiled.
20+
.NOTPARALLEL:
21+
1922
tbb_root ?= $(TBBROOT)
2023
BUILDING_PHASE=1
2124
TEST_RESOURCE = $(RML.RES)
@@ -78,18 +81,18 @@ R_CPLUS_FLAGS = $(subst DO_ITT_NOTIFY,DO_ITT_NOTIFY=0,$(CPLUS_FLAGS)) $(WARNING
7881
$(DEFINE_KEY)TBB_USE_THREADING_TOOLS=0 $(DEFINE_KEY)__TBB_RML_STATIC=1 $(DEFINE_KEY)__TBB_NO_IMPLICIT_LINKAGE=1
7982

8083
%.$(OBJ): %.cpp
81-
$(CPLUS) $(COMPILE_ONLY) $(R_CPLUS_FLAGS) $(PIC_KEY) $(INCLUDES) $<
84+
$(CPLUS) $(COMPILE_ONLY) $(R_CPLUS_FLAGS) $(PIC_KEY) $(DSE_KEY) $(INCLUDES) $<
8285

8386
ifeq (linux,$(tbb_os))
8487
omp_dynamic_link.$(OBJ): CPLUS_FLAGS+=-fno-exceptions
8588
endif
8689

87-
tbb_misc_rml.$(OBJ): version_string.ver
90+
tbb_misc_rml.$(OBJ) $(RML_SERVER.OBJ): version_string.ver
8891

8992
RML_TEST.OBJ = test_job_automaton.$(OBJ) test_thread_monitor.$(OBJ) test_rml_tbb.$(OBJ) test_rml_omp.$(OBJ) test_rml_mixed.$(OBJ)
9093

9194
$(RML_TBB_DEP): %_rml.$(OBJ): %.cpp
92-
$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(R_CPLUS_FLAGS) $(PIC_KEY) $(INCLUDES) $<
95+
$(CPLUS) $(COMPILE_ONLY) $(OUTPUTOBJ_KEY)$@ $(R_CPLUS_FLAGS) $(PIC_KEY) $(DSE_KEY) $(INCLUDES) $<
9396

9497
$(RML_TEST.OBJ): %.$(OBJ): %.cpp
9598
$(CPLUS) $(COMPILE_ONLY) $(R_CPLUS_FLAGS) $(PIC_KEY) $(T_INCLUDES) $<
@@ -102,6 +105,7 @@ LIB_LINK_FLAGS += $(EXPORT_KEY)rml.def
102105
$(RML.DLL): rml.def
103106
endif
104107

108+
$(RML.DLL): CPLUS_FLAGS += $(SDL_FLAGS)
105109
$(RML.DLL): BUILDING_LIBRARY = $(RML.DLL)
106110
$(RML.DLL): $(RML_TBB_DEP) $(RML_SERVER.OBJ) $(RML.RES) $(RML_NO_VERSION.DLL) $(RML_ASM.OBJ)
107111
$(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)
@@ -158,5 +162,5 @@ rml_test: $(call cross_suffix,$(RML.DLL)) $(TEST_PREREQUISITE) $(RML_TESTS) $(RM
158162
# End of rules for making the TBBMalloc unit tests
159163
#------------------------------------------------------
160164

161-
# Include automatically generated dependences
165+
# Include automatically generated dependencies
162166
-include *.d

src/tbb/build/Makefile.tbbproxy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ VPATH += $(PROXY_ROOT) $(PROXY_SOURCE_ROOT)
3333
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_DLL_NAME=$(TBB.DLL)
3434
CPLUS_FLAGS += $(DEFINE_KEY)__TBB_LST=$(TBB.LST)
3535
CPLUS_FLAGS += $(foreach dir,$(VPATH),$(INCLUDE_KEY)$(dir))
36-
CPLUS_FLAGS += $(PIC_KEY)
36+
CPLUS_FLAGS += $(PIC_KEY) $(DSE_KEY)
3737

3838
include $(tbb_root)/build/common_rules.inc
3939

@@ -46,7 +46,7 @@ PROXY_CPLUS.OBJ = tbbproxy.$(OBJ)
4646
PROXY_ASM.OBJ = tbbproxy-asm.$(OBJ)
4747
PROXY.OBJ := $(PROXY_CPLUS.OBJ) $(PROXY_ASM.OBJ)
4848

49-
# Not using intrinsics prevents undesired dependence from ICL libraries (e.g. libirc).
49+
# Not using intrinsics prevents undesired dependence on ICL libraries (e.g. libirc).
5050
# Not using default libs prevents link issues caused by different CRT versions in tbbproxy and in an app.
5151
$(PROXY.OBJ): CPLUS_FLAGS += $(DEFINE_KEY)ARCH_$(arch) $(DEFINE_KEY)OS_$(tbb_os) $(NOINTRINSIC_KEY) $(NODEFAULTLIB_KEY)
5252

@@ -105,5 +105,5 @@ $(PROXY_TESTS_OBJS): %.$(OBJ): %.cpp
105105
# End of rules for making the TBB Proxy unit tests
106106
#------------------------------------------------------
107107

108-
# Include automatically generated dependences
108+
# Include automatically generated dependencies
109109
-include *.d

0 commit comments

Comments
 (0)