build/apache2.rb in passenger-4.0.30 vs build/apache2.rb in passenger-4.0.31

- old
+ new

@@ -103,11 +103,15 @@ APACHE2_MODULE_INPUT_FILES.each_pair do |target, sources| extra_deps = ['ext/common/Constants.h'] + auto_generated_sources file(target => sources + extra_deps) do object_basename = File.basename(target) object_filename = APACHE2_OUTPUT_DIR + object_basename - compile_cxx(sources[0], "#{APACHE2_MODULE_CXXFLAGS} -o #{object_filename}") + compile_cxx(sources[0], + "#{EXTRA_PRE_CXXFLAGS} " << + "#{APACHE2_MODULE_CXXFLAGS} " << + "-o #{object_filename} " << + "#{EXTRA_CXXFLAGS}") end end dependencies = [ @@ -122,24 +126,25 @@ PlatformInfo.apache2ctl.nil? and raise "Could not find 'apachectl' or 'apache2ctl'." PlatformInfo.httpd.nil? and raise "Could not find the Apache web server binary." sources = (APACHE2_MODULE_OBJECTS + [APACHE2_MOD_PASSENGER_O]).join(' ') linkflags = - "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_LDFLAGS} " << - "#{PlatformInfo.apache2_module_cflags} " << - "#{EXTRA_CXXFLAGS} " << + "#{EXTRA_PRE_CXX_LDFLAGS} " << "#{APACHE2_MODULE_COMMON_LIBRARIES.join(' ')} " << "#{APACHE2_MODULE_BOOST_OXT_LIBRARY} " << "#{PlatformInfo.apache2_module_ldflags} " << - "#{PlatformInfo.portability_ldflags} " << - "#{EXTRA_LDFLAGS} #{EXTRA_CXX_LDFLAGS} " + "#{PlatformInfo.portability_cxx_ldflags} " << + "#{EXTRA_CXX_LDFLAGS} " create_shared_library(APACHE2_MODULE, sources, linkflags) end file APACHE2_MOD_PASSENGER_O => ['ext/apache2/mod_passenger.c'] do compile_c('ext/apache2/mod_passenger.c', - "#{APACHE2_MODULE_CFLAGS} -o #{APACHE2_MOD_PASSENGER_O}") + "#{EXTRA_PRE_CFLAGS} " << + "#{APACHE2_MODULE_CFLAGS} " << + "-o #{APACHE2_MOD_PASSENGER_O} " << + "#{EXTRA_CFLAGS}") end task :clean => 'apache2:clean' desc "Clean all compiled Apache 2 files" task 'apache2:clean' => 'common:clean' do