Skip to content

Commit

Permalink
modifying build so that it works with solaris 2008.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Super-User authored and Super-User committed Jan 20, 2009
1 parent 0c66e05 commit b1af923
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Rakefile
Expand Up @@ -139,7 +139,6 @@ subdir 'ext/apache2' do

desc "Build mod_passenger Apache 2 module"
task :apache2 => ['mod_passenger.so', 'ApplicationPoolServerExecutable', :native_support]

file 'mod_passenger.so' => [
'../libboost_oxt.a',
'mod_passenger.o'
Expand All @@ -151,6 +150,7 @@ subdir 'ext/apache2' do
#
# Oh, and libtool sucks too. Do we even need it anymore in 2008?
linkflags = "#{LDFLAGS} #{MULTI_ARCH_FLAGS}"

linkflags << " -lstdc++ -lpthread " <<
"../libboost_oxt.a " <<
APR_LIBS
Expand Down Expand Up @@ -179,6 +179,11 @@ subdir 'ext/apache2' do
end

file 'mod_passenger.o' => ['mod_passenger.c'] do
puts "OPTIMIZATION FLAGS = #{OPTIMIZATION_FLAGS}"
puts "APR_FLAGS = #{APR_FLAGS}"
puts "APU_FLAGS = #{APU_FLAGS}"
puts "APXS2_FLAGS = #{APXS2_FLAGS}"
puts "CXXFLAGS = #{CXXFLAGS}"
compile_c 'mod_passenger.c', APACHE2::CXXFLAGS
end

Expand Down
4 changes: 4 additions & 0 deletions lib/passenger/platform_info.rb
Expand Up @@ -125,6 +125,7 @@ def self.determine_apxs2_flags
if RUBY_PLATFORM =~ /solaris/ # TODO: Add support for people using SunStudio
# The big problem is Coolstack apxs includes a bunch of solaris -x directives.
flags = flags.split.reject {|f| f =~ /^\-x/}.join(' ')
flags = flags.split.reject {|f| f =~ /^\-Xa/}.join(' ')
end

return flags
Expand Down Expand Up @@ -163,6 +164,9 @@ def self.determine_apr_info
flags = `#{APR_CONFIG} --cppflags --includes`.strip
libs = `#{APR_CONFIG} --link-ld`.strip
flags.gsub!(/-O\d? /, '')
if RUBY_PLATFORM =~ /solaris/
flags = flags.split.reject {|f| f =~ /^\-mt/}.join(' ')
end
return [flags, libs]
end
end
Expand Down

0 comments on commit b1af923

Please sign in to comment.