Skip to content

Commit 1f94e25

Browse files
authored
Merge pull request #72 from jeroen/master
Detect GCC version via R instead of ActionScript
2 parents d8fa4f1 + a77c843 commit 1f94e25

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/tbb/build/windows.gcc.inc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
#
1717
#
1818

19+
# Set by R
20+
R_COMPILED_BY ?= 4.9.3
21+
GCC_VERSION=${subst gcc ,,${R_COMPILED_BY}}
22+
1923
#------------------------------------------------------------------------------
2024
# Overriding settings from windows.inc
2125
#------------------------------------------------------------------------------
@@ -77,15 +81,16 @@ LINK_FLAGS = -Wl,--enable-auto-import
7781
LIB_LINK_FLAGS = $(DYLIB_KEY)
7882

7983
# gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them
80-
ifeq (ok,$(call detect_js,/minversion gcc 4.8))
84+
ifeq ($(shell expr $(GCC_VERSION) \>= 4.8), 1)
8185
RTM_KEY = -mrtm
8286
endif
8387

8488
# gcc 6.0 and later have -flifetime-dse option that controls
8589
# elimination of stores done outside the object lifetime
86-
ifeq (ok,$(call detect_js,/minversion gcc 6.0))
90+
ifeq ($(shell expr $(GCC_VERSION) \>= 6.0), 1)
8791
# keep pre-contruction stores for zero initialization
8892
DSE_KEY = -flifetime-dse=1
93+
COMPILE_ONLY += -flifetime-dse=1
8994
endif
9095

9196
ifeq ($(cfg), release)

0 commit comments

Comments
 (0)