Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid using -bundle with -dynamiclib on darwin.

  • Loading branch information...
commit d057450cb7f7aed1917ea959e123e7cbc73eae8c 1 parent 4e10d14
@brixen brixen authored
View
2  configure
@@ -118,7 +118,7 @@ class Configure
# TODO: add conditionals for platforms
if RbConfig::CONFIG["build_os"] =~ /darwin/
- @ldshared = "#{@cc} -dynamic -bundle -undefined suppress -flat_namespace"
+ @ldshared = "#{@cc} -bundle -undefined suppress -flat_namespace"
else
@ldshared = "#{@cc} -shared"
end
View
11 rakelib/ext_helper.rb
@@ -99,7 +99,14 @@ def add_mri_capi
$LIBS << " #{DEFAULT["LIBS"]}"
$LIBS << " #{DEFAULT["DLDLIBS"]}"
- unless RUBY_PLATFORM =~ /mingw/
+ case RUBY_PLATFORM
+ when /mingw/
+ # do nothing
+ when /darwin/
+ # necessary to avoid problems with RVM injecting flags into the MRI build
+ # process.
+ add_ldflag DEFAULT["LDSHARED"].split[1..-1].join(' ').gsub(/-dynamiclib/, "")
+ else
add_ldflag DEFAULT["LDSHARED"].split[1..-1].join(' ')
end
@@ -183,7 +190,7 @@ def add_rbx_capi
when /darwin/
# on Unix we need a g++ link, not gcc.
# Ff line contributed by Daniel Harple.
- $LDSHARED = "#{$CXX} -dynamic -bundle -undefined suppress -flat_namespace -lstdc++"
+ $LDSHARED = "#{$CXX} -bundle -undefined suppress -flat_namespace -lstdc++"
when /aix/
$LDSHARED = "#{$CXX} -shared -Wl,-G -Wl,-brtl"
View
2  spec/ruby/optional/capi/rake_helper.rb
@@ -7,7 +7,7 @@
case PLATFORM
when /darwin/
output = "#{$cwd}/#{$ext_name}.bundle"
- build_cmd = "cc -dynamic -bundle -undefined suppress -flat_namespace #{common} -o #{output}"
+ build_cmd = "cc -bundle -undefined suppress -flat_namespace #{common} -o #{output}"
else
output = "#{$cwd}/#{$ext_name}.so"
build_cmd = "cc -shared #{common} -o #{output}"
Please sign in to comment.
Something went wrong with that request. Please try again.