22911313 R needs -D__MATHERR_RENAME_EXCEPTION for R packages written in C++
authorRich Burridge <rich.burridge@oracle.com>
Fri, 11 Mar 2016 11:12:56 -0800
changeset 5596 c3e2f9778be5
parent 5595 7019066a05e3
child 5597 bcd66d6b1f98
22911313 R needs -D__MATHERR_RENAME_EXCEPTION for R packages written in C++
components/r/Makefile
--- a/components/r/Makefile	Fri Mar 11 10:20:28 2016 -0800
+++ b/components/r/Makefile	Fri Mar 11 11:12:56 2016 -0800
@@ -74,7 +74,16 @@
 CONFIGURE_ENV += CFLAGS="-xO3 -xc99 -xlibmieee $(CC_BITS)"
 # Needed to successfully compile R packages using C++ code.
 CONFIGURE_ENV += CXX="$(CXX) -std=c++11"
-CONFIGURE_ENV += CXXFLAGS="$(CC_BITS) -std=c++11"
+
+# We (the Userland) team don't need -D__MATHERR_RENAME_EXCEPTION for the
+# creation of the R packages we provide in Solaris. It would be needed by
+# our customers that try to install R packages that use C++. And they would
+# be using the version of the Studio compilers on their machine(s) to do this.
+# Studio 12.5 will hopefully automatically provide this definition when C++
+# code is compiled with "-std=c++11". When that version of the Studio
+# compilers is released, we should encourage customers to install it, but
+# for those still using Studio 12.4, this definition will continue to be needed.
+CONFIGURE_ENV += CXXFLAGS="$(CC_BITS) -std=c++11 -D__MATHERR_RENAME_EXCEPTION"
 CONFIGURE_ENV += FPICFLAGS="$(studio_PIC)"
 CONFIGURE_ENV += FFLAGS="-xO3 $(CC_BITS)"
 CONFIGURE_ENV += FCFLAGS="-xO3 $(CC_BITS)"