24435411 In Ruby 2.1 rbconfig.rb file, CXXFLAGS should match GNU compiler options
--- a/components/ruby/ruby-21/Makefile Sat Aug 13 23:42:23 2016 -0700
+++ b/components/ruby/ruby-21/Makefile Thu Aug 11 14:21:21 2016 -0700
@@ -76,7 +76,10 @@
-e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/ruby.1.sedscript \
> Solaris/ruby.1.sedscript.mod ; \
$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \
- -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/rbconfig.sedscript \
+ -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" \
+ -e "s/CFLAGS_GCC/$(CFLAGS.gcc)/" \
+ -e "s/CXXFLAGS_GCC/$(CXXFLAGS.gcc)/" \
+ Solaris/rbconfig.sedscript \
> Solaris/rbconfig.sedscript.mod ; \
$(GSED) -i -f Solaris/ruby.1.sedscript.mod \
$(PROTORUBYDIR)/share/man/man1/ruby.1 ; \
--- a/components/ruby/ruby-21/Solaris/rbconfig.sedscript Sat Aug 13 23:42:23 2016 -0700
+++ b/components/ruby/ruby-21/Solaris/rbconfig.sedscript Thu Aug 11 14:21:21 2016 -0700
@@ -25,16 +25,19 @@
# sed script to fix the rbconfig.rb file after
# the configure and install of ruby
-# use gcc/g++ instead of build-system-specific paths to cc or CC
+# use gcc/g++ instead of build-system-specific paths to Studio compilers cc/CC
# Note that for the first two command lines below,
# /usr/bin/sed correctly substitutes; /usr/bin/gsed does not.
# Use /usr/bin/sed for this script.
s/\'CC=.*\/cc\'/\'CC=\/usr\/bin\/gcc\'/
s/\'CXX=.*\/CC\'/\'CXX=\/usr\/bin\/g++\'/
+s/\'CFLAGS=.[^\']*\'/\'CFLAGS=CFLAGS_GCC\'/
+s/\'CXXFLAGS=.[^\']*\'/\'CXXFLAGS=CXXFLAGS_GCC\'/
s/CONFIG\[\"CC\"\].*$/CONFIG\[\"CC\"\] = \"\/usr\/bin\/gcc\"/
s/CONFIG\[\"CXX\"\].*$/CONFIG\[\"CXX\"\] = \"\/usr\/bin\/g++\"/
-s/CONFIG\[\"CFLAGS\"\].*$/CONFIG\[\"CFLAGS\"\] = \"-g -O3 -fPIC\"/
+s/CONFIG\[\"CFLAGS\"\].*$/CONFIG\[\"CFLAGS\"\] = \"CFLAGS_GCC\"/
+s/CONFIG\[\"CXXFLAGS\"\].*$/CONFIG\[\"CXXFLAGS\"\] = \"CXXFLAGS_GCC\"/
s/CONFIG\[\"CCDLFLAGS\"\].*$/CONFIG\[\"CCDLFLAGS\"\] = \"-fPIC\"/
s/"$(CC) -G"/"$(CC) -shared"/
s/"$(CXX) -G"/"$(CXX) -shared"/