Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b315a03

Browse filesBrowse files
committed
tell TBB we're using gcc on Solaris if appropriate
1 parent d2a3012 commit b315a03
Copy full SHA for b315a03

File tree

Expand file treeCollapse file tree

3 files changed

+16
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+16
-3
lines changed

‎src/Makevars.in

Copy file name to clipboardExpand all lines: src/Makevars.in
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ PKG_CXXFLAGS += -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1
8686

8787
MAKE_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

106106
endif
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
109112
ifeq ($(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)
114117
endif
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

‎src/install.libs.R

Copy file name to clipboardExpand all lines: src/install.libs.R
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
Sys.info()[["sysname"]],
2727
Windows = "^tbb.*\\.dll$",
2828
Darwin = "^libtbb.*\\.dylib$",
29-
Linux = "^libtbb.*\\.so.*$",
3029
"^libtbb.*\\.so.*$"
3130
)
3231

‎tools/config/configure.R

Copy file name to clipboardExpand all lines: tools/config/configure.R
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.