<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -36,6 +36,7 @@ OPTIMIZE = [&quot;yes&quot;, &quot;on&quot;, &quot;true&quot;].include?(ENV['OPTIMIZE'])
 
 include PlatformInfo
 
+CC  = &quot;gcc&quot;
 CXX = &quot;g++&quot;
 LIBEXT = PlatformInfo.library_extension
 if OPTIMIZE
@@ -45,11 +46,11 @@ else
 end
 
 # Extra compiler flags that should always be passed to the C/C++ compiler.
-# Should be included last in the command string.
+# Should be included last in the command string, even after PlatformInfo.portability_cflags.
 EXTRA_CXXFLAGS = &quot;-Wall #{OPTIMIZATION_FLAGS}&quot;
 
 # Extra linker flags that should always be passed to the linker.
-# Should be included last in the command string.
+# Should be included last in the command string, even after PlatformInfo.portability_ldflags.
 EXTRA_LDFLAGS  = &quot;&quot;
 
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -25,8 +25,10 @@
 #ifndef _PASSENGER_CONFIGURATION_H_
 #define _PASSENGER_CONFIGURATION_H_
 
-#include &quot;Utils.h&quot;
-#include &quot;MessageChannel.h&quot;
+#ifdef __cplusplus
+	#include &quot;Utils.h&quot;
+	#include &quot;MessageChannel.h&quot;
+#endif
 
 /* The APR headers must come after the Passenger headers. See Hooks.cpp
  * to learn why.</diff>
      <filename>ext/apache2/Configuration.h</filename>
    </modified>
    <modified>
      <diff>@@ -23,11 +23,11 @@
 
 # Rake functions for compiling/linking C++ stuff.
 
-def compile_c(source, flags = CXXFLAGS)
-	sh &quot;#{CXX} #{flags} -c #{source}&quot;
+def compile_c(source, flags = &quot;#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}&quot;)
+	sh &quot;#{CC} #{flags} -c #{source}&quot;
 end
 
-def compile_cxx(source, flags = CXXFLAGS)
+def compile_cxx(source, flags = &quot;#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}&quot;)
 	sh &quot;#{CXX} #{flags} -c #{source}&quot;
 end
 
@@ -43,11 +43,11 @@ def create_static_library(target, sources)
 	sh &quot;ranlib #{target}&quot;
 end
 
-def create_executable(target, sources, linkflags = LDFLAGS)
+def create_executable(target, sources, linkflags = &quot;#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}&quot;)
 	sh &quot;#{CXX} #{sources} -o #{target} #{linkflags}&quot;
 end
 
-def create_shared_library(target, sources, flags = LDFLAGS)
+def create_shared_library(target, sources, flags = &quot;#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}&quot;)
 	if RUBY_PLATFORM =~ /darwin/
 		shlib_flag = &quot;-flat_namespace -bundle -undefined dynamic_lookup&quot;
 	else</diff>
      <filename>misc/rake/cplusplus.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ff1cfdc7d5138e42fe7d9f00e2393cf6cf42ee40</id>
    </parent>
  </parents>
  <author>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </author>
  <url>http://github.com/FooBarWidget/passenger/commit/0135af9de03802caef6d35e0ff4a5e199425e4aa</url>
  <id>0135af9de03802caef6d35e0ff4a5e199425e4aa</id>
  <committed-date>2009-05-28T13:02:23-07:00</committed-date>
  <authored-date>2009-05-28T13:02:23-07:00</authored-date>
  <message>Fix some build system problems.</message>
  <tree>c1ad00cc7a676d960009396ae2dd12f6574eb796</tree>
  <committer>
    <name>Hongli Lai (Phusion)</name>
    <email>hongli@phusion.nl</email>
  </committer>
</commit>
