c++ code executes very slowly - sjlj EH to blame?
Adam McKee
adam_m_mckee@yahoo.ca
Wed Dec 22 10:31:00 GMT 2004
Hi Bill,
Here's what I did to build gcc-3.4.3 with dwarf2 EH:
First, get the gcc sources (duh) and Danny Smith's
patch to support dwarf2 EH on cygwin:
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01989.html
The patch is meant for gcc-4.0 but it worked for me on
3.4.3.
% cd /
% mkdir install
% rm -rf install/gcc-3.4.3
% mkdir install/gcc-3.4.3
% cd /usr/src
% bzip2 -cd ... # unpack gcc sources
% cd gcc-3.4.3
% patch -p1 < ../cygming-dwarf2-eh.patch
% cd ..
% rm -rf obj
% mkdir obj
% cd obj
% ../gcc-3.4.3/configure \
--verbose --prefix=/usr --exec-prefix=/usr \
--sysconfdir=/etc --libdir=/usr/lib \
--libexecdir=/usr/lib --mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-languages=c,c++ --enable-nls \
--without-included-gettext --enable-libgcj \
--with-system-zlib --enable-interpreter \
--enable-threads=posix --disable-sjlj-exceptions \
--disable-version-specific-runtime-libs \
--disable-win32-registry
% make bootstrap
% make install
About the gcc configuration -- all I did was take the
configuration from the gcc-3.4.1/cygwin (gcc -v), and
replace --enable-sjlj-exceptions with
--disable-sjlj-exceptions.
A good idea is to make a tarball from your build -
that's easy, just do this after you do make install:
% make DESTDIR=/install/gcc-3.4.3 install
Then make a tarball, and put it in a safe place for
re-use/distribution.
I hope this helps.
-Adam
--- Bill Priest <priestwilliaml@yahoo.com> wrote:
> >Thanks Danny for helping me build gcc/g++ with
> dwarf2
> >EH. Performance of my app is now on par with linux
> -
> >where before it was about 3x slower (not 6x as I
> >previously reported... sorry for the confusion).
>
> Any chance you could provide patches to the standard
> cygwin build scripts or gcc source if required or at
> a minimum the write-up required to make it work.
> I've
> recently hit C++ problems w/ cygwin where the
> exception handling didn't work like it does w/ Linux
> (STL_port). I'd like to be able to try the dwarf2
> EH
> to see if it fixes the problem.
>
> TIA,
>
> Bill
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list