Permalink
Browse files

Fix compiler warnings on Apple Clang 4.2.

  • Loading branch information...
1 parent 6ddbb55 commit f99ad28bd00ec76b09b4d185ce2575ea891cd0c2 @FooBarWidget FooBarWidget committed Apr 2, 2013
Showing with 10 additions and 0 deletions.
  1. +4 −0 build/common_library.rb
  2. +6 −0 lib/phusion_passenger/platform_info/compiler.rb
View
@@ -21,6 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
+require 'phusion_passenger/platform_info/compiler'
require 'phusion_passenger/platform_info/cxx_portability'
########## Phusion Passenger common library ##########
@@ -151,6 +152,9 @@ def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil)
task :libev # do nothing
end
+# Apple Clang 4.2 complains about ambiguous member templates in ev++.h.
+LIBEV_CFLAGS << " -Wno-ambiguous-member-template" if PlatformInfo.compiler_supports_wno_ambiguous_member_template?
+
########## libeio ##########
@@ -251,6 +251,12 @@ def self.compiler_supports_no_tls_direct_seg_refs_option?
:c, '', '-mno-tls-direct-seg-refs')
end
memoize :compiler_supports_no_tls_direct_seg_refs_option?, true
+
+ def self.compiler_supports_wno_ambiguous_member_template?
+ return try_compile("Checking for C compiler '-Wno-ambiguous-member-template' support",
+ :c, '', '-Wno-ambiguous-member-template')
+ end
+ memoize :compiler_supports_wno_ambiguous_member_template?, true
# Returns whether compiling C++ with -fvisibility=hidden might result
# in tons of useless warnings, like this:

0 comments on commit f99ad28

Please sign in to comment.