On Thursday 22 of January 2009 12:55:08 Brent Roman wrote: > Michal, > > I've got no immediate plans to port these patches to 1.8.6. > Why is this important for you? I (perhaps naively) thought 1.8.7 > would run just about anything that 1.8.6 does. Well, it runs Rails, and i could fix my code for it, the biggest issue i have with it, is that it randomly raises EOF and broken pipe exceptions when using sockets. > > The Ruby build seems to do special things to configure alloca() on ppc > machines. > In particular, I just noticed that Ruby does not use GNUC's > __builtin_alloca() > on PPC even if compiled with GNUC. Interesting. I couldn't find this code in the tree, so i guess i'm missing something. Can you point me to a file+line ? > The PPC patch tries to work around alloca() strangeness by invoking the > _builtin_alloca() > directly for stack clearing whenever __GNUC__ is defined. > This seems to work well on the mac g4 laptop on which I tested. It applied cleanly, but i had to change __ppc__ to __powerpc__ at rubysig.h:65 otherwise i ended up with 0x4770; and i had to leave __ppc__ at rubysig.h:211 because that asm instruction doesn't work on this machine. So i ended up with 0xA770 and __sp = _builtin_alloca(0). This way it works the same as 0x2770 minus mbari_ppc patch (as in, same errors on running test suite, and same speed) > > The test suite ran 11m6s patched vs 11m3s unpatched. > Both versions flagged an Error in test_translit_option plus one other > failure. I have 6 fails + 1 error, most in gdbm. > > I built each with CFLAGS=-O2 because -fno-stack-protector does not seem > to be supported by the apple version of gcc. I built with ./configure --enable-pthread CFLAGS="-O2 -g" I figured -fno-stack-protector is not required since man page says about options "This manual documents only one of these two forms, whichever one is not the default." > > Let me know how it works for you on ppc64... > Please send (just me) the output of gcc -v if this patch fails. > You might also want to attach your config.h file Sure. -- mb