[#32676] VC++ embedded rubygems gives NoMethodError undefined method `synchronize' for Mutex — Phlip <phlip2005@...>
[I will try Bill Kelly's PDB path advice presently; this issue is more
5 messages
2010/10/03
[#32687] Re: VC++ embedded rubygems gives NoMethodError undefined method `synchronize' for Mutex
— Roger Pack <rogerdpack2@...>
2010/10/04
> This one's about...
[#32703] Re: VC++ embedded rubygems gives NoMethodError undefined method `synchronize' for Mutex
— Phlip <phlip2005@...>
2010/10/05
> > #<NoMethodError: undefined method `synchronize' for #<Mutex:0x750faa8>>
[#32698] [Ruby 1.9-Feature#3908][Open] private constant — Yusuke Endoh <redmine@...>
Feature #3908: private constant
10 messages
2010/10/05
[#32795] Call for Cooperation: CFUNC usage survey — SASADA Koichi <ko1@...>
Hi,
5 messages
2010/10/15
[#32814] WeakHash — Santiago Pastorino <santiago@...>
Hi guys,
6 messages
2010/10/15
[#32844] [Ruby 1.9-Feature#3963][Open] Map class in standard library — Thomas Sawyer <redmine@...>
Feature #3963: Map class in standard library
3 messages
2010/10/18
[#32864] [Ruby 1.9-Bug#3972][Open] r28668 breaks test/unit when combined with the testing rake task — Aaron Patterson <redmine@...>
Bug #3972: r28668 breaks test/unit when combined with the testing rake task
6 messages
2010/10/20
[#32932] Behavior of initialize in 1.9 — Aaron Patterson <aaron@...>
The behavior of initialize in 1.9 seems to have changed. Here is an irb
5 messages
2010/10/28
[#32960] [Ruby 1.9-Bug#4005][Open] YAML fails to roundtrip Time objects — Peter Weldon <redmine@...>
Bug #4005: YAML fails to roundtrip Time objects
6 messages
2010/10/29
[#32976] Improve MinGW builds for Ruby 1.8.7, 1.9.2 and 1.9.3 — Luis Lavena <luislavena@...>
Hello,
10 messages
2010/10/30
[#32978] Re: Improve MinGW builds for Ruby 1.8.7, 1.9.2 and 1.9.3
— Aaron Patterson <aaron@...>
2010/10/30
On Sun, Oct 31, 2010 at 03:42:02AM +0900, Luis Lavena wrote:
[ruby-core:32729] Question on prior patch to mkmf (+ patch)
From:
Scott Gonyea <scott@...>
Date:
2010-10-09 03:34:50 UTC
List:
ruby-core #32729
This is in regards to patch 28765 (Jul 27, 2010). The patch notes are rather blas藝 * lib/mkmf.rb (have_framework): added. http://github.com/ruby/ruby/commit/444b943e354725bf623a050c88a4a8bd3f926c74 But it's a pretty big change, as it makes writing Ruby Extensions in Objective-C a far less stressful experience. Prior to this patch, only ".c" files would be compiled with C compiler flags--as it was otherwise hard-coded as such, in mkmf.rb. I've attached a patch, to make mkmf.rb closer to what I think makes sense. Specifically: - Adds support for the comedy-option known as Objective-C++ (.mm file extension) - Banishes the hardcoding of file-extensions, when generating compiler options, as I feel it leads to very unexpected behavior. - I may simply be ignorant, and I'd love to hear some thoughts... But it seems that a "COMPILE_OBJC" constant, in mkmf, isn't all that necessary. ie, I can't really think of a case where you'd want to compile your C and your ObjC code (or C++ and ObjC++), differently from each other. If it is necessary, then there will be a need for COMPILE_C, COMPILE_CXX, COMPILE_OBJC, and a COMPILE_OBJCXX. My own opinion, in that case, is mkmf.rb could use some minor changes to make this whole process much more intuitive. - sg
Attachments (1)
objc_objcpp_mkmf.patch
(1.33 KB, text/x-diff)
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb (revision 29429)
+++ lib/mkmf.rb (working copy)
@@ -9,7 +9,7 @@
CONFIG = RbConfig::MAKEFILE_CONFIG
ORIG_LIBPATH = ENV['LIB']
-CXX_EXT = %w[cc cxx cpp]
+CXX_EXT = %w[cc mm cxx cpp]
if File::FNM_SYSCASE.zero?
CXX_EXT.concat(%w[C])
end
@@ -1954,18 +1954,12 @@
mfile.printf("\n\t%s\n\n", COMPILE_CXX)
end
end
- %w[c].each do |e|
+ SRC_EXT.each do |e|
COMPILE_RULES.each do |rule|
mfile.printf(rule, e, $OBJEXT)
mfile.printf("\n\t%s\n\n", COMPILE_C)
end
end
- %w[m].each do |e|
- COMPILE_RULES.each do |rule|
- mfile.printf(rule, e, $OBJEXT)
- mfile.printf("\n\t%s\n\n", COMPILE_OBJC)
- end
- end
mfile.print "$(RUBYARCHDIR)/" if $extout
mfile.print "$(DLLIB): "
@@ -2129,7 +2123,6 @@
RULE_SUBST = config_string('RULE_SUBST')
COMPILE_C = config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<'
COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<'
-COMPILE_OBJC = config_string('COMPILE_OBJC') || COMPILE_C
TRY_LINK = config_string('TRY_LINK') ||
"$(CC) #{OUTFLAG}conftest $(INCFLAGS) $(CPPFLAGS) " \
"$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"