File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ PKG_CXXFLAGS += -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1
86
86
87
87
MAKE_TARGETS = tbb_build_prefix=lib tbb_release tbbmalloc_release
88
88
89
- ifeq ($(USE_TBB), Windows)
89
+ ifeq ($(USE_TBB), Windows)
90
90
91
91
# rtools: turn on hacks to compensate for make and shell differences rtools<=>MinGW
92
92
# compiler: overwrite default (which is cl = MS compiler)
@@ -105,6 +105,9 @@ ifeq ($(USE_TBB), Windows)
105
105
106
106
endif
107
107
108
+ # write compiler if set
109
+ MAKE_ARGS += $(COMPILER)
110
+
108
111
# For Solaris detect if this is 32-bit R on x86 and if so forward that to TBB
109
112
ifeq ($(USE_TBB), SunOS)
110
113
R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
@@ -114,7 +117,7 @@ ifeq ($(USE_TBB), SunOS)
114
117
endif
115
118
116
119
# Write compilation output to file, and log it if installation fails.
117
- ifeq ($(VERBOSE),)
120
+ ifeq ($(VERBOSE), )
118
121
MAKE_LOG = > tbb.log 2>&1 \
119
122
&& echo "(tbb) TBB compilation finished successfully." \
120
123
|| cat tbb.log; rm -f tbb.log
Original file line number Diff line number Diff line change 26
26
Sys.info()[[" sysname" ]],
27
27
Windows = " ^tbb.*\\ .dll$" ,
28
28
Darwin = " ^libtbb.*\\ .dylib$" ,
29
- Linux = " ^libtbb.*\\ .so.*$" ,
30
29
" ^libtbb.*\\ .so.*$"
31
30
)
32
31
Original file line number Diff line number Diff line change @@ -82,3 +82,14 @@ if (getRversion() < "4.0") {
82
82
} else {
83
83
define(STDVER = " " )
84
84
}
85
+
86
+ # on Solaris, check if we're using gcc or g++
87
+ if (Sys.info()[[" sysname" ]] == " SunOS" ) {
88
+ cxx <- r_cmd_config(" CXX" )
89
+ version <- system(paste(cxx , " --version" ), intern = TRUE )
90
+ for (compiler in c(" gcc" , " g++" )) {
91
+ if (any(grepl(compiler , version , fixed = TRUE ))) {
92
+ define(COMPILER = " compiler=gcc" )
93
+ }
94
+ }
95
+ }
You can’t perform that action at this time.
0 commit comments