File nginx-1.4.2-passenger_fix.patch of Package nginx
diff -Nru nginx-1.4.2.orig/passenger/build/common_library.rb nginx-1.4.2/passenger/build/common_library.rb
--- nginx-1.4.2.orig/passenger/build/common_library.rb 2013-08-05 22:44:31.000000000 +0200
+++ nginx-1.4.2/passenger/build/common_library.rb 2013-08-14 08:19:14.405511929 +0200
@@ -34,7 +34,7 @@
# Defines tasks for compiling a static library containing Boost and OXT.
def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
output_file = "#{output_dir}.a"
- flags = "-Iext #{extra_compiler_flags} #{EXTRA_CXXFLAGS}"
+ flags = "-Iext #{extra_compiler_flags} #{EXTRA_CXXFLAGS} -fPIC #{ENV['RPM_OPT_FLAGS']}"
if false && boolean_option('RELEASE')
# Disable RELEASE support. Passenger Standalone wants to link to the
@@ -128,7 +128,7 @@
cc = PlatformInfo.cc
cxx = PlatformInfo.cxx
# Disable all warnings: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
- cflags = "#{EXTRA_CFLAGS} -w"
+ cflags = "#{EXTRA_CFLAGS} #{ENV['RPM_OPT_FLAGS']} -w"
sh "mkdir -p #{LIBEV_OUTPUT_DIR}" if !File.directory?(LIBEV_OUTPUT_DIR)
sh "cd #{LIBEV_OUTPUT_DIR} && sh #{LIBEV_SOURCE_DIR}configure " +
"--disable-shared --enable-static " +
@@ -181,7 +181,7 @@
cxx = PlatformInfo.cxx
# Disable all warnings. The author has a clear standpoint on that:
# http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS
- cflags = "#{EXTRA_CFLAGS} -w"
+ cflags = "#{EXTRA_CFLAGS} #{ENV['RPM_OPT_FLAGS']} -w"
sh "mkdir -p #{LIBEIO_OUTPUT_DIR}" if !File.directory?(LIBEIO_OUTPUT_DIR)
sh "cd #{LIBEIO_OUTPUT_DIR} && sh #{LIBEIO_SOURCE_DIR}configure " +
"--disable-shared --enable-static " +
@@ -193,6 +193,7 @@
libeio_sources = Dir["ext/libeio/{*.c,*.h}"]
file LIBEIO_OUTPUT_DIR + ".libs/libeio.a" => [LIBEIO_OUTPUT_DIR + "Makefile"] + libeio_sources do
sh "rm -f #{LIBEIO_OUTPUT_DIR}/libeio.la"
+ sh "cd #{LIBEIO_OUTPUT_DIR} && make eio.o"
sh "cd #{LIBEIO_OUTPUT_DIR} && make libeio.la"
end
diff -Nru nginx-1.4.2.orig/passenger/lib/phusion_passenger/common_library.rb nginx-1.4.2/passenger/lib/phusion_passenger/common_library.rb
--- nginx-1.4.2.orig/passenger/lib/phusion_passenger/common_library.rb 2013-08-05 22:44:31.000000000 +0200
+++ nginx-1.4.2/passenger/lib/phusion_passenger/common_library.rb 2013-08-14 08:20:58.981516595 +0200
@@ -101,7 +101,7 @@
end
def define_tasks(extra_compiler_flags = nil)
- flags = "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
+ flags = "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} -fPIC #{ENV['RPM_OPT_FLAGS']} "
flags << EXTRA_CXXFLAGS
flags.strip!