File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
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
8686
8787MAKE_TARGETS = tbb_build_prefix=lib tbb_release tbbmalloc_release
8888
89- ifeq ($(USE_TBB), Windows)
89+ ifeq ($(USE_TBB), Windows)
9090
9191 # rtools: turn on hacks to compensate for make and shell differences rtools<=>MinGW
9292 # compiler: overwrite default (which is cl = MS compiler)
@@ -105,6 +105,9 @@ ifeq ($(USE_TBB), Windows)
105105
106106endif
107107
108+ # write compiler if set
109+ MAKE_ARGS += $(COMPILER)
110+
108111# For Solaris detect if this is 32-bit R on x86 and if so forward that to TBB
109112ifeq ($(USE_TBB), SunOS)
110113 R_32BIT = $(shell ${R_HOME}/bin/Rscript -e 'cat(.Machine$$sizeof.pointer == 4)')
@@ -114,7 +117,7 @@ ifeq ($(USE_TBB), SunOS)
114117endif
115118
116119# Write compilation output to file, and log it if installation fails.
117- ifeq ($(VERBOSE),)
120+ ifeq ($(VERBOSE), )
118121 MAKE_LOG = > tbb.log 2>&1 \
119122 && echo "(tbb) TBB compilation finished successfully." \
120123 || cat tbb.log; rm -f tbb.log
Original file line number Diff line number Diff line change 2626 Sys.info()[[" sysname" ]],
2727 Windows = " ^tbb.*\\ .dll$" ,
2828 Darwin = " ^libtbb.*\\ .dylib$" ,
29- Linux = " ^libtbb.*\\ .so.*$" ,
3029 " ^libtbb.*\\ .so.*$"
3130 )
3231
Original file line number Diff line number Diff line change @@ -82,3 +82,14 @@ if (getRversion() < "4.0") {
8282} else {
8383 define(STDVER = " " )
8484}
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