All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koen Kooi <k.kooi@student.utwente.nl>
To: openembedded-devel@lists.openembedded.org
Subject: Re: Revert "package bbclass: strip static libs as well"
Date: Fri, 23 Oct 2009 11:14:48 +0200	[thread overview]
Message-ID: <hbrs68$gbd$1@ger.gmane.org> (raw)
In-Reply-To: <1256286976.4529.117.camel@mill.internal.reciva.com>

On 23-10-09 10:36, Phil Blundell wrote:
> On Fri, 2009-10-23 at 10:23 +0200, Holger Hans Peter Freyther wrote:
>> One thing that pops back into my mind is to move .a files into a -static
>> package? People that want to link statically can pick their .a files.
>
> Yes, I think someone else proposed this a few weeks ago but it doesn't
> seem to have happened.  Given that static linking is pretty much a
> minority pursuit nowadays (excepting libc_noshared.a) this sounds like a
> fine idea.
>
> Stripping .a files with the default options will effectively destroy
> them so the current state of affairs is definitely silly.  If you are
> going to do that then you might as well just delete the files: they are
> no use for anything after stripping.
>
> An alternative (or an addition) to the -static packaging would be to
> arrange for .a files (and .o files, I guess) to be stripped with "strip
> --strip-debug" (or perhaps --strip-unneeded).  This should leave enough
> symbol data in the files for them to remain usable.

Something like this (but without the mailer induced linewrapping)?

diff --git a/classes/package.bbclass b/classes/package.bbclass
index 046351a..2bf55e3 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -183,6 +183,9 @@ def runstrip(file, d):
          extraflags = "--remove-section=.comment --remove-section=.note 
--strip-unneeded"
      elif "shared" in result or "executable" in result:
          extraflags = "--remove-section=.comment --remove-section=.note"
+       elif file.endswith(".a")::
+                extraflags = "--remove-section=.comment --strip-debug"
+

      bb.mkdirhier(os.path.join(os.path.dirname(file), ".debug"))
      debugfile=os.path.join(os.path.dirname(file), ".debug", 
os.path.basename(file))
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 7426095..6c1cc06 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -207,7 +207,7 @@ SOLIBSDEV_darwin = ".dylib"
  SOLIBSDEV_darwin8 = ".dylib"
  SOLIBSDEV_darwin9 = ".dylib"

-PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-locale"
+PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-static ${PN}-dev ${PN}-locale"
  #enable this when bitbake is upgraded to cope with ++ values in the field
  PACKAGES_DYNAMIC = "${PN}-locale-*"
  FILES = ""
@@ -225,9 +225,11 @@ FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} 
${datadir}/gtk-doc \
              ${datadir}/gnome/help"
  SECTION_${PN}-doc = "doc"

+FILES_${PN}-static = "${libdir}/*.a ${base_libdir}/*.a"
+
  FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} 
${libdir}/*.la \
-                ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \
-                ${base_libdir}/*.a ${base_libdir}/*.o 
${datadir}/aclocal ${datadir}/pkgconfig"
+                ${libdir}/*.o ${libdir}/pkgconfig \
+                ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig"
  SECTION_${PN}-dev = "devel"
  ALLOW_EMPTY_${PN}-dev = "1"
  RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"


regards,

Koen




  reply	other threads:[~2009-10-23  9:16 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23  3:04 Revert "package bbclass: strip static libs as well" Holger Hans Peter Freyther
2009-10-23  7:23 ` Koen Kooi
2009-10-23  7:30   ` Holger Hans Peter Freyther
2009-10-23  7:58     ` Koen Kooi
2009-10-23  8:23       ` Holger Hans Peter Freyther
2009-10-23  8:36         ` Phil Blundell
2009-10-23  9:14           ` Koen Kooi [this message]
2009-10-23  9:33             ` Holger Hans Peter Freyther
2009-10-23  9:46               ` Koen Kooi
2009-10-23  9:54                 ` Holger Hans Peter Freyther
2009-10-23 10:03                   ` Koen Kooi
2009-10-23 10:24                   ` Phil Blundell
2009-10-23 11:07                 ` Stanislav Brabec
2009-10-23 11:34                   ` Holger Hans Peter Freyther
2009-10-23 22:31                     ` Stanislav Brabec
2009-10-24  0:29                       ` Khem Raj
2009-10-24  8:48                       ` Koen Kooi
2009-10-24 13:27                         ` Stanislav Brabec
2009-10-24 14:13                           ` Stanislav Brabec
2009-10-24 14:33                             ` Phil Blundell
2009-10-24 14:57                           ` Koen Kooi
2009-10-24 14:06                         ` Phil Blundell
2009-10-24 15:18                           ` Koen Kooi
2009-10-24 15:39                           ` Stanislav Brabec
2009-10-24 18:45                             ` Phil Blundell
2009-10-24 19:33                               ` Stanislav Brabec
2009-10-23 12:11                   ` Leon Woestenberg
2009-10-23 12:12                   ` Phil Blundell
2009-10-23 12:28               ` Koen Kooi
2009-10-23 12:37                 ` Phil Blundell
2009-10-23 12:42                 ` Phil Blundell
2009-10-23 12:56                   ` Koen Kooi
2009-10-24  2:32                     ` Holger Hans Peter Freyther
2009-10-24  3:42                       ` Denys Dmytriyenko
2009-10-24  8:40                       ` Koen Kooi
2009-10-23 18:21                   ` Denys Dmytriyenko
2009-10-23 18:36                     ` Phil Blundell
2009-10-23 19:53             ` Khem Raj
2009-10-23 18:26           ` Denys Dmytriyenko
2009-10-27  9:38 ` Koen Kooi
2009-10-27 10:21   ` Phil Blundell
2009-10-27 10:29     ` Koen Kooi
2009-10-27 10:50   ` Holger Hans Peter Freyther
2009-10-27 11:24     ` Koen Kooi

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='hbrs68$gbd$1@ger.gmane.org' \
    --to=k.kooi@student.utwente.nl \
    --cc=openembedded-devel@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.