Skip to content

Commit

Permalink
added build clause for cygwin in extconf.rb files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Lebert committed Nov 20, 2011
1 parent 86784d2 commit 8c0e5ae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions ext/fastfilereader/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8c0e5ae

Please sign in to comment.