File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed
Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 3434 endif
3535
3636 MAKE += -e
37- MAKE_CMD = CONLY="@CC@" CPLUS="@CXX11@" CXXFLAGS="@CXX11FLAGS@ -DTBB_NO_LEGACY=1" PIC_KEY="@CXX11PICFLAGS@" WARNING_SUPPRESS="" $(MAKE)
38-
37+ MAKE_CMD = \
38+ CONLY="@CC@" \
39+ CPLUS="@CXX11@" \
40+ CXXFLAGS="@CXX11FLAGS@ -DTBB_NO_LEGACY=1" \
41+ PIC_KEY="@CXX11PICFLAGS@" \
42+ WARNING_SUPPRESS="" \
43+ $(MAKE)
44+
3945endif
4046
4147ifdef USE_TBB
Original file line number Diff line number Diff line change @@ -12,6 +12,16 @@ for (candidate in candidates) {
1212 }
1313}
1414
15+ # work around issue with '-Werror=format-security' being specified without
16+ # a prior '-Wformat', which makes gcc angry
17+ cxxflags <- read_r_config(sprintf(" %sFLAGS" , cxx ), envir = NULL )[[1 ]]
18+ broken <-
19+ grepl(" -Werror=format-security " , cxxflags ) &&
20+ ! grepl(" -Wformat " , cxxflags )
21+
22+ if (broken )
23+ cxxflags <- gsub(" -Werror=format-security" , " -Wformat -Werror=format-security" , cxxflags )
24+
1525# define the set of flags appropriate to the current
1626# configuration of R
1727switch (
@@ -20,23 +30,23 @@ switch(
2030 CXX11 = define(
2131 CC = " $(CC)" ,
2232 CXX11 = " $(CXX11)" ,
23- CXX11FLAGS = " $(CXX11FLAGS) " ,
33+ CXX11FLAGS = cxxflags ,
2434 CXX11STD = " $(CXX11STD)" ,
2535 CXX11PICFLAGS = " $(CXX11PICFLAGS)"
2636 ),
2737
2838 CXX1X = define(
2939 CC = " $(CC)" ,
3040 CXX11 = " $(CXX1X)" ,
31- CXX11FLAGS = " $(CXX1XFLAGS) " ,
41+ CXX11FLAGS = cxxflags ,
3242 CXX11STD = " $(CXX1XSTD)" ,
3343 CXX11PICFLAGS = " $(CXX1XPICFLAGS)"
3444 ),
3545
3646 CXX = define(
3747 CC = " $(CC)" ,
3848 CXX11 = " $(CXX)" ,
39- CXX11FLAGS = " $(CXXFLAGS) " ,
49+ CXX11FLAGS = cxxflags ,
4050 CXX11STD = " -std=c++0x" ,
4151 CXX11PICFLAGS = " -fPIC"
4252 ),
You can’t perform that action at this time.
0 commit comments