build/cplusplus_support.rb in passenger-4.0.2 vs build/cplusplus_support.rb in passenger-4.0.3

- old
+ new

@@ -71,10 +71,10 @@ def create_c_executable(target, sources, linkflags = "#{EXTRA_PRE_CFLAGS} #{EXTRA_PRE_LDFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}") run_compiler "#{CC} #{sources} -o #{target} #{linkflags}" end def create_shared_library(target, sources, flags = "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_LDFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}") - if RUBY_PLATFORM =~ /darwin/ + if PlatformInfo.os_name == "macosx" shlib_flag = "-flat_namespace -bundle -undefined dynamic_lookup" else shlib_flag = "-shared" end run_compiler "#{CXX} #{shlib_flag} #{sources} -fPIC -o #{target} #{flags}"