public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Search Repo:
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Added code to remove Sun Studio flags from Solaris Coolstack APXS
Jacob Harris (author)
Mon Jun 16 14:18:26 -0700 2008
commit  8490a42f52786f0a3c9bde05d61e623ccf03c65b
tree    dae2d5b279753e490ca26145d918b42a581b64a0
parent  a4033a76a6a8f6c8df4ab76dc6fab93bdeb01c6a
...
118
119
120
 
 
 
 
 
 
 
121
122
123
...
118
119
120
121
122
123
124
125
126
127
128
129
130
0
@@ -118,6 +118,13 @@ private
0
       flags = `#{APXS2} -q CFLAGS`.strip << " -I" << `#{APXS2} -q INCLUDEDIR`
0
       flags.strip!
0
       flags.gsub!(/-O\d? /, '')
0
+
0
+ # Remove flags not supported by GCC
0
+ if RUBY_PLATFORM =~ /solaris/ # TODO: Add support for people using SunStudio
0
+ # The big problem is Coolstack apxs includes a bunch of solaris -x directives.
0
+ flags = flags.split.reject {|f| f =~ /^\-x/}.join(' ')
0
+ end
0
+
0
       return flags
0
     end
0
   end

Comments

  • harrisj Thu Jun 26 07:09:40 -0700 2008 at lib/passenger/platform_info.rb

    The Solaris Coolstack APXS reports SunStudio flags for his compilation flags. Two of these “-xO4 -xtarget=generic” trip up GCC, so I remove them here. Would like to add SunStudio support in the future.