On Wed, May 08, 2013 at 07:56:18PM +0400, Alexander Monakov wrote:
> Hello,
> 
> I'd like to make libbacktrace easier to import for use in other software.
> Right now it's mostly standalone, but depends on rest of GCC in the following:
> 
> 1. Build system.
> 2. Trivially depends on "filenames.h".
> 3. Depends on "dwarf2.{def,h}" to obtain DW_* enumeration values.
> 
> My autotools-foo is not strong enough to elegantly resolve build system
> dependencies (and for my intended use in APITrace I will need to write a
> CMake-based build recipe anyhow).  To remove dependency on GCC dwarf2.h, I'm
> proposing to enable building with system dwarf.h header.  However, in that
> header the enums are anonymous, and some enum values may be missing.  My
> preference is that references to named enums are retained, so I'm typedef'ing
> those to 'int' if unavailable.
> 
> To deal with potentially missing enum values, I'm adding configure checks and
> wrapping uses in HAVE_foo.  I'm also removing one use of DW_LNS_extended_op:
> the standard does not seem to define that name, but instead says that value 0
> is treated specially.
> 
> The following patch is the best compromise I have found between adding ugly
> fixups and making libbacktrace buildable standalone (with the caveat that
> either a different build system is used, or autotools files are hacked to
> remove GCC dependencies).
> 
> Comments?

Is it possible to link staticaly without external dependencies? This
simplifies generating backtrace when inside linker.

Reply via email to