libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool, llvm-gcc, failing C++ exceptions


From: Ralf Wildenhues
Subject: Re: libtool, llvm-gcc, failing C++ exceptions
Date: Wed, 6 Jan 2010 07:06:34 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hi Bob,

* Bob Friesenhahn wrote on Tue, Jan 05, 2010 at 05:11:56PM CET:
> Using 'llvm-gcc' (GCC frontend to llvm compiler) I find that C++
> exceptions do not work (are not caught) in the built programs.
> 
> When building C++ programs and libraries, libtool tells the compiler
> to not supply its own runtime or libraries, and then specifies what
> it believes are the correct runtime and libraries.
> 
> Over the years I have encountered a number of cases where C++
> exceptions don't work, and llvm-gcc (as provided with FreeBSD) is an
> example.  Another case is with 64-bit code on AMD64 Solaris 10 where
> C++ exceptions don't work in GCC-built code (but they do work with
> the Sun compiler).  An identical problem was reported in 64-bit
> AMD64 code under FreeBSD 7.2.  Unfortunately, this is a complex
> problem because sometimes the C++ exceptions stop working after a
> large body of code (e.g. GraphicsMagick + libtiff + ....) has been
> linked into it.  It has something to do with process initialization.
> 
> While it has not been proven yet, I am suspecting that the failing
> C++ exceptions have something to do with the way that libtool links
> these modules.
> 
> Does anyone have ideas about this?

Try to find out if exceptions work when you manually override what
libtool does.  My first guess would be that only library linking is
wrong, but not program linking.  In an up to date build tree of GM:
  rm magick/libGraphicsMagick.la
  env RM=echo make magick/libGraphicsMagick.la

then copy and paste the link command line, adjust it the way you think
it should have looked instead, and run it.  Let's hope the $RM override
keeps all required intemediate files for you.

Then rebuild a program that uses this library.  Does exception handling
work now?  You may have to rinse and repeat with other suspected-broken
libraries.

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]