Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] On strip and debugging symbols
Date: Wed, 23 Jun 2010 09:12:24 +0200	[thread overview]
Message-ID: <20100623091224.266d1030@surf> (raw)
In-Reply-To: <87d3vi7qqq.fsf@macbook.be.48ers.dk>

On Tue, 22 Jun 2010 22:32:29 +0200
Peter Korsgaard <jacmet@uclibc.org> wrote:

> Anyway, this is what coreutils' install does, so we probably don't
> have much chance for changing it. I have been pondering always doing
> make install instead of install-strip as we always strip at the end
> anyway.

In the notes I have from our Buildroot Developer Day after FOSDEM in
February :

 * Figure out if we can always build the packages in $(STAGING) *with*
   debugging symbols. If so, make it the default. If not, make it an
   option (location to be decided ?)

Therefore, I'd propose to add two options (which would replace the
existing ENABLE_DEBUG knob) :

 * ENABLE_DEBUG_IN_STAGING, which is enabled by default, and has the
   effect of building all packages with '-g', and installing them
   unstripped in $(STAGING_DIR). All *packages* would be installed in
   STAGING, be there libraries or end-user applications, so we could
   get rid of the <pkg>_INSTALL_STAGING and <pkg>_INSTALL_TARGET knobs.
   Having the debugging symbols in $(STAGING_DIR) allows to use remote
   debugging correctly. All packages are installed with
   "DESTDIR=$(STAGING_DIR) install" and "DESTDIR=$(TARGET_DIR)
   install", and only the stripping in $(TARGET_DIR) is done at a
   global level. So we don't try to use install-strip anymore.

 * ENABLE_DEBUG_IN_TARGET, which depends on ENABLE_DEBUG_IN_STAGING,
   and is disabled by default. This would disable the stripping of
   binaries on the target, so as to keep debugging symbols on the
   target, in case someone wants to run/use gdb on the target.

With this, we would have three cases :

 * (ENABLE_DEBUG_IN_STAGING=y, ENABLE_DEBUG_IN_TARGET=n) which is the
   default behaviour. Packages are built with debugging symbols, they
   are kept in $(STAGING_DIR), removed in $(TARGET_DIR). Remote
   debugging is possible. Target debugging is not.

 * (ENABLE_DEBUG_IN_STAGING=n, ENABLE_DEBUG_IN_TARGET=n). In that case
   packages are built without debugging symbols. Binaries are kept
   unstripped in $(STAGING_DIR) and stripped in $(TARGET_DIR). Remote
   and target debugging are not possible.

 * (ENABLE_DEBUG_IN_STAGING=y, ENABLE_DEBUG_IN_TARGET=y). Packages are
   built with debugging symbols, they are kept in $(STAGING_DIR) *and*
   $(TARGET_DIR). Remote *and* target debugging are possible.

Are there other cases not handled here that would be useful ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2010-06-23  7:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 23:25 [Buildroot] sdl demo app install problem H Hartley Sweeten
2010-06-21 23:32 ` Peter Hüwe
2010-06-21 23:41   ` H Hartley Sweeten
2010-06-21 23:47     ` Peter Hüwe
2010-06-21 23:59       ` H Hartley Sweeten
2010-06-22  1:05       ` H Hartley Sweeten
2010-06-22  1:18         ` Peter Hüwe
2010-06-22  6:54 ` Thomas Petazzoni
2010-06-22 14:41 ` Peter Korsgaard
2010-06-22 15:39   ` H Hartley Sweeten
2010-06-22 20:32     ` Peter Korsgaard
2010-06-23  7:12       ` Thomas Petazzoni [this message]
2010-06-23  7:40         ` [Buildroot] On strip and debugging symbols Peter Korsgaard
2010-06-23  8:46           ` Thomas Petazzoni
2010-06-23  9:36             ` Peter Korsgaard
2010-06-23  9:51               ` Thomas Petazzoni
2010-06-23 10:02                 ` Peter Korsgaard
2010-06-23 11:12                   ` Thomas Petazzoni
2010-06-23 11:24                     ` Peter Korsgaard
2010-06-23  9:47             ` William Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100623091224.266d1030@surf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox