From 8c0e5aeff67b2c00d94c747cf586bc59eae28a46 Mon Sep 17 00:00:00 2001 From: Ed Lebert Date: Sun, 20 Nov 2011 07:58:00 -0600 Subject: [PATCH] added build clause for cygwin in extconf.rb files --- ext/extconf.rb | 9 +++++++++ ext/fastfilereader/extconf.rb | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/ext/extconf.rb b/ext/extconf.rb index 9a9b0208b..160d08c34 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -139,6 +139,15 @@ def manual_ssl_config when /aix/ CONFIG['LDSHARED'] = "$(CXX) -shared -Wl,-G -Wl,-brtl" +when /cygwin/ + # For rubies built with Cygwin, CXX may be set to CC, which is just + # a wrapper for gcc. + # This will compile, but it will not link to the C++ std library. + # Explicitly set CXX to use g++. + CONFIG['CXX'] = "g++" + # on Unix we need a g++ link, not gcc. + CONFIG['LDSHARED'] = "$(CXX) -shared" + else # on Unix we need a g++ link, not gcc. CONFIG['LDSHARED'] = "$(CXX) -shared" diff --git a/ext/fastfilereader/extconf.rb b/ext/fastfilereader/extconf.rb index 1c9b1b2af..07fe97905 100644 --- a/ext/fastfilereader/extconf.rb +++ b/ext/fastfilereader/extconf.rb @@ -77,6 +77,15 @@ def add_define(name) # on Unix we need a g++ link, not gcc. CONFIG['LDSHARED'] = "$(CXX) -shared -Wl,-G" +when /cygwin/ + # For rubies built with Cygwin, CXX may be set to CC, which is just + # a wrapper for gcc. + # This will compile, but it will not link to the C++ std library. + # Explicitly set CXX to use g++. + CONFIG['CXX'] = "g++" + # on Unix we need a g++ link, not gcc. + CONFIG['LDSHARED'] = "$(CXX) -shared" + else # on Unix we need a g++ link, not gcc. CONFIG['LDSHARED'] = "$(CXX) -shared"