Giter Club home page Giter Club logo

libdwarf's Introduction

This is README.md

BUILDING from a git clone of the source tree with configure

in source base dir, do x=pwd sh autogen.sh rm -rf /tmp/empty mkdir /tmp/empty cd /tmp/empty # CFLAGS and enable-wall and # dwarfgen and dwarfexample are optional. CFLAGS='-g -O0' $x/configure
--enable-dwarfexample --enable-dwarfgen
--enable-wall make make check

BUILDING from a git clone of the source tree with cmake

where code is the directory name for the libdwarf project

rm -rf /tmp/bld mkdir /tmp/bld cd /tmp/bld cmake -DDO_TESTING=ON -DBUILD_DWARFEXAMPLE=ON
-DBUILD_DWARFGEN=ON /path/to/code ctest -R self

The following does not necessarily work. ?

To build using CMake one might do

  • cd /a/b/libdwarf-1
  • configure: cmake . -B_Release -DCMAKE_BUILD_TYPE=Release
  • build: cmake --build _Release --target dd
  • (optionally install): sudo cmake --build _Release --target install

for autotools builds, see README

Using autotools

IGNORE THE FOLLOWING. NEEDS REWRITE

Building in Source Tree

cd /a/b/libdwarf-1
./configure
make dd
#You may need to be root to do the following copy commands
cp dwarfdump/dwarfdump      /usr/local/bin
cp dwarfdump/dwarfdump.conf /usr/local/lib
#The following is optional, not needed to run dwarfdump
#when doing the default build.
cp libdwarf/libdwarf.a      /usr/local/lib

Building Out of Source Tree

mkdir /var/tmp/dwarfex
cd /var/tmp/dwarfex
/a/b/libdwarf-1/configure
make dd

In this case the source directory is not touched and all objects and files created are under /var/tmp/dwarfex

NOTE: When building out of source tree the source tree must be cleaned of any files created by a build in the source tree. This is due to the way GNU Make VPATH works.

Build All

To build all the tools (including dwarfgen and dwarfexample) use --target all on CMake or make all on autotools. There are known small compile-time issues with building dwarfgen on MaxOSX and most don't need to build dwarfgen.

Options

By default configure compiles and uses libdwarf.a. With -Dshared=ON (CMake) or --enable-shared (autotools) appended to the configure step, both libdwarf.a and libdwarf.so are built. The runtimes built will reference libdwarf.so.

With -Dnonshared=FALSE (CMake) or --disable-nonshared (autotools) appeded to the configure step, libdwarf.so is built and used; libdwarf.a is not built.

Sanity checking: Recent gcc has some checks that can be done at runtime. -fsanitize=undefined which are turned on here by --enable-sanitize at build time.

Distributing

When ready to create a new source distribution do a build and then make dist

David Anderson. Updated May 2021

libdwarf's People

Contributors

seviezhou avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.