I noticed that mingw just released a gcc-4.4.0 with only dwarf exception handling supported. Any thoughts on this? Would it "work" for ruby on windows? Thanks. =r
On Wed, Jul 1, 2009 at 1:24 PM, Roger Pack<rogerdpack at gmail.com> wrote:> I noticed that mingw just released a gcc-4.4.0 with only dwarf > exception handling supported. > > Any thoughts on this? Would it "work" for ruby on windows?I haven''t found any performance difference between 3.4.5 and 4.3 for Windows, but could try 4.4.0 AFAIk, for the dwarf support, it will only require the dll for throwing exceptions across boundaries. I don''t see a problem with that, except the linking. But maybe I''m wrong? -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Luis Lavena wrote:> On Wed, Jul 1, 2009 at 1:24 PM, Roger Pack<rogerdpack at gmail.com> wrote: >> I noticed that mingw just released a gcc-4.4.0 with only dwarf >> exception handling supported. >> >> Any thoughts on this? Would it "work" for ruby on windows? > > I haven''t found any performance difference between 3.4.5 and 4.3 for > Windows, but could try 4.4.0 > > AFAIk, for the dwarf support, it will only require the dll for > throwing exceptions across boundaries. I don''t see a problem with > that, except the linking. > > But maybe I''m wrong? >Yes, but that, and other c++ changes that happened over the years, changed the c++ ABI. I''m just a bit worried that pre-compiled windows gems might be a tad incompatible. Though now that I think of it, a) the same c-runtime is used b) ''standalone'' code (contained wholly within the extension) should be just fine, c) extensions that interface with third-party c++ code would probably need to offer the compiled lib anyway as few offer mingw versions anyway. So this *might* be total hyperbole Qt comes to mind as an extreme example that might fail, they seem to distribute mingw compiled libs and it is a beast of a project to compile.. But rubyqt might be fine to distribute custom-compiled lib? Would it be indicated in RUBY_PLATFORM on which gcc it was compiled? Personally I would prefer using 4.4 from the start, so everyone would be on the same decade on the compilers, but that would be another round of testing, worrying and delaying, on rubyinstaller and devkit. And the gcc 4.4 release is *very* fresh itself. -- Mikko Lehtonen
> ?Qt comes to mind as an extreme example that might fail, they seem to > ?distribute mingw compiled libs and it is a beast of a project to > ?compile.. But rubyqt might be fine to distribute custom-compiled lib?Yeah true that binary distributables that include a dll might be out of luck. The first one that comes to mind being msvcrt.dll, but I think we almost never need to propagate exceptions out of it, so that might be ok.> ?Would it be indicated in RUBY_PLATFORM on which gcc it was compiled?Nope, not unless we add it like RUBY_COMPILED_BY or something. I guess the good news is we can use 4.4 SLJL interchangeably with 3.4.5 SLJL...I think, so you can use "4.4" with a ruby built via 3.4.5, though not with dwarf2...as easily.> ?Personally I would prefer using 4.4 from the start, so everyone would > ?be on the same decade on the compilers, but that would be another > ?round of testing, worrying and delaying, on rubyinstaller and > ?devkit. And the gcc 4.4 release is *very* fresh itself.Yeah no joke a month old--they might still be finding some bugs in that one :) =r
On Wed, Jul 1, 2009 at 8:27 PM, Roger Pack<rogerdpack at gmail.com> wrote:>> ?Qt comes to mind as an extreme example that might fail, they seem to >> ?distribute mingw compiled libs and it is a beast of a project to >> ?compile.. But rubyqt might be fine to distribute custom-compiled lib? > > Yeah true that binary distributables that include a dll might be out > of luck. ?The first one that comes to mind being msvcrt.dll, but I > think we almost never need to propagate exceptions out of it, so that > might be ok. > > > >> ?Would it be indicated in RUBY_PLATFORM on which gcc it was compiled? > > Nope, not unless we add it like RUBY_COMPILED_BY or something. > > I guess the good news is we can use 4.4 SLJL interchangeably with > 3.4.5 SLJL...I think, so you can use "4.4" with a ruby built via > 3.4.5, though not with dwarf2...as easily. >http://tdragon.net/recentgcc/ Dwarf-2 vs. SJLJ unwinding: GCC supports two methods of stack frame unwinding: Dwarf-2 (DW2) or SJLJ (setjmp/longjmp). DW2 unwinding is desirable for a number of reasons, but cannot yet (on Windows) pass exceptions through "foreign" stack frames (code compiled by another non-DW2-enabled compiler, such as OS DLLs in a Windows callback). This means that you should choose the SJLJ version of TDM-GCC unless you can be certain you will never throw an exception through a foreign stack area. See README-gcc-tdm.txt, included in the core package, for further usage notes on this topic.>> ?Personally I would prefer using 4.4 from the start, so everyone would >> ?be on the same decade on the compilers, but that would be another >> ?round of testing, worrying and delaying, on rubyinstaller and >> ?devkit. And the gcc 4.4 release is *very* fresh itself. > > Yeah no joke a month old--they might still be finding some bugs in that one :)I would rather bet on stability than freshness. We walked a long and difficult road to change all the sudden. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
> I noticed that mingw just released a gcc-4.4.0 with only dwarf > exception handling supported. > Any thoughts on this? Would it "work" for ruby on windows?Interesting. I wonder if http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192818 profile guided optimizations would help much [they require GCC 4.1 I believe]. =r
On Tue, Jul 7, 2009 at 6:25 PM, Roger Pack<rogerdpack at gmail.com> wrote:>> I noticed that mingw just released a gcc-4.4.0 with only dwarf >> exception handling supported. >> Any thoughts on this? Would it "work" for ruby on windows? > > Interesting. ?I wonder if > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192818 > profile guided optimizations would help much [they require GCC 4.1 I > believe].That is something similar VC8 and VC9 offer, but only on the paid version. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry